← 输入框|github.com|刷新
Skip to content

Random order of test execution #422

Closed

Description

@Pazus

Define suite level annotation to shuffle tests on execution

Activity

  1. self-assigned this
    on Jul 24, 2017
  2. jgebal commented on Jul 26, 2017

    @jgebal
    Member

    It should be a runtime paramerer I think.
    This way you can easily check for test independency.
    Also, do we want to have random or simply reverse order?

  3. mathewbutler commented on Jul 26, 2017

    @mathewbutler
    Contributor

    On of the principles of xunit test approaches is that tests should be independent and so relying on ordering of tests (outside of before or beforeall annotation) is considered "a bad thing".

    Maintaining independent tests means that it is easier to diagnose failed test since the programmer only needs to look at a single test scope to understand everything needed to diagnose.

    Enabling this capability feels like a change in direction of ethos of a test suite.

    Just my 0.2c 😀

  4. added this to the v3.1.0 milestone on Aug 5, 2017
  5. jgebal commented on Aug 31, 2017

    @jgebal
    Member

    That is why it should be a runtime parameter, not an annotation I think.
    Order (random or not) should not be part of test-suite definition.

    I love the idea of random or even simply reverse order of execution in suite.
    The ordering should not affect the setup/cleanup order though.

  6. jgebal commented on Oct 24, 2017

    @jgebal
    Member

    Enabling this capability feels like a change in direction of ethos of a test suite

    @mathewbutler - It would definitely be a positive change.

  7. mathewbutler commented on Oct 25, 2017

    @mathewbutler
    Contributor

    @jgebal I’m just saying that we shouldn’t introduce anything that enables a repeatable order of execution of tests. Random is by definition not reliably repeatable, so fine.

  8. removed this from the v3.1.0 milestone on Feb 5, 2018
  9. Shoelace commented on Oct 9, 2018

    @Shoelace
    Member

    if a 'random' option is available at runtime (or annotation) then maybe a seed number should be output somewhere and allowed to be passed in should you need to recreate a "random run" to diagnose the issue.

  10. lwasylow commented on Feb 26, 2019

    @lwasylow
    Member

    Is this still planned?

  11. jgebal commented on Feb 26, 2019

    @jgebal
    Member

    Yes. And this feature should be quite easy to implement now (hopefully) since the suote is build by running SQL on cache.
    The only thing to confirm is that it will not have negative impact on clients (SQLDeveloper)

  12. PhilippSalvisberg commented on Feb 26, 2019

    @PhilippSalvisberg
    Member

    The SQL Developer extension does not directly executes the tests. It just calls ut.run or ut_runner.run. Everything is fine as long as it can rely on the sort order provided by the reporters.

  13. added this to the v3.1.7 milestone on Mar 26, 2019
  14. added a commit that references this issue on Mar 26, 2019
    23da3d7
  15. added a commit that references this issue on Jun 18, 2019
    1a5c525
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions