I am trying to integrate test rail with cypress to auto update the Test Case status. I followed the steps as mentioned: https://www.npmjs.com/package/cypress-testrail-reporter But I see the following error in cypress run: EPROTO 140623370270312:error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL:../../third_party/boringssl/src/ssl/handshake_client.cc:581: Is this because the Test Rail set up done in domain? Answer Please add the following configurations in cypress.json } Do let me know if
Tag: cypress
What is the difference between import and cy.fixture in Cypress tests?
I’m learning cypress and I don’t understand what differs from import file from ‘../fixtures/filepath/file.json’ a fixture file and calling cy.fixture(file), and when should I use each one. Answer Basically when you say import file from ‘../fixtures/filepath/file.json’ you can use the imported file in any of methods in the particular javascript file. Whereas if you say cy.fixture(file.json), then the fixture context
Is there a way to force cypress to open in same tab instead of another tab
I know one of Cypress’ trade-offs is testing on multiple tabs. However, our website default to opening another tab. Can I force Cypress to open on same tab to continue my tests? I have this code below but still opens a new tab: I remember finding it somewhere that it can be done but my 1am brain is unable to
Cypress – get value from json response body
I’m using Cypress to do some API testing, but I am struggling to access values in the JSON response body; however I can perform assertions against the body which suggests it’s receiving it correctly. Below I am trying to assign the JSON body (response.body) and then get the value of ‘id’ out of it: I’ve done numerous searches and can’t
Cypress: Run all specs but create a loop without run specs
I have a problem with Cypress.io, here is my problem : I have 4 different test files here : integration/socle_full_ts_dev/1_register_user.spec.js integration/socle_full_ts_local/1_register_user_local.spec.js integration/socle_full_ts_local/2_login_user_local.spec.js integration/socle_full_ts_dev/2_login_user.spec.js And the problem that I meet is that when I want to launch all the tests at the same time it turns in a loop and does not get out of it. I checked the web to
Cypress: Re-use auth token across multiple API tests
I have a Rest API which generates a token. This session token is used across multiple REST API’s as an authorization Bearer token. I used this as reference: https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/logging-in__jwt/cypress/integration/spec.js However, in that example, the function to generate token is embedded in the test. I tried to create a custom command for which should store locally but it is not being
Get native HTML element in Cypress
How do I get an underlying native HTMLElement (or Element or Node…) from a Cypress query? I would like to access the native HTMLElement instance in el. I have tried el[0] but the result is of type any. Answer In cypress, first() is a command that will be chained to .get() and retry for that whole selection until timeout. That
Is there a reliable way to have Cypress exit as soon as a test fails?
We have a large test suite running on a CI server, and there appears to be no way of telling Cypress to exit if a test fails. It always runs the entire suite. There is some discussion here, but no workable solution. Is there a reliable way to have Cypress exit as soon as a test fails? Answer As you’ve
How to test a bad request in cypress
I am testing logging in POST method in cypress with incorrect credentials. this returns 400 bad requests which I need to test. This is what I have: The request that was sent: This is the response I get: I’d like to know what is in the response or body Answer The answer to your question is in the error message:
How to reuse a function from an existing Cypress test, and call it in a new one?
I have the following function, which is inside a parent function. I have many uses for this random string generator, inside of other test files for different scenarios. Instead of having to copy and paste this each time, I want to reuse this function and call it inside another test file. How should I set this up? I tried to