RE: Automating the GUI vs DB

I’m automating a search functionality based on some filters. It gave 1000 results. From scripting point of view, should I be checking the results in WebTable row by row to check if the filter check is right or not? or should I just check if there is some data/rows in the webtable and pass the test case?

Add Comment
2 Answers

Swastik,

Thats a really nice and very important question. The are many reason why you should automate row by row instead of just verifying one item.

If you check just some rows you may not be able to catch loop constructs related bug. Lets see it with example, lets say  you want to print from 0 to 100.

You will write this for loop


for(int i = 0; i <= 100 ; i++)

{

System.out.println(i);

}

but in a hurry you did this


for(int i = 0; i < 100 ; i++)

{

System.out.println(i);

}

check the difference and see for yourself the two results.

Plus there may be many reasons that while coding the application the developer actually assigned wrong values to the different results for a search query. So checking row by row makes more sense.

Also, when you say DB VS GUI, I think you want to go for GUI. The reason is that DB will get you bugs in the Database related layers of application, it wont  give you bugs in the GUI code layers of your application.

Virender

Professor Answered on March 30, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.