Announcement Announcement Module
No announcement yet.
JUnitPerf integration in Spring-JUnit classes Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JUnitPerf integration in Spring-JUnit classes


    I am using Spring 2.5 and Junit 4.4 version in my application.

    My JUnit classes are integrated with Spring using SpringJUnit4ClassRunner.class.

    I donít Ďve any reference to TestCase or Test Suite in my code. My classes are extending org.springframework.test.jpa.AbstractJpaTests. I am using @Test annotation to identify the methods to be executed while running the test.

    I am trying to implement JUnitPerf as a decorator to JUnit test cases. Usually JUnit classes are added to TestCase and passed as parameter to LoadTest or TimedTest constructors. Now, I donít have JUnit classes extending TestCase. How do I implement the LoadTest and TimedTest for such junit classes?

    It would be great if you could send me some reference code.

    Skeleton of my code is given below:

    public class DocumentFacadeImplTest extends BaseJUnitTest
    public void testUpdateDocumentTemplate()
    . . . .

    @TestExecutionListeners({DependencyInjectionTestEx ecutionListener.class})
    public abstract class BaseJUnitTest extends AbstractJpaTests {
    . . . . .

    I would like to load test testUpdateDocumentTemplate() method of DocumentFacadeImplTest.class.

  • #2
    Hi ArumugamD,
    Were you able to get JunitPerf working with Spring? I couldn't, so I wrote custom logic to get this working and it became a framework of it's own( unfortunately it still uses Junit3 ). This new framework allows annotated performance tests and Spring autowiring in the tests. The ReadMe is here -
    It can also now be downloaded as a Maven dependency -