GithubHelp home page GithubHelp logo

vitor-tadashi / maven-test-surefire-failsafe-openclover Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 45 KB

Mutli thread application tested with Maven Surefire, Failsafe and OpenClover

Java 100.00%
integration-test maven-failsafe maven-surefire openclover unit-test

maven-test-surefire-failsafe-openclover's Introduction

Maven tests with Surefire / Failsafe / OpenClover

Actions Status Actions Status

Too many articles about Surefire and Failsafe, and most people still don't know why Surefire and Failsafe are for and how to use it.

  • Surefire is used for unit tests
  • Failsafe is used for integration tests

This project is a clean example how to configure you project with Surefire, Failsafe and OpenClover with only necessary dependencies, and how to run your JUnit tests and generate a code coverage report.

Running unit tests with Surefire

mvn clean test

Running integration tests with Failsafe

Running and checking tests separately

mvn failsafe:integration-test
mvn failsafe:verify

Running in one command

mvn verify

Running unit and integration tests together

mvn verify -Dskip.surefire.test=false

Running with OpenClover (for code coverage report)

Running unit tests

mvn clean clover:setup test  

Running integration tests

mvn clover:setup failsafe:integration-test failsafe:verify

Generate code coverage

mvn clover:aggregate clover:save-history clover:clover

Running in one command

mvn clean clover:setup verify -Dskip.surefire.test=false clover:aggregate clover:save-history clover:clover

Code coverage report

The code coverage report will be generated inside ./target/site/clover/dashboard.html

maven-test-surefire-failsafe-openclover's People

Contributors

stacksharebot avatar vitor-tadashi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.