Skip to content

shelterbox/Mendix-app-testing-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mendix app testing 🧪

Automated client-side testing using Cypress JS.

How to setup 💾

This repository is used to create/manage/run automated test in Cypress for Mendix applications.

  1. To start, you need to Git clone this repository into your local environment.
  2. Once done, you need to download and install Node.js LTS (Long term support).
  3. After Node is installed, you need to download all the Node dependencies to your local copy of the repository. This is done by opening a command line, navigating to the cloned repository file, and running the command...
npm install
  1. Now you have the dependencies downloaded, you can open the Cypress interface by running the command...
npm run cypress open

How to use effectively 📕

Controlling environments/users 🌎

All test constants are stored in the cypress.env.json file. The general layout should be as shown below...

{
  "host": <url>,
  "user": {
    <username>: <password>
  }
}

Folder structure 📁

All Cypress tests and other custom written files are contained in the ./Cypress/ directory.

  • ./Cypress/fixtures/ contains all the test files. For this template, we don't currently require any testing assets
  • ./Cypress/integration/contains all the test scripts. For this template, I have stored all the Mendix tests in ./Cypress/integration/mendix.
  • ./Cypress/plugins/ contains all the Node package imports. For this template, I don't depend on any other packages therefore, it's empty.
  • ./Cypress/support/ contains all the custom written commands. For this template, I have created three methods. cy.login(<appName>, <username>), cy.goto(<appName>) and cy.logout(<appName>), which example usage can be found here.

Useful resources 📖

There are plenty of easy to use documentation for Cypress on their page here.

Also, there are Getting started guides, that lead you step-by-step on creating and understanding how tests work, which you can find here.

About

Automated client-side testing using Cypress JS.

Resources

Stars

Watchers

Forks