Forum Discussion

sabereshcp's avatar
sabereshcp
Contributor
14 years ago

How to get the test step names in a test case using groovy script

Hi,

I wanted to know whether is it possible to get the test step names under a test case using groovy script.If possible please share the groovy script for the same.

Thanks in Advance,
Saberesh C P

1 Reply

  • wdowling's avatar
    wdowling
    Occasional Contributor
    This code works for a script step within a test case and will get the names of all the steps for that test case and output them to the log:

    testRunner.testCase.getTestStepList().each(){
    log.info(it.getName())
    }