Mark slow tests to allow for quicker iteration - #655
Conversation
|
I wonder if these are the only tests which are slow, I was thinking if there is a more definative way to figure out slow tests and mark them accordingly? and seems like pytest has a way to figure that out https://docs.pytest.org/en/stable/how-to/usage.html#profiling-test-execution-duration |
|
We even have that enabled in our test playbook: |
|
Migration is probably #661, the other is failing on: I don't see how that could be caused by my changes. |
It not i think, failure seems unrelated |
|
A note in our developer documentation about our use of |
|
I added some documentation, but wasn't quite sure about how to describe when to use the marker. I'm not sure if we need to provide that context now. |
I was kinda hoping for that description. Ideally something like "tests longer than 1 minute can (or should) be marked as slow" for example. I can see it both as being a good heuristic to have a "time" based component, but also a way for us to grab the list of slow tests for analysis sometime in the future. This is not a hard requirement on my part, just thinking out loud. |
|
Slow is always relative. I wanted to avoid that. |
|
You'll need a rebase here to fix tests. |
You can now skip them with:
pytest -k "not slow"
|
I tried to be a bit more creative now in the docs. Also couldn't resist adding links to the section above it. |
Why are you introducing these changes? (Problem description, related links)
While working on #511 I wanted to quickly run tests again and again. The full service restart is slow and not really something I was interested in.
What are the changes introduced in this pull request?
You can now skip slow tests with:
How to test this pull request
Steps to reproduce:
Checklist