https://github.com/sadv1r/junit-ordered-runner
Custom runner for JUnit that allows the user to specify the order of methods execution within a test class
https://github.com/sadv1r/junit-ordered-runner
junit junit-runner test
Last synced: over 1 year ago
JSON representation
Custom runner for JUnit that allows the user to specify the order of methods execution within a test class
- Host: GitHub
- URL: https://github.com/sadv1r/junit-ordered-runner
- Owner: sadv1r
- License: mit
- Created: 2019-02-11T21:37:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-17T21:02:27.000Z (over 3 years ago)
- Last Synced: 2025-01-03T21:43:17.107Z (over 1 year ago)
- Topics: junit, junit-runner, test
- Language: Java
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
JUnit Ordered Runner
====================
This little project is designed to give the ability to specify the order of methods execution within a test class.
[](https://travis-ci.org/sadv1r/junit-ordered-runner)
[](https://sonarcloud.io/dashboard/index/ru.sadv1r.junit:junit-ordered-runner)
[](https://sonarcloud.io/component_measures?id=ru.sadv1r.junit:junit-ordered-runner&metric=coverage)
[](https://snyk.io/test/github/sadv1r/junit-ordered-runner?targetFile=pom.xml)
[](https://app.fossa.io/projects/custom%2B2836%2Fgithub.com%2Fsadv1r%2Fjunit-ordered-runner?ref=badge_shield)
Installation
==========================
```xml
ru.sadv1r.junit
junit-ordered-runner
${dep.junit-ordered-runner.version}
test
```
Usage
====================================
```java
@RunWith(OrderedRunner.class)
public class YourTest {
@Test
@Order(1)
public void needToBeFirst() {
// Test code
}
@Test
@Order(3)
public void needToBeThird() {
// Test code
}
@Test
public void withoutOrder() {
// Test code
}
@Test
@Order(2)
public void needToBeSecond() {
// Test code
}
}
```