Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Regression Testing of Java Application

Posted on 2011-10-21
11
Medium Priority
?
246 Views
Last Modified: 2012-05-12
We have a Java Application, its a batch program that runs overnight and generates an XML file.

In order to regression test this, we are planning to do the following.

1) Run the production version of the code and QA version of the code pointing to the same data base and compare the output XML files.

are there any suggestions here on how to accomplish this. Any frameworks to run a java process and compare the output files etc.

thanks


0
Comment
Question by:dhuma
  • 5
  • 4
  • 2
11 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 37007672
Well, as you've indicated in your tags, JUnit is the standard for testing. What you might use in addition is an xml diff utility

http://xmlunit.sourceforge.net/
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 37007676
0
 
LVL 47

Expert Comment

by:for_yan
ID: 37007680
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dhuma
ID: 37007846
I am looking for more than just comparing XML Files

In this case, it has to invoke one process (with QA jars) and invoke other process (With Prod Jars), and then compare the files.

How about invoking the two versions (Prod and QA) using different class loaders and then compare the xml output using XMl Unit.

any comments on the above...
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 37007886
Well all you've just described is possible with JUnit afaics
0
 

Author Comment

by:dhuma
ID: 37007905
You meant, what ever we plan to do , just stuff into the JUnit test case?
0
 

Author Comment

by:dhuma
ID: 37007922
something like using the Java task in the Junit ?
0
 

Author Comment

by:dhuma
ID: 37007941
oops, I meant ANT
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 37007955
What i mean is that your testing logic would be implemented in your JUnit test cases, probably with supporting apis
0
 
LVL 47

Accepted Solution

by:
for_yan earned 1500 total points
ID: 37010455
Not being too fancy I'd write a Java program to compare two output files, say using xml diff or FileUtils (if these
files need to be eaxcatly identical)  and then make a simple batch file where I'd execute once Prod and once QA version
and then run comparison of files.

You can run it as often as you want, will give you the same information,
while you'll spend far less time setting it up than using different classloaders and such stuff.


0
 

Author Closing Comment

by:dhuma
ID: 37199031
thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question