Forum Discussion

PrakashKannan's avatar
PrakashKannan
Contributor
7 years ago

Disabling test case in set up script at project level is not working

I want to disable few test cases whose name matches something. I used below script. But it does not disable the test cases   runner.project.testSuiteList.each{ def tcList=it.getTestCaseList() tcL...
  • groovyguy's avatar
    groovyguy
    7 years ago

    Try this:

     

    testSuite.project.getTestSuiteList().each
    {
    	def tcList=it.getTestCaseList()
    	tcList.each
    	{
    		log.info(it.getName());
    		if(it.getName().contains("B"))
    		{
    			it.disabled=true;
    		}
    	}
    }