简体   繁体   中英

Data Validation through selenium scripts between reports and backend database

Problem Statement: I am having a report that is view-able from an online portal and the data is populated from the data-mart using various stored procs for this report.

I want to validate the report's data from the online screen against the SQL queries that I have developed for testing. The problem is that the report is having many fields say about 20 different fields and 2 or 3 sections. For populating the different sections and fields we are having individual queries or stored procs.

Now the major challenge that I am facing is that I could get the data from the online screen easily but am not sure how to get the data from the backend for the validations.

I tried writing a macro for the same and it returned the results but then to format the results in the form of the report is becoming a cumbersome job. And this needs to be done for around 40 + reports.

Any ideas of tackling these kind of situations would really help me out. Thanks in advance.

For generalization we can think of the scenario as a report testing scenario where in we will view the reports from online screen and validate its data from the backend by using custom queries developed by the testing team based on the logics( and not using the developers queries) so that an independent validation can be carried through.

And this whole testing portion would run as a part of the automated regression suite being developed for the portal with the help of selenium and java.

Your problem statements indicates that you are attempting to verify a specific reports data , as opposed to the display of that data in the GUI. For this problem I would recommend that you eliminate the GUI from the test, and use the product's API to retrieve the report content. From this, you could possibly store the results as a SQLite table, for example, then write code to compare table contents with the results you obtain with your comparison queries.

This approach will eliminate the need to process the GUI content, allowing you to focus on the task at hand, verifying the report content.

By the way, if your GUI does a lot of additional processing of the report data (eg filtering, sorting, etc.), you'll need to have a different set of test cases to verify that functionality. It's important to conceptually differentiate that from the data content .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM