GithubHelp home page GithubHelp logo

bluetata / java-maven-junit5-example Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 20.0 153 KB

Examples of Junit 5 Test on Dynamic test & Spring Boot etc. </br> 使用Junit 5 进行单元测试的各种用例

License: Apache License 2.0

Java 100.00%
junit5 junit-5 maven jenkins test junit5-guide

java-maven-junit5-example's Introduction

java-maven-junit5-example

Read this in other languages:中文.

Introduction

This repository contains some examples of JUnit 5

Sample Code Component contains

Test Steps

NOTE: You could choose clone this repo., alternatively you could use the Download Zip button to down code zip file to local.

  1. Clone the repo

  2. Run the Junit 5 Test

  3. Test Result Report

1. Clone the repo

Clone the java-maven-junit5-example locally. In a terminal, run:

$ git clone https://github.com/bluetata/java-maven-junit5-example.git

Import source code locally(if you don't usedclonecommand)

  • 1. IntelliJ IDEA

Menu File –> New –> Project from Exist Sources... –> Existing Maven Projects

Browse and select pom.xml in your source code location

Then click Next -> Next -> Next -> Finish button to finish the importing.

  • 2. Eclipse

Menu File –> Import –> Maven –> Existing Maven Projects,

Browse to your source code location,

Click Finish button to finish the importing.

2. Run the Junit 5 Test

In a terminal, run:

$ mvn test

You can also run the test in IntelliJ IDEA: Right click in run test class and click run 'XxxXxxTest' with Coverage button.

3. Test Result Report

As the repo using maven-surefire-report-plugin plug, you can find the test report in scr/target/surefire-reports folder.

Sample output

Spring Running

Test Result

Coverage

Test Result Report

License

Apache 2.0

java-maven-junit5-example's People

Contributors

bluetata avatar

Stargazers

 avatar

Watchers

 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.