Skip to main content

Cypress integration

How to integrate Katalon and Cypress with our sample project

  • Make sure that Cypress and Node are installed on your machine.

  1. Copy our sample GitHub repository by git clone.
  2. Go inside the project by running cd Katalon-Cypress-Integration.
  3. Execute the command to run: cd cypress && npm install && npm test

How to integrate Katalon and Cypress by creating your own project

  1. Create a new folder which will host your cypress project, for example, Cypress Demo.
  2. Go inside that folder, by running cd Cypress Demo.
  3. Run npm init so that the project folder gets the package.json file.
  4. Read through this Cypress documentation.
  5. Open Cypress by running npx cypress open
  6. Create a new spec file and name it as EndToEnd.spec.js, edit that spec file with VS Code and ensure that your test script is ready and running.
  7. Open the file package.json and add the following dependencies and script:
    

scripts


    "scripts": { "build": "tsc", "test": "node cypress-cli.js" },
    

 dev dependencies


    "devDependencies": { "cypress": "^10.9.0", "@tsconfig/node10": "^1.0.9", "typescript": "^4.1.3" },
    

 dev dependencies


    "dependencies": { "@katalon/testops-cypress": "^1.2.2" }
  8. Copy testopsconfig.json from here and cypress - cli file.
  9. Run the command for execution: cd cypress && npm install && npm test.
Was this page helpful?