Results 1 to 2 of 2
- 04-27-2015, 12:28 AM #1
Member
- Join Date
- Apr 2015
- Posts
- 1
- Rep Power
- 0
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
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.
Regards,
Ratna
- 05-04-2015, 10:03 PM #2
Member
- Join Date
- May 2015
- Posts
- 5
- Rep Power
- 0
Re: Tests --> it must be after deploying the application?
Maven runs the testcases after compile phase. Check the below documentation
https://maven.apache.org/guides/intr...lifecycle.html
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
-
Deploying Application Using JFreeChart Library
By Redefine12 in forum EclipseReplies: 9Last Post: 04-26-2012, 10:37 AM -
Re: Deploying web application from Java classes
By Joel in forum New To JavaReplies: 23Last Post: 06-15-2011, 06:40 PM -
Deploying a JSF Web Application to a Server
By Nivedita in forum JavaServer Faces (JSF)Replies: 0Last Post: 05-01-2011, 10:07 AM -
Problem in Deploying j2ee web application
By arshadalisoomro in forum Advanced JavaReplies: 0Last Post: 01-24-2011, 03:23 PM -
(Server)Socket application deploying
By mdinant in forum NetworkingReplies: 0Last Post: 04-09-2008, 06:10 PM
Bookmarks