Forum Discussion

perakerberg's avatar
perakerberg
Occasional Contributor
13 years ago

Assertion test step - GetData

The new assertion test step is a great idea! It fits very well into my effort of trying to keep a Given-When-Then style of test steps.
However, I ran in to some trouble that someone might be able to help me with.
When I added a new assertion step to assert the contents of a soap response, I used the "GetData" function to set the expected value.
I pointed to the property of another testcase.
In the expected field, the syntax appeared as: ${MyTestStep#Myproperty}

But, when running the assertion, it doesn't seem to parse the value of the property, it compares the actual value against the "${MyTestStep#Myproperty}" value.
So, the value of ${MyTestStep#Myproperty} matched, but the string "${MyTestStep#Myproperty}" clearly does not.

Am I doing something incorrectly or is this a bug?

Thanks again for a great product and this awesome new feature.
Keep it up!
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    I'm not sure I understand you properly. Get data doesn't have an option for adding property from a different test case. Did you add it manually?
    Could you perhaps share your project file so we have a look? You can send it over to our support if you can't share it publicly.


    Regards,
    Dragica
    /SmartBear Sweden
  • perakerberg's avatar
    perakerberg
    Occasional Contributor
    Hello again,

    I might have been unclear. My test case consists of a set of steps.
    Step 1 is a "Run TestCase" step. This step has a property which it sets on finish.
    Step 5 is my Assertion test step. In that assert I want to use the property from step 1 as an expected value.
    There is no problem in getting it from the context-menu.

    But, instead of comparing the actual value to the value of the property, Soap UI compares the actual value to the "${MyTestStep#Myproperty}" value instead.

    So, I have not done anything not supported already, I just used the context menu available and selected a property.

    Does that make more sense?

    /Per
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Ok...so are you using right click "get data" option or how are you getting it from the context-menu?
    Which assertion type exactly are you using? Have you set anything specific in options of 'Run TestCase' TestStep?

    Is it not possible for you to share project file? It would be much easier for us to reproduce. You can send it to
    smartbear-sweden-support@smartbear.com directly, instead of posting it on forum, if it's more convenient.

    Regards,
    Dragica
    /SmartBear Sweden
  • perakerberg's avatar
    perakerberg
    Occasional Contributor
    Hello again...

    Well I am afraid I must have been mistaken. I took another shot at it tonight and it worked like a charm.
    So, no issue with getting data to assert against in the assert test step.
    Thanks for your attention.
    I'll give my second case a go know, hopefully my flow continues

    Thanks for a killer feature!

    /Per