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

Add option to sort tests based on information from @small, @medium, and @large #3748

Closed
sebastianbergmann opened this issue Jul 5, 2019 · 5 comments
Assignees
Labels
type/enhancement A new idea that should be implemented

Comments

@sebastianbergmann
Copy link
Owner

  • Tests annotated with @small should be run before tests annotated with @medium
  • Tests annotated with @medium should be run before tests annotated with @large
  • Tests annotated with @large should be run before tests not annotated with @small, @medium, or @large
@sebastianbergmann sebastianbergmann added the type/enhancement A new idea that should be implemented label Jul 5, 2019
@localheinz
Copy link
Collaborator

Should this be an additional sorting strategy, or the default?

@sebastianbergmann
Copy link
Owner Author

Additional sorting strategy, of course. Sorry for not being clear.

@sebastianbergmann sebastianbergmann changed the title Sort tests based on information from @small, @medium, and @large Add option to sort tests based on information from @small, @medium, and @large Jul 6, 2019
@epdenouden
Copy link
Contributor

epdenouden commented Jul 6, 2019

I'll make this tomorrow, if nobody is working on it already. It's a nice little reprieve from the data providers.

@epdenouden epdenouden self-assigned this Jul 6, 2019
@epdenouden
Copy link
Contributor

epdenouden commented Jul 6, 2019

Something is wrong with the execution sorting as --order-by=depends,reverse in TestCaseTest. It was an artifact of how TestCaseTest is set up and interaction between some globals-backup behaviour. Has something to do with

final class TestCaseTest extends TestCase
{
    // [...]
    protected $backupGlobalsBlacklist = ['i', 'singleton'];
    // [...]
}

and was fixed by adding a @depends between tests that are testing globals backup in sequence.

@epdenouden
Copy link
Contributor

Let me know if you'd rather have a pull request based on 8.2 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A new idea that should be implemented
Projects
None yet
Development

No branches or pull requests

3 participants