Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SortMethodsWith allows the user to choose the order of execution of the methods within a test class #386

Merged
merged 3 commits into from Apr 9, 2012

Commits on Feb 19, 2012

  1. SortMethodsWith allows the user to choose the order of execution of t…

    …he methods within a test class.
    
    The default order of execution of JUnit tests within a class
    is deterministic but not predictable. Before 4.11, the
    behaviour was to run the test methods in byte code order,
    which pre-Java 7 was mostly predictable. Java 7 (and some
    previous versions), does not guaranteee the order of execution,
    which can change from run to run, so a deterministic sort was introduced.
    As a rule, test method execution should be independent of
    one another. However, there may be a number of dependent
    tests either through error or by design. This class
    allows the user to specify the order of execution of test methods.
    
    There are four possibilities:
    
    MethodSorters.DEFAULT: the default value, deterministic, but not predictable
    MethodSorters.JVM: the order in which the tests are returned by the JVM, i.e. there is no sorting done
    MethodSorters.NAME_ASC: sorted in order of method name, ascending
    MethodSorters.NAME_DESC: sorter in order of method name, descending
    matthewfarwell committed Feb 19, 2012
    Copy the full SHA
    c610a49 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2012

  1. Copy the full SHA
    3591661 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2012

  1. 1
    Copy the full SHA
    7924760 View commit details
    Browse the repository at this point in the history