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
- Host: GitHub
- URL: https://github.com/nesoy/junit5-example
- Owner: NESOY
- Created: 2019-11-01T05:25:54.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-22T09:04:01.000Z (over 5 years ago)
- Last Synced: 2025-03-26T01:44:17.416Z (10 months ago)
- Topics: example, testing
- Language: Java
- Homepage:
- Size: 387 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)