Archi's Academy

GetStarted

GetStarted
Get in touch

Today let's see one of the prime features of Cypress.io, the Test Runner. Cypress runs tests in a unique interactive runner that allows us to see commands as it executes while also viewing the application under test.

So what are the components of the Test Runner?

  1. The lefthand side of the Test Runner is a visual representation of the test suite. Each test block is properly nested and each test, when clicked, displays every Cypress command and assertion executed within the test’s block as well as any command or assertion executed in relevant before, beforeEach, afterEach, and after hooks.

  2. Each command and assertion, when hovered over, restore the Application Under Test (righthand side) to the state it was in when that command was executed. This allows you to ‘time-travel’ back to previous states of your application when testing.

By default, Cypress keeps 50 tests worth of snapshots and command data for time traveling. Cypress prints several pieces of information when an error occurs during a Cypress test: Error name, Error message, Learn more, Code frame file, Code Frame, View stack trace, and Print to console button. For more details, please visit https://www.cypress.io/

aswathi-prathap-archis-traimee

Aswathi Prathap

Friday, Jan 8, 2021