Forum Discussion
groovyguy
Community Hero
I took your script and cleaned it up a bit. I had to adjust it to use the context variable, and you have to test the name of the test case object and not the object itself. Otherwise you were close.
context.testCase.testSuite.project.getTestSuiteList().each { def tcList=it.getTestCaseList() tcList.each { log.info(it.getName()); if(it.getName().contains("B")) { it.disabled=true; } } }
PrakashKannan
7 years agoContributor
Thanks but when I run it says 'can not get property 'testSuite' on null object.
- groovyguy7 years agoCommunity Hero
Where are you running the script from?
- PrakashKannan7 years agoContributor
It is from Setup Script
- groovyguy7 years agoCommunity Hero
Try this:
testSuite.project.getTestSuiteList().each { def tcList=it.getTestCaseList() tcList.each { log.info(it.getName()); if(it.getName().contains("B")) { it.disabled=true; } } }
Related Content
- 3 years ago
- 5 years ago
- 4 years ago
Recent Discussions
- 9 hours ago
- 5 days ago