QuickStart Cypress

    QuickStart Cypress


    Article summary

    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.

    1. Request a free Curiosity Modeller trial.
    2. Install node.js
    3. 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.
    4. Download our example Cypress project (if you don't have your own).
      • You can download the framework from out GitHub repo here.
        • In this tutorial we'll be using the xpath extension to cypress. Follow instructions here to add xpath support. This is already included in our sample project.

    Test It's Working

    Make sure to restart the Terminal or Command line prompt to load the new environment variables.

    1. 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.