Results 1 to 2 of 2

Thread: TestNG tests with STS & Maven

  1. #1
    Join Date
    Nov 2011
    Posts
    13

    Default TestNG tests with STS & Maven

    Hi,

    I am using testNG, Spring JPA Data Repository and Derby for my integration tests. I need to close and re-open the application context for each test class. So I have used @DirtiesContext on each of my test classes. After making this change my tests are it is working fine in STS. But when I do maven install this is not working fine, debug is saying that the application context is getting closed and re-oped but the tests are failing because the application context chache is not getting cleared and no new application context is getting created.

    Thanks in advance.

    Regards,

    Amit Solankurkar

  2. #2
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,640

    Default

    Hey Amit!

    So by saying "when I do Maven install" you mean you are trying to execute stuff from the command line and that fails for some reason? I am just asking because when using the project within STS you should not need to execute any Maven stuff from command line in parallel to having the project open in STS, you should be able to so everything from within STS.

    If your problem is related to the Maven command line execution only, I would recommend to ask the question in the general Spring (testing) forum.

    HTH,
    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •