Hello,
after doing a merge, I realized I made som 'savage' cuts in my testcases, removing cases that, I though, were no longer used. In fact some of them were still used and I have to steps that are not unlinked.
I'd like to parse all my steps and check which ones are faulty but I can't do it by hands. Is there any step property that indicates if a teststep is linked or not ?
thanks
Alex
Solved! Go to Solution.
well, in fact I found that I can use the "targetTestCase" property ...
sorry for disturbing
if someone needs it :
testRunner.testCase.testSuite.project.testSuiteList.each{
TS ->
ts_name = TS.name
if (ts_name != "tools")
{
// for each test case
TS.getTestCaseList().each{
TC ->
tc_name = TC.name
if (tc_name.contains("TODO") == false)
{
// parse test cases
TC.getTestStepList().each{
tStep->
if (tStep.name.contains("- todo"))
{
log.warn "obsolete step to discard: " + tStep.name
}
else if (tStep.config.type == "calltestcase")
{
if (tStep.targetTestCase == null)
{
log.info "$tc_name / ${tStep.name} link is broken"
}
}
}
}
}
}
}
well, in fact I found that I can use the "targetTestCase" property ...
sorry for disturbing
if someone needs it :
testRunner.testCase.testSuite.project.testSuiteList.each{
TS ->
ts_name = TS.name
if (ts_name != "tools")
{
// for each test case
TS.getTestCaseList().each{
TC ->
tc_name = TC.name
if (tc_name.contains("TODO") == false)
{
// parse test cases
TC.getTestStepList().each{
tStep->
if (tStep.name.contains("- todo"))
{
log.warn "obsolete step to discard: " + tStep.name
}
else if (tStep.config.type == "calltestcase")
{
if (tStep.targetTestCase == null)
{
log.info "$tc_name / ${tStep.name} link is broken"
}
}
}
}
}
}
}
@krogold You are not disturbing at all - I am sure this thread can be helpful for somebody in the future. Such content is useful for the ReadyAPI Community, so do not hesitate to post here!
Also, I am glad to know you have found the solution so quickly🙂
Subject | Author | Latest Post |
---|---|---|