Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Problem in parameterisation of assertion

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
Hi,

I am using the store wsdl for my project. (http://soatest.parasoft.com/store-01.wsdl )

I was using the getItembyTitle operation where in you mention the itle an dyou get the details of the book.
Initially, i gave title as Java and added a XML assertor to asset the id. For assertion I added an excel which contains id coulmn with value 2 which is the id of the book.
It passed.

The next time I added a table Title containing Java, Linux and Powerbuilder and updated teh excel sheet coulmn values as 2, 4, 6 (whioch is what it returns on running the test). This time 9 tests fails.
Even if the response for each table value was compared with each value in the excel sheet value in the assertion, atleast 3 shud have passed and 6 shud have failed. But this did not happen.

Also sometimes the response contains junk values. As in some executions ,id 3(actual) instead of 2(expected) in the assertor even though the response contains value 2.
(attached the screenshot for this)

How can I assert each row of the data from the table with only each corresponding value in the excel sheet as each response needs to be asserted with a different value.
Pls help

Regards,
Sayana
Tagged:

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Dear Sayana,

    Hello I am Baxter Campbell, I would be happy to help with your question.
    Could you please provide your .tst file that contain these tests?
    With that I will be able to recreate your tests on my own machine and find out what is causing the difficulty. If you have any additional questions, feel free to put them in the message with the attachment. Thank you

    -Baxter Campbell
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Hi Baxter,

    I have attached the store.tst file.

    I am not able to parameterise the assertions. Kindly have a look and let me know of a possible solution.

    Thanks a lot

    Regards,

    Sayana
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Dear Sayana,

    In order to get the data sources to run as you desire, you can go to the main Test Suite of the .tst file, click on Execution Options>Test Execution>Advanced Options, and change the Multiple data source iteration from Permutation to Flat. This will tell it to only run the test 3 times, and when one looks at row 2, the other looks at row 2, and so on.

    As for the ID that appeared incorrect, if you scroll down in the Traffic Viewer you can see that there are actually two things returned by the getItemByTitle when you send Java, one with ID2, other with ID3. Since you are comparing everything returned by the search against ID being 2, the second one fails. You can either get rid of this assertion, or make it more specific to only look at the first result returned, which you can do with XPaths.

    If you have any additional questions, feel free to post them here. Let me know if this works for you!

    -Baxter Campbell

Tagged