Rayrun
← Back to Discord Forum

Problems to validate route in CI Pipeline

Hi there!

I'm having a problem running my test in CI (Gitlab). My tests are passing successfully locally (UI and headless mode), but when I send it to my CI, some tests are failing.

It's because my tests are unable to validate a route. However, this route is generated successfully. I checked the trace that is generated in the pipeline, and even though the route was generated, the test cannot validate it.

Has anyone had this type of problem? Can anyone tell me if waitForResponse only validates if the route is pending/processing? If it is finished, won't he find it? I'm thinking it could be something like this...

This thread is trying to answer question "Why are the tests unable to validate a route in the CI pipeline even though the route is generated successfully?"

3 replies

Route validation function: async awaitSuccessfulApiCallClaimID(claimID, method, status = 204) { await this.page.waitForResponse(resp => resp.url().includes(claimID) && resp.status() === status && resp.request().method() === method); }

Local headless mode:

image.png

Trace from gitlab CI

image.png

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

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 protected].