Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

test-2143/Maven-Java-Project

Open more actions menu
 
 

Repository files navigation

Java-Maven-Junit-HelloWorld

A „Hello World!” sample written in Java using Maven for the build, that showcases a few very simple tests.

This example demonstrates:

  • Unit tests written with JUnit 4
  • Unit test using PowerMockito to mock classes and test System.exit()
  • Integration tests written with JUnit 4
  • Integration test using system-rules to test System.out
  • Code coverage reports via Soanr.
  • A Maven build that puts it all together

Running the tests

  • To run the unit tests, call mvn test
  • To run the integration tests as well, call mvn verify
  • To generate (unit test) code coverage reports, call mvn sonar:sonar

Conventions

This example follows the following basic conventions:

| unit test | integration test --- | --- | --------- resides in: | src/test/java/*Test.java | src/test/java/*IT.java executes in Maven phase: | test | verify handled by Maven plugin: | surefire | failsafe

About

Maven-Java-Project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jinja 45.5%
  • Java 43.3%
  • Shell 7.3%
  • Dockerfile 2.4%
  • Python 1.5%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.