Forum Discussion

mmcpe2005's avatar
mmcpe2005
New Contributor
16 years ago

[SOLVED]TestStep description not accessible

Using groovy in SoapUI 3.0.1,

     testRunner.testCase.getTestStepAt(1).description

does not return the TestStep description as it does for the TestSuite or TestCase.  The value seems to be stored similarly for both in the saved project.xml

     TestSuite generated for REST Service [REST]
     ...
     TestStep for REST Service [REST]

Any ideas?
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    Did you want the description for the second step in the test case? The index for getTestStepAt is zero-based (but maybe you know that and it is a 3.0.1 bug...)
  • mmcpe2005's avatar
    mmcpe2005
    New Contributor
    Thanks for the tip, but that is not the issue in my case as you alluded and I think it is a 3.0.1 bug.  As I tested further, I realized that my delay and groovy script steps are returning a description.  It seems to only be an issue with my REST Test Request steps.  Any other ideas considering my new findings?
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    Yes, looks like a valid bug in 3.0.2 as well. For example, HTTP Test Request will return a description, but REST Test Request will not.

    Looks like this will work:

    testRunner.testCase.getTestStepByName("REST Test Request").getTestRequest().getDescription()

    However, both will work against a regular Test Request

    testRunner.testCase.getTestStepByName("Test Request").getDescription()
    testRunner.testCase.getTestStepByName("Test Request").getTestRequest().getDescription()

    So it is inconsistent.
  • thanks for the digging guys, we'll have it fixed in the upcoming nightly build..

    regards!

    /Ole
    eviware.com