RJanecek
15 years agoRegular Contributor
[SOLVED]NPE when I loop over testCases
Hi,
I have some testSuites and I wanna enabled disable testSuites:
context.getTestSuite().getTestCaseList().each{
context.getTestSuite().getTestCaseByName( it.getLabel() ).setDisabled(false)
}
but unfortunately it.getLabel() return nameOfTestCase + (disabled) if test is disabled so this method getTestCaseByName cannot find these testCase.
So I think it.getLabel() should return just name of testCase even this tesCase is disabled or not. or there will be new method getName of tesCase of new method getTestCaseByLabel
thx
I have some testSuites and I wanna enabled disable testSuites:
context.getTestSuite().getTestCaseList().each{
context.getTestSuite().getTestCaseByName( it.getLabel() ).setDisabled(false)
}
but unfortunately it.getLabel() return nameOfTestCase + (disabled) if test is disabled so this method getTestCaseByName cannot find these testCase.
So I think it.getLabel() should return just name of testCase even this tesCase is disabled or not. or there will be new method getName of tesCase of new method getTestCaseByLabel
thx