QuickStart Cypress
In this tutorial we'll be covering how to get started with TestModeller.io for Cypress. This is aimed for first-time users along with users who have an existing Cypress automation framework.
Install Prerequisites
Here we'll be installing all the prerequisites you need to get started with test automation in Cypress through TestModeller.io.
- Request a free Curiosity Modeller trial.
- Install node.js
- Install ChromeDriver (this needs to match the version of chrome you will be executing your tests on) and make sure you add it to your system PATH.
- Download our example Cypress project (if you don't have your own).
Test It's Working
Make sure to restart the Terminal or Command line prompt to load the new environment variables.
- Run sample automation library
- Navigate to the framework directory (this should contain the node_modules folder).
- Run npm install. This will pull down all the associated libraries required.
- On Linux / MacOS - Run ./node_modules/cypress/bin/cypress open to start the interactive cypress engine.
- On Windows we have added an npm script to start Cypress. Run npm run cypress:open from the command prompt.
- You should now see the tests present which you can execute interactively in cypress.
Scan an existing web app
Build a Model
Start creating an automation model of the system under test.
Generate Automation
Generate associated Cypress scripts for your model.
Executing Tests
Now you've generated your javascript automation scripts for Cypress, let's import them into Cypress and run them.
Create Custom Code Snippets
TestModeller.io is built with flexibility in mind. You'll often want to embed your own custom code or make calls to external libraries in your Cypress scripts. To facilitate that you can customise and create your own code snippet actions which can be overlaid on the model.