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: