Pytest is slow. How to speed up the tests? #1274
Unanswered
anunayasri
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hello. The template tests are designed to run the application in a subprocess after being created by the template, and wait for a timeout to return the result from the subprocess. You can try to reduce the timeout to make the test faster on a local machine since running the application should be pretty quick. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all. I am running pytest to test a single test file (
tests/templates/test_default_template.py
). It takes 1 min 30 sec to run the 7 tests in the file. Even in the CI pipeline, I noticed that few tests take more than an hour.Few tests open a browser tab with the message 'server is unavailable'.
Is there a way to speed up the tests? Specially in local. I have tried running the tests in parallel for the above mentioned file and it has given some improvement. But not sure if we should run the entire test suite in parallel.
PS: I am new to the community. If there is a doc to answer my question please point me to it.
Beta Was this translation helpful? Give feedback.
All reactions