Sunday, November 23, 2014

How to transfer property proerty to all Test Cases in Test Suite an access it

Transfer property to all TC

def ABC = testRunner.testCase.testSuite.project.getTestSuiteList()
def DEF = testRunner.testCase.testSuite.getPropertyValue("w2_SessionID")

for (testSuite in ABC){
for (testCase in testSuite.getTestCaseList()){
testCase.setPropertyValue("w2_SessionID", DEF)
}
}


Access property in each Test Case

def abdProjProp = context.expand( '${#Project#abdProjProp}' )

No comments:

Post a Comment