Skip to content

Very basic example used to illustrate how some unit test frameworks integrate

Notifications You must be signed in to change notification settings

sylvaindecout/basic-unit-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

basic-unit-tests

This project is a very basic example used to illustrate how unit test frameworks integrate.

Test case

The entry point is PricingService, which is in charge of providing a price for an article reference. A catalogue provides article details. A discount policy decides if/which discount is applicable.

Build lifecycle

Maven build is customized so that plugins run automatically.

  1. initialize phase: Jacoco prepares agent for unit tests
  2. test: Surefire runs unit tests
  3. pre-integration-test: Jacoco prepares agent for integration tests
  4. integration-test: Failsafe runs integration tests
  5. integration-test: Pitest generates report for unit tests
  6. post-integration-test: Jacoco generates report for integration tests
  7. verify: Jacoco generates report for unit tests
  8. verify: JGiven generates report

Frameworks

This project implements tests with both JUnit4 and Jupiter. Supporting both impacts Maven configuration a lot.

Besides, this support is not complete, as Maven plugin for Pitest does not support Jupiter yet.

How to run

  • Run tests from IDE / Maven build

About

Very basic example used to illustrate how some unit test frameworks integrate

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages