Results 1 to 2 of 2
  1. #1
    oraclin25 is offline Member
    Join Date
    Apr 2015
    Rep Power

    Default Tests --> it must be after deploying the application?

    Hallo everyone,

    I am newbie in Maven, currently in a Java EE Project, which uses maven as build tool.

    I am trying to get know better how to deal with Maven. There is one Point I am still confusing:

    In all the eclipse Projects we have as you already know: src/test/Java Folder, where all tests are for the particular Project. Summarized, we use this command to deploy to the Application Server:
    Java Code:
    mvn clean install -P wl-deploy
    My question:
    WHEN does maven test the test classes? According to the maven documentation, the deployment of the application takes a the LAST place. But how can it be possible to test if the application is still not yet deployed?

    In the tests, we write Standard things like ServiceLocator for Beans, etc.. So, in my oppinion, These Service Locators can only be run, if the beans are already done deployed to the WebLogic right?

    Am I thinking wrong?

    Thank you for your comments.


  2. #2
    swastb is offline Member
    Join Date
    May 2015
    Rep Power

    Default Re: Tests --> it must be after deploying the application?

    Maven runs the testcases after compile phase. Check the below documentation

    By running test means it tests the compiled source code using a suitable unit testing framework for example Junit testcases, which do not need your applications to be deployed. For testing ServiceLocator for Bean you might have to use testing framework such as Mockito, instead of relying on real application deployment.

Similar Threads

  1. Deploying Application Using JFreeChart Library
    By Redefine12 in forum Eclipse
    Replies: 9
    Last Post: 04-26-2012, 10:37 AM
  2. Replies: 23
    Last Post: 06-15-2011, 06:40 PM
  3. Deploying a JSF Web Application to a Server
    By Nivedita in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 05-01-2011, 10:07 AM
  4. Problem in Deploying j2ee web application
    By arshadalisoomro in forum Advanced Java
    Replies: 0
    Last Post: 01-24-2011, 03:23 PM
  5. (Server)Socket application deploying
    By mdinant in forum Networking
    Replies: 0
    Last Post: 04-09-2008, 06:10 PM

Posting Permissions

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