SoapUI Scripts in Groovy

上一篇 / 下一篇  2015-07-27 12:43:31 / 个人分类:web service

  def testStepName=context.getCurrentStep().getLabel()
 
  log.info("Current Test Step..."+testStepName)

  def  endpoints = messageExchange.getEndpoint()
   log.info("Current Test Step URL..."+endpoints)


   //Get properties from one specific TestStep

//Get properties from one specific TestStep
def testStep = context.getTestCase().getTestStepByName("Segment Only Test") 
 log.info("testStep"+testStep)

if (testStep.getPropertyCount() > 0){
   for (prop in testStep.getPropertyList()){
      log.info(testStep.getName() + " has property...... " + prop.getName()+"........prop value......"+prop.getValue())
   }
} else{
   log.info(testStep.getName() + " doesn't have properties!")
}

def project= context.getTestCase().getTestSuite().getProject();

if (project.getPropertyCount() > 0){
   for (prop in project.getPropertyList()){
      log.info(project.getName() + " project has property...... " + prop.getName()+"........prop value......"+prop.getValue())
   }
} else{
   log.info(project.getName() + " doesn't have properties!")
}


def testSuite= context.getTestCase().getTestSuite()

if (testSuite.getPropertyCount() > 0){
   for (prop in testSuite.getPropertyList()){
      log.info(testSuite.getName() + " test Suite has property...... " + prop.getName()+"........prop value......"+prop.getValue())
   }
} else{
   log.info(testSuite.getName() + " doesn't have properties!")
}


TAG:

引用 删除 1119805803   /   2016-10-20 17:54:42
1
 

评分:0

我来说两句

我的栏目

日历

« 2024-04-22  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 8859
  • 日志数: 6
  • 建立时间: 2015-07-16
  • 更新时间: 2015-10-09

RSS订阅

Open Toolbar