Pytest - How do I Pause one test case for a custom duration and keep the rest running?

252 views Asked by At

I have lots of testcase up and running with pytest. In the process of running all test cases, I want to pause at any one test case, and then I want to continue running at the test case I have paused until the end without having to run from the beginning of all test cases. So is there any way?

1

There are 1 answers

0
Jamie On

You can add a user input. It won't actually use the input for anything - it will just wait or you to type something and press enter.

Try adding:

some_variable = input("Awaiting user response")

Add this at the end of each test case so you can press a button to continue to the next test.