[go: up one dir, main page]

Skip to content

Custom runner for JUnit that allows the user to specify the order of methods execution within a test class

License

Notifications You must be signed in to change notification settings

sadv1r/junit-ordered-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 Quality Gate Coverage Known Vulnerabilities FOSSA Status

Installation

<dependency>
    <groupId>ru.sadv1r.junit</groupId>
    <artifactId>junit-ordered-runner</artifactId>
    <version>${dep.junit-ordered-runner.version}</version>
    <scope>test</scope>
</dependency>

Usage

@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
    }
}

About

Custom runner for JUnit that allows the user to specify the order of methods execution within a test class

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages