Using NoCodeBDD, you can easily assert values across multiple rows of a SQL result. For an example, let’s look at the following table, which is a result of a SQL query. If your requirement is to select all users with Age 32 and to assert the First Name and Last Name from both rows, then it can be easily done in NoCodeBDD by selecting Multiple Row option.

 FirstNameLastNameAgeEmployeeIDUserId
Row 1JoeDoe32EMP0001U0001
Row 2JoeBlog32EMP0002U0002
Row 3HarryWilliams30EMP0003U0003
Row 4JohnKerry37EMP0003U0004
Multi row result from SQL query

“How to test DB results without writing any code” blog post shows how a SQL can be added and a Single Row can be asserted. To Assert multiple row, simply select Multiple Row option and enter the row number in which the expected value is, enter the column name, condition and its value that you want to assert. That’s it.

Once you have provided all required information, NoCodeBDD will do all the hard work for you and automate the code in the background. All you have to do is, press the Run menu and run the scenario you just added. You can also view the results in the audit page. This is shown in the GIF below

As you can see, asserting a single row or a multiple rows using NoCodeBDD is extremely easy and all it takes is minutes compared to hours using a scripted automation solution.

Leave a Reply