Category:
Cypress
Basic Test Script
// test suite name
describe('Cypress Test Suite', function () {
// Test case
it('My First Cypress Test Case', function (){
// test step for URL launching
cy.visit("https://www.google.com/");
});
});
Test Execution
For execution from the command line, run the command given below −
./node_modules/.bin/cypress run
All the files within the integration folder get triggered.
For execution from the Test Runner, run the command stated below −
./node_modules/.bin/cypress open
Then, click on the spec file that we want to trigger for execution.
To trigger execution for a specific file from command line, run the command mentioned below −
cypress run --spec ""