You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tibor Digana (Jira)" <ji...@apache.org> on 2019/11/13 14:42:00 UTC

[jira] [Commented] (SUREFIRE-1718) running build and test separately with surefire

    [ https://issues.apache.org/jira/browse/SUREFIRE-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16973397#comment-16973397 ] 

Tibor Digana commented on SUREFIRE-1718:
----------------------------------------

You are mixing the terminologies. Surefire is testing module's classes and not Jar files and that's why Surefire is useful for unit testing.
The Failsafe is is testing the JAR and thus useful for integration testing.
Do not run {{mvn surefire:test}}. Better run {{mvn test}} for the unit tests.
For the integration tests and Failsafe plugin run {{mvn verify}} but you have to ad two {{goals}} in Failsafe plugin config in your POM.

> running build and test separately with surefire  
> -------------------------------------------------
>
>                 Key: SUREFIRE-1718
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1718
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>    Affects Versions: 3.0.0-M3
>            Reporter: Abhishek
>            Assignee: Tibor Digana
>            Priority: Minor
>
> Hi Team,
> We have requirement to run build and unit test separately with sure fire, how can we achevie this, i was going through all documentations available in internet but could not find any which works for us.
> Our requirements is by running package goal with test skipped, we are able to generate 2 jars one for actual code and other for test like
> Step#1
> mvn package -DskipTests=true
>  
> In next step i would like to run 
> Step#2
> mvn surefire:test
> but how can i provide source jar and test jar generated in step#1 to surefire:test in step#2?
> I don't want to have test jar as dependency in pom.
>  
> Thanks in advance.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)