Forum Discussion
nmrao
Champion Level 2
4 years agoConfusing description. Even diagram shows the unending loop.
Suggestions:
- Every test case should be independent. However, you have dependency between projects. Redesign your tests.
- By the way, please avoid using "workspace" which will limit your automation as testrunner does not understand workspace.
Arah
4 years agoOccasional Contributor
Hey,
about the independency of every TestCase, at work we use that kind of thing, so i was trying to recreate it (I do not have access to script that does this and all other things)
this is what I wanted to achieve
//Get all properties from current TestCase's TestStep "LIST" and transfer them to indicated TestCase in code above, and set them in TestStep "LIST"
def ListProperties = testRunner.testCase.getTestStepByName("LIST").getPropertyList()
ListProperties.each{ lp->
passPropertiesToList = testRunner.testCase.testSuite.project.workspace.getProjectByName(projectName).getTestSuiteByName(testSuitetName).getTestCaseByName(testCaseName).getTestStepByName("LIST").setPropertyValue("${lp.getName()}", "${lp.getValue()}");
}
//Get all properties from current TestCase and transfer them to indicated TestCase in code above
def exitProperties = testRunner.testCase.testSuite.project.workspace.getProjectByName(projectName).getTestSuiteByName(testSuitetName).getTestCaseByName(testCaseName).getTestStepByName("EXIT").getPropertyList()
exitProperties.each{ ep->
passPropertiesToExit = testRunner.testCase.testSteps["EXIT"].setPropertyValue("${ep.getName()}", "${ep.getValue()}");
}
Is there other way to run differentTestCase, than using .workspace?