Categories: Uncategorized

by Jerome Josephraj

Share

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.

STAY IN THE LOOP

Subscribe to our free newsletter.

Related Posts

View all

  • Continue reading
  • With NoCodeBDD, teams can automate Behavior-Driven Development (BDD) Scenarios for mobile applications with few clicks. To create test automation for mobile scenarios, typically, one would use Appium. Using NoCodeBDD, all you have to do is: Following gif shows how this is done for a sample mobile application: NoCodeBDD Mobile Automation NoCodeBDD […]

    Continue reading
  • if("student".equals(userType)){ Assert.assertEquals("STUDENT REGISTERED SUCCESSFULLY",actualMsg); }else{ Assert.assertEquals("ALUMNI REGISTERED SUCCESSFULLY",actualMsg); } When you have test code written like that given above—or. in other words, the code is written to assert an outcome based on conditional logic—it won’t test the scenario as it should. When writing test automation code for behavior-driven development (BDD) […]

    Continue reading
  • There is a general mis-conception that BDD should be used for testing. Many projects consider using BDD during “Testing phase” and only the QA team uses BDD. When BDD is rolled out this way, the teams don’t see the benefits. In this short video, I have explained how Behavior Driven […]

    Continue reading