Hi everyone, I have a test where it requires a few creation process in another microservice. Once the creation is finished, it takes a varied amount of time (30s to 2mins) to present the changes in my service.
In this situation, how do you guys usually tackle the test? My previous attempt has been to use wait 60s, after the creation to commence the test.
This thread is trying to answer question "How to tackle a test setup that requires a long wait time due to a creation process in another microservice?"
perhaps leverage project dependencies with a project that sets that up for you with the necessary testTimeout: https://playwright.dev/docs/test-global-setup-teardown#project-dependencies
IMHO, do not use hard timeouts because if your setup takes 30s, you'd always wait for 2 minutes or more regardless. Better to leverage expects or
waitFor() to make sure you move as soon as the desired state is achieved
Specifcally take a look at expect.poll() https://playwright.dev/docs/test-assertions#expectpoll
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email firstname.lastname@example.org.