Verify multiple rows and then data drive
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Verify multiple rows and then data drive
First off I am new to Soup/ReadyAPI.
I have an API that returns row information for a grid.
I have assertions for the count of rows and the first row. I am also verifying the data against an excel sheet which is all working fine.
The problems comes when I add more than one row of data in the excel sheet as i want to validate multiple rows. I cannot get this to work. Ideally I want to validate 3 rows on each run looking at the same excel sheet.
Any ideas how I do this? Eventually I want to datadrive this as well.
Screenshots of assertions and data returned plus excel sheet.
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you provide a sample excel file/ SoapUI project for us to help you? Are you using a datasource step to read the excel? You said you cannot get the thing to work. What does not work for you and what did you try so far?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, can you see the screenshots of the excel file and logs along with the description above?
Basically when I add two rows to validate form the excel column as shown in the screenshot it fails. I need it to verify, for instance, rows 1 and 2 of the grid and have this information stored in excel as detailed above in the screenshot.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can see the screenshots but I am wondering what are the steps you are taking for the comparison. Normally you would use the datasources to loop over each row...
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@endorium: Please understand that we're here to help and if we're asking for more information, it's out of a desire to help you. The more details that you can provide will go a long way in helping find you a solution. 🙂
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Precisely! And just to emphasize further... @endorium you are comparing the results of the second response element with some Excel#id, Excel#TestId and so on. The problem is those properties refer to the first row in your datasource and not to the second one no matter where you put it in the Message Content Assertions.
I am not even sure what a proper solution could be here but I think your way won't work. Anyways more info always helps.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There might be some groovy scripts that could be used, but I believe you'd still have to have a way of setting up Data Source loops, probably two, to parse the response and to control checking in Excel.
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will try explain it better.
So I have an API that returns 424 rows.
I want to verify the data in rows, for example, 1, 200 and 424 match the data in an excel spreadsheet written like the one above.
Even if its not data driven but does this on one pass. How can i do this? I reference the columns for the expected result as shown above but it fails as I assume for the second row in the sheet it is not looking at just the second row in the spreadsheet but all rows.
Any ideas? I was hoping to avoid having to do manual Groovy scripts as much as possible to begin with till I learn and was hoping this was not that unusual a scenario to use for API tests?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll try to find a solution for you tonight (at work now)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am going to ask some questions, so bear with me. You mention you need to validate, as an example, rows 1, 200, and 424. Will those ALWAYS be the rows required to be validated? If not, then what designates those as the rows you need to validate?
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
