End-to-end tests with cypress (e2e-cypress)

cypress e2e testing quickstarter project

Purpose of this quickstarter

This is a cypress e2e testing project quickstarter with basic setup for Docker, Jenkins, SonarQube and OpenShift.

What files / architecture is generated?

.
├── Jenkinsfile
├── README.md
├── files
│   ├── README.md
│   ├── build
│   |   ├── tests
|   |   |   ├── acceptance
|   │   │   |   └── acceptance.spec.js
|   |   |   ├── installation
|   │   │   |   └── installation.spec.js
|   |   |   └── integration
|   │   │       └── integration.spec.js
│   |   ├── test-results
|   |   |   ├── acceptance-junit.xml
|   |   |   ├── installation-junit.xml
|   |   |   └── integration-junit.xml
│   │   └── support
│   │       ├── commands.js
│   │       └── index.js
│   ├── cypress-acceptance.json
│   ├── cypress-installation.json
│   ├── cypress-integration.json
│   ├── fixtures
│   │   └── example.json
│   ├── tests
|   |   ├── acceptance
│   │   |   └── acceptance.spec.ts
|   |   ├── installation
│   │   |   └── installation.spec.ts
|   |   └── integration
│   │       └── integration.spec.ts
│   ├── package.json
│   ├── plugins
│   │   └── index.js
│   ├── support
│   │   ├── commands.ts
│   │   └── index.ts
│   ├── tsconfig.json
│   └── tslint.json
├── init.sh
├── metadata.yml - Component metadata
└── release-manager.yml - Configuration file for the Release Manager

Frameworks used

This project is generated by Angular CLI

Usage - how do you start after you provisioned this quickstarter

Check the README.md file at root level for further instructions after the quickstarter has been provisioned.

How this quickstarter is built through jenkins

The Jenkinsfile is provisioned with this quickstarter to ease CI/CD process. In Jenkinsfile, there is the following stage:

  • stageTest - Lint the TypeScript code by running npm install and npm run lint, and transpiles it to JavaScript and run the tests with the npm run build command.

Builder agent used

This quickstarter uses Nodejs12 builder agent Jenkins builder agent.

Known limitations

For now the URL of the front end instance to test is hard-coded inside the package.json file. There should be a better solution for handing this over. It is also possible to run npm run e2e-at with an additional parameter, e.g. npm run e2e-at https://domain.com.