minhtran83 / tpalus

Automatically exported from code.google.com/p/tpalus
1 stars 0 forks source link

Generation of unit test cases for Spring based beans #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Our application is a web based application built using JSF/Spring and 
Hibernate. We are trying to generate automated test cases for the service 
layer. We have a set of Manual Spring based JUnit test cases. The manual test 
cases load the Spring context and do the required dependency injection before 
performing the tests.

What steps will reproduce the problem?
1. We were able to generate the trace file using the above set of Manual Spring 
JUnit test cases.
2. We use the tool to use the trace file to generate the test cases
3.

What is the expected output? What do you see instead?
Expected output is a set of regression unit test cases. The generated unit test 
cases are only generating null checks for all objects returned from the service 
classes.

Please guide us on how do we setup Palus to inject the Spring objects into the 
service classes before creating the assertion model and therfore generate 
appropriate regresion test suite.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by rajkumar...@gmail.com on 28 Mar 2011 at 12:14

GoogleCodeExporter commented 9 years ago
Hi,

Sorry for the late reply. Google code does not notify me when there is a new 
issue 
reported.

Could you please give a concrete (small) example to explain your case? It is a 
bit 
difficult for me to figure out what goes wrong in Palus.

Thanks a lot

-
Sai Zhang

Original comment by racezh...@gmail.com on 2 May 2011 at 4:14

GoogleCodeExporter commented 9 years ago
I think one possible way around would be to have a main file which loads the 
application context and then invokes all methods of this class one by one. You 
could generate a test case for this class instead of generating tests directly 
on the spring bean. I will try that now and update the results here.

Original comment by datta...@gmail.com on 4 Oct 2013 at 4:47