An open API service indexing awesome lists of open source software.

https://github.com/nesoy/junit5-example

πŸ§ͺ Introducing JUnit5
https://github.com/nesoy/junit5-example

example testing

Last synced: 7 months ago
JSON representation

πŸ§ͺ Introducing JUnit5

Awesome Lists containing this project

README

          

## JUnit5 Tutorial

## Requirements
- Java8

## [Architecture](https://github.com/junit-team/junit5-workshop/blob/master/slides/05_modularization/modularization.md)
- Platform
- ν…ŒμŠ€νŠΈλ₯Ό μ‹€ν–‰ν•΄μ£ΌλŠ” 런처 제곡. TestEngine API 제곡.
- Maven / Gradle Plugins, JUnit4 Runner
- Jupiter
- JUnit 5λ₯Ό μ§€μ›ν•˜λŠ” TestEngine API κ΅¬ν˜„μ²΄
- Vintage
- JUnit 4와 3을 μ§€μ›ν•˜λŠ” TestEngine API κ΅¬ν˜„μ²΄

## [Index](https://github.com/NESOY/junit5-example/tree/master/src/test/java)
- [Standard](https://github.com/NESOY/junit5-example/tree/master/src/test/java/standard)
- [Assertions](https://github.com/NESOY/junit5-example/tree/master/src/test/java/assertions)
- [assumptions](https://github.com/NESOY/junit5-example/tree/master/src/test/java/assumptions)
- [meta](https://github.com/NESOY/junit5-example/tree/master/src/test/java/meta)
- [disabled](https://github.com/NESOY/junit5-example/tree/master/src/test/java/disabled)
- [displayname](https://github.com/NESOY/junit5-example/tree/master/src/test/java/displayname)
- [timeout](https://github.com/NESOY/junit5-example/tree/master/src/test/java/timeout)
- [order](https://github.com/NESOY/junit5-example/tree/master/src/test/java/order)
- [repeat](https://github.com/NESOY/junit5-example/tree/master/src/test/java/repeat)
- [test_info](https://github.com/NESOY/junit5-example/tree/master/src/test/java/test_info)
- [test_interface](https://github.com/NESOY/junit5-example/tree/master/src/test/java/test_interface)
- [parameterized](https://github.com/NESOY/junit5-example/tree/master/src/test/java/parameterized)
- [conditional](https://github.com/NESOY/junit5-example/tree/master/src/test/java/conditional)
- [extension_model](https://github.com/NESOY/junit5-example/tree/master/src/test/java/extension_model)
- [dynamic_test](https://github.com/NESOY/junit5-example/tree/master/src/test/java/dynamic_test)
- [parallel](https://github.com/NESOY/junit5-example/tree/master/src/test/java/parallel)

## JUnit4 Migration Guide
> JUnit 4 & JUnit 5 λ™μ‹œμ— ν•  수 μ—†μ„κΉŒ?
- [Migration Sample](https://github.com/junit-team/junit5-samples#migration-samples)

#### [Maven](https://github.com/junit-team/junit5-samples/blob/master/junit5-migration-maven)
```xml



org.junit.jupiter
junit-jupiter-api
${junit.jupiter.version}
test


org.junit.jupiter
junit-jupiter-engine
${junit.jupiter.version}
test



junit
junit
${junit.version}
test


org.junit.vintage
junit-vintage-engine
${junit.vintage.version}
test

```

#### [Gradle](https://github.com/junit-team/junit5-samples/tree/master/junit5-migration-gradle)
```gradle
dependencies {
// JUnit 5
testImplementation('org.junit.jupiter:junit-jupiter:5.5.2')
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.5.2'

// JUnit 4
testImplementation("junit:junit:4.12")
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.5.2"
}
```

## JUnit5 Testing in IDE
- [Intellij](https://blog.jetbrains.com/idea/2016/08/using-junit-5-in-intellij-idea/)
- [vscode](https://code.visualstudio.com/docs/java/java-testing)

### Reference
-
- [assertThat Dependency μ—†μŒ(Hamcrest, AssertJ)](https://github.com/junit-team/junit5/issues/147)
- [Support JUnit 5 in SpringBoot Version 2.2](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.2-Release-Notes#junit-5)
- [JUnit5 in Spring - Eddy Kimλ‹˜](https://brunch.co.kr/@springboot/77)