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

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

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.

[![Build Status](https://travis-ci.org/sadv1r/junit-ordered-runner.svg?branch=master)](https://travis-ci.org/sadv1r/junit-ordered-runner)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=ru.sadv1r.junit:junit-ordered-runner&metric=alert_status)](https://sonarcloud.io/dashboard/index/ru.sadv1r.junit:junit-ordered-runner)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=ru.sadv1r.junit:junit-ordered-runner&metric=coverage)](https://sonarcloud.io/component_measures?id=ru.sadv1r.junit:junit-ordered-runner&metric=coverage)
[![Known Vulnerabilities](https://snyk.io/test/github/sadv1r/junit-ordered-runner/badge.svg?targetFile=pom.xml)](https://snyk.io/test/github/sadv1r/junit-ordered-runner?targetFile=pom.xml)
[![FOSSA Status](https://app.fossa.io/api/projects/custom%2B2836%2Fgithub.com%2Fsadv1r%2Fjunit-ordered-runner.svg?type=shield)](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
}
}
```