Skip to content
Advertisement

Tag: cypress

Has anyone integrated Test Rail with Cypress ? I am looking to auto update the status of test case

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

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

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

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:

Advertisement