Skip to content

jboss-qa/maven-failure-handler-junit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven failure handler junit extension

Description of problem

When running JUnit test it can happen that the test is not run because of some previous maven phase failure (eg. dependency cannot be downloaded, compilation error, etc..). We could use some tool (eg. Jenkins JUnit plugin) to visualize test results, where we don't have to rely on reading the log. In that case we wouldn't see the failure on the first look and we could potentionally overlook it.

What the extension does

It will catch failure occurred during any maven phase which was executed before test (surefire/failsafe) phase. From those failures are then constructed artificial XML surefire report files and placed under <module>/target/surefire-reports.

Build and use

Firstly build the extension.

mvn clean install

Then use it in your test run.

-Dmaven.ext.class.path=<jar-file>

Or placing XML into ${maven.multiModuleProjectDirectory}/.mvn/extensions.xml:

<?xml version="1.0" encoding="UTF-8"?>
<extensions>
  <extension>
    <groupId>org.jboss.qa</groupId>
    <artifactId>maven-failure-handler-junit</artifactId>
    <version>1.1.0</version>
  </extension>
</extensions>

Articles and other sources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%