Forum Discussion
Hi ranjit96,
Could you attach the code of the teardown script in a txt file rather then the screenshot, as I'm not able to see all the code in the screenshot.
Thanks!
Please see attach .txt file for teardown script. Thanks.
- d4vke7 years agoOccasional Contributor
This is very strange, I also get the error message
ERROR:groovy.lang.MissingPropertyException: No such property: testRunner for class: Script2
But no results are shown since the script just stops when the error appears...
Is it really not possible to use the runner variable to execute a teststep from another testsuite...?
- Alex997 years agoContributor
Dunno if you are still looking for a solution, but maybe this workaround will help you.
I created a test suite, with 1 test case from which I can basically run as many test suites as I desire. Here is the code. See also the attached screenshot.
Code:
testRunner.testCase.testSuite.project.getTestSuiteList().each { testsuite -> if(['ts'].contains(testsuite.getName())) { //filter testsuite we want to run testsuite.getTestCaseList().each { testcase -> if(testcase.getName().toLowerCase().startsWith('renderer')) { //filter testcases we want to run testcase.getTestStepList().each { teststep -> if(teststep.getName().equalsIgnoreCase('request')) { //finally filter all teststep we want to run log.info "running ${testcase.getName()} -> ${teststep.getName()}" def r = teststep.run(testRunner, context) log.info r.getStatus() } } } } } }
- d4vke7 years agoOccasional Contributor
Thanks Alex99,
I will give this a try and let you know what the outcome is.
Related Content
- 3 years ago
- 9 years ago
- 4 years ago
Recent Discussions
- 4 days ago
- 5 days ago