Cypress Articles

Found 8 articles

How to implement tags in Cypress?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 19-Nov-2021 1K+ Views

We can implement tags in Cypress. Cypress has tags - .only and .skip. While the .only tag is utilized to execute the it block to which it is tagged, the .skip tag is utilized to exclude the it block to which it is tagged.ExampleImplementation with .onlydescribe('Tutorialspoint', function()    //it block with tag .only    it.only('First Test', function() {       cy.log("First Test")    })    //it block with tag .only    It.only('Second Test', function() {       cy.log("Second Test")    })    it('Third Test', function() {       cy.log("Third Test")    }) })Execution ResultsThe output ...

Read More

Explain the working of Cypress.

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 19-Nov-2021 214 Views

The below diagram explains the working of the Cypress −Automation tools like Selenium work by running outside the browser. However, Cypress has a different architecture. It runs within the browser. Cypress is based on the server - Node.js.There is a continuous interaction of Cypress with the Node.js and they work in – coordination with each other. As a result, Cypress can be utilized for testing both the front and backend of the application.Cypress is thus capable of handling the tasks performed in a real-time on the UI and simultaneously perform actions outside of the browser. The basic differences between Cypress ...

Read More

How to create a teamcity report in Cypress?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 19-Nov-2021 859 Views

We can create a teamcity report in Cypress. To install the package for teamcity report, run the command −   npm install cypress-teamcity-reporter --save-devTo generate a report for all specs in the integration folder of the Cypress project, run the command −   npx cypress run --reporter teamcity

Read More

How to create a Junit report in Cypress?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 19-Nov-2021 3K+ Views

We can create a Junit report in Cypress. To install the package for the JUnit report, run the command −   npm install cypress-junit-reporter --save-devExampleImplementation in cypress.json{ "reporter": "junit", "reporterOptions": { "mochaFile": "cypress/results/results.xml", "toConsole": true } }If we run multiple tests in a run and wish to have a unique report for individual spec files, we have to add [hash] in the mochaFile parameter in cypress.json.ExampleImplementation in cypress.json to avoid overriding report{ "reporter": "junit", ...

Read More

Dynamic Dropdown verification with Cypress

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 05-Aug-2020 2K+ Views

There are numerous types of dropdowns on the webpage. The types of dropdowns are static and dynamic. While the static dropdowns have with the tag, the dynamic dropdowns generally have the or tags.The static dropdowns having the tag is handled in Cypress with the help of the in built command called the select(). The dynamic dropdowns are mostly the auto suggestive dropdown where on typing the first few letters of our search, a list of suggested items get displayed.The logic is to type a few characters inside the dynamic dropdown. Based on that a list of ...

Read More

Get and Find commands in Cypress

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 05-Aug-2020 2K+ Views

Cypress has the get() and find() methods to find elements based on locators on the page. The objective achieved by these two methods are almost identical. The get() method fetches one or a list of web elements with the help of the css locators specified as a parameter to that method.Syntaxcy.get(selector, args)The second parameter of the get() method is optional. There can be of three types of parameter as listed below −log − The default value of log parameter is true. This determines if there will be logging of the command on the console.cy.get('.product', { log: false });withinSubject − The ...

Read More

Handling with only visible elements in Cypress

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 05-Aug-2020 1K+ Views

After a test case is run on Cypress, we need to debug and understand the logs in case of a failure. Cypress has the feature to provide information to the user on what incident took place before and after the failure had happened.The above screenshots show a full log of the test cases executed with pass/ fail results. If we investigate more into the step by clicking on it, the element on which an action has been performed gets highlighted with a red circle. For example the type command in the screenshot.On further investigation we found out that we have ...

Read More

What is Cypress for Test Automation?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 05-Aug-2020 2K+ Views

Cypress is the future tool for testing front end modern web applications. It aims to overcome the hurdles that the engineers and developers face while testing web applications based on React and AngularJS. It is a quick, effortless and dependable tool for testing any applications that run on browsers.Cypress is commonly compared with Selenium. But there are a lot of differences between Cypress and Selenium in terms of architecture and foundation. Cypress is targeted for the purposes listed below −Unit TestingIntegration TestingEnd to End flow TestingThus Cypress is used to test a wide range of applications that are operational in ...

Read More
Showing 1–8 of 8 articles
« Prev 1 Next »
Advertisements