Forum Discussion

Greg_Jiff's avatar
Greg_Jiff
New Contributor
16 years ago

Cannot reach a TestStep by name from Groovy script (but can by index)

Hi,

I have a strange issue that looks like a data related.
In my test case I have 12 TestStep objects, and Groovy shows this correctly.
I can reach all objects by index, but when I try to reach them by name one TestStep remains inaccessible, i.e. a get- method returns null.
I tried a direct call from TestCase object and worked with a list iterating through all elements. Result is the same: one test step is not available even though I can work with it via soapUI GUI ok.
I guess that this is a result of the object history in the soupUI objects repository.
So something is broken and the object is not indexed correctly.

Please share your knowledge if you experienced the same problem.

Thank you

2 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    that really sounds strange? Can you share the project file (or at least the testcase by exporting it)? What kind of teststep is it? What is its name?

    regards!

    /Ole
    eviware.com
  • Greg_Jiff's avatar
    Greg_Jiff
    New Contributor
    Found the reason: the property value had a leading space.
    It was rather small on GUI and difficult to spot.
    Thanks to Ole for a hint.
    It's probably a good idea to check trailing and leading spaces for properties set up manually.
    Also it's nice to have properties trimming done by soapUI on a default basis.