Up until now, I've found it impossible to create tests purely based on a response from an endpoint. My goal is to hit an endpoint, and based on its response, perform subsequent tests.
For example, suppose I get a response in a "before" step that contains 150 URLs. I would like to create a test for an array of those URLs, such as using array.forEach(). However, this approach seems to result in the framework (be it Cypress or any other) not recognizing the tests.
So, in essence, is there a way to create tests if we don't know in advance how many tests there will be?
I do have a workaround for this: I perform the main request, get the response with the 150 URLs, and within the same test, I make requests and checks for each of these URLs. This approach works in both Cypress and Playwright, but I can't split them into individual tests or "it" blocks (in the case of Cypress).
This thread is trying to answer question "Is there a way to create tests if we don't know in advance how many tests there will be?"
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 email@example.com.