[
https://issues.apache.org/jira/browse/SUREFIRE-1960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Elliotte Rusty Harold closed SUREFIRE-1960.
-------------------------------------------
> Add command line option to run a NullTest
> -----------------------------------------
>
> Key: SUREFIRE-1960
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1960
> Project: Maven Surefire
> Issue Type: New Feature
> Components: Maven Surefire Plugin
> Reporter: Brian Patrick Walker
> Priority: Trivial
>
> It would be nice to have a null test that can be triggered by setting an
> optional parameter to the surefire:test goal. At least one other plugin
> (jacoco) adds a java agent to the surefire execution, and if no unit tests
> exist in a project, no report will be generated.
> An example of how to accomplish this currently:
> Add the following class to a maven artifact (test:null-test:1.0)
> {code:java}
> import org.junit.Test;
> public class NullTest {
> @Test
> public void noop(){
> assert(true);
> }
> }
> {code}
> Then use the optional parameter dependenciesToScan when invoking maven.
> {code:java}
> mvn clean install -DdependenciesToScan=test:null-test
> {code}
> I'm open to other ideas on how to force the surefire:test execution to run
> and load all of a project's classes.
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)