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

Order test execution #3736

Closed
Formartha opened this issue Jul 30, 2018 · 8 comments
Closed

Order test execution #3736

Formartha opened this issue Jul 30, 2018 · 8 comments
Labels
type: question general question, might be closed after 2 weeks of inactivity

Comments

@Formartha
Copy link

Hi folks,

I tried searching about it, but I found very little information.
my use case relays on the fact that I need to order couple of test cases to run one after the other.

what I did till now is to provide numbering and the 0-9, A-Z kicked in and it worked.
however, I'm sure that it's not the correct way to go..

any plugin that does it? any other way of doing it?

Thanks,
-M

@pytestbot
Copy link
Contributor

GitMate.io thinks possibly related issues are #2861 (Question re: order of execution of test fixtures), #2305 (Sandboxed test execution fails when any plugin is installed), #1527 (show deselected info after collected info and before test execution), #805 (Fixture execution order ), and #3198 (Ignore individual tests).

@pytestbot pytestbot added the type: question general question, might be closed after 2 weeks of inactivity label Jul 30, 2018
@RonnyPfannschmidt
Copy link
Member

https://pytest-ordering.readthedocs.io/en/develop/ is one way that exists

@Formartha
Copy link
Author

Thanks @RonnyPfannschmidt! the problem is, that in our setup, we are using 1-file per test.
So, it won't work :(

@RonnyPfannschmidt
Copy link
Member

@Formartha please elaborate your use case a bit more in detail, without at least a basic idea of the structure i cant give sound advise

@Formartha
Copy link
Author

Sure,
my use case is that I have a lot of tests but all of them are 1 test per 1 file.
I'm giving pytest the ability to pick up all the tests from a directory and start execution.

In reality, pytest knows what's the amount of collected tests and should support execution by parameter.

@RonnyPfannschmidt
Copy link
Member

unfortunately thats a description of technical and structural details including a proposed solution,
a use-case description avoids that

to explain why i understood i that way i will present a analogy
from my point of view what you presented did read like user can log in using kerberos thats configured for server x to me - what i was looking for was something reading like ´users can log in using a trusted 3rd party service

@Formartha
Copy link
Author

Sorry, I didn't got your response..

the use case is as I wrote.
as a user, I would like to run multiple permutations of test locations (test class with tests in it, test file etc.) and set the priority of all the collected test cases.

@Zac-HD
Copy link
Member

Zac-HD commented Oct 19, 2018

The pytest-ordering plugin allows you to set test case priority.

@Zac-HD Zac-HD closed this as completed Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question general question, might be closed after 2 weeks of inactivity
Projects
None yet
Development

No branches or pull requests

4 participants