Looking for suggestions for testing Data between Web App and Windows App
My team is replacing a Windows application with a Web application.
Until we can phase out the Windows App we have to sync data between the two applications which include hundreds of fields. I need to verify that the data written to the Windows App from our new Web app is correct. I can do this manually through the UI's, however, am looking for an automated process.
you can use intermediary data-source (xml, database , csv , flat file,excel etc) to extract from Window. Write program to validate with web app.
Is the data stored within the application? If not, you simply use the external data source to validate - perform the synch, then check the data source against a baseline reference containing what you'd expect.
If it is stored in the application, you'll need to use - or get the developers to provide - an export to capture your data, then run your baseline checks against that.
Both systems persist data to Database. So If I understand correctly, you are suggesting to export the data from the Windows App into a flat file and then compare that data against what was entered in the Web App?
I really appreciate the responses!
It become easy for you as you need not to extract anything ( or you can build your own small one if you wish)
You need two connection with database
1. connect 1st DB , get the record set and store somewhere in between (DB, file ,xml or even clipboard if very small)
2. connect 2nd DB , get the record set and compare with first one.
Now connection can make by any language JAVA, php, vbs , C# etc.. Some example below, you will find plenty of them online
YOGI - Technology Tree QTP: PHP/SQL - Open and Close a Connection to the MySQL Server
YOGI - Technology Tree QTP: Connect to MySQL Database in QTP
Last edited by Yogi_Shukla; 08-02-2013 at 08:35 AM.
I personally would rather handle it on the unit or integration layers.
When you need a tool that supports both interfaces, you end up having to choose a heavier weight tool and have to deal with more complexity. Most data issues can be detected without UI involvement. You can effectively test it on the unit level in the application's Model layer (if the software is using a MVC or MVVM, or other multi-tiered architecture)
I think it's best to have unit or integration level tests that use the same programming language your devs use, and hook directly into their ORM. It's very bad to have tests that access database directly. They tend to be very brittle because any changes in the schema will end up breaking all test records. Then you have to reformat all your test records. The better way is to create factories or fixtures that piggy back off the ORM and automatically gets mapped to any new fields or schema changes. This also is a lot faster than an end to end test. You can sub out the database with something like a Hypersonic In-memory database HSQLDB, for testing and avoid the slow down of network connections of hardrive limitations.
Last edited by dlai; 08-02-2013 at 09:50 AM.
Knowing that both systems save to the database, here's how I'd work this:
1. Start with a database that you know intimately. This is your application base. You should store this as a backup file, and restore it into the database used by your applications (you will need your own dedicated test environment for this).
2. Start the web application, then run your tests. If you can run them via API rather than GUI, do it. Running them by http request/response may also be possible instead of GUI.
3. Shut your web application down and backup the database, saving it as something like web-run database.
4. Restore your application base into the windows app database (this can be the same database if you like).
5. Run the same set of tests (data-wise) against your windows application. Again, if you can do this via API, rather than GUI, do it.
6. Shut the windows application down.
7. If you're using the same database for both applications, restore your web-run database into a separate database, call it the results check database.
8. Run a bunch of queries to pull data from each database and compare them. If there are timestamps or time-dependent fields, you'll want to validate those manually (because the software routines are a pain to write...), but a basic compare can be done pretty quickly.
You can also store your expected results separately and compare after each run.