svanoort / pyresttest

Python Rest Testing
Apache License 2.0
1.15k stars 326 forks source link

Feature request: Need a way to add a delay before or after a test #149

Closed nitrocode closed 8 years ago

nitrocode commented 8 years ago

Noticed that sometimes the login test which requires a cookie and the following tests are happening too quickly that the server doesn't recognize that the user is logged in.

I rapidly ran the curl commands (in a previous bug) to see if it caused the same issue and it did. I solved it by adding a wait between each curl call.

It would be nice to be able to add a wait between tests in msec either by commandline switch or a test config or both?

svanoort-jenkins commented 8 years ago

@nitrocode There's a delay parameter already that you can use for this. On Feb 4, 2016 9:47 AM, "burritocode" notifications@github.com wrote:

Noticed that sometimes the login test which requires a cookie and the following tests are happening too quickly that the server doesn't recognize that the user is logged in.

I rapidly ran the curl commands (in a previous bug) to see if it caused the same issue and it did. I solved it by adding a wait between each curl call.

It would be nice to be able to add a wait between tests in msec either by commandline switch or a test config or both?

— Reply to this email directly or view it on GitHub https://github.com/svanoort/pyresttest/issues/149.

nitrocode commented 8 years ago

Ah ok, I should have searched for it! Thanks.

Just a reference, the delay parameter for each test is the delay in seconds before the test is run

- test:
    - delay: 5