Skip to content

Testing with Cypress

Jinho Yoon edited this page Aug 1, 2022 · 5 revisions

Introduction

For end-to-end testing, Neon uses the testing framework Cypress. It offers a nice GUI and many debugging tools for UI-related issues.

Testing is currently being developed on the cypress-fix branch. Remember to run yarn install to ensure that Cypress has been installed.

The Cypress tests can be run with two commands:

Open Cypress's testing GUI:

yarn cypress:open

After running the command, a Cypress window should open, and there should be two options. Click on "E2E Testing".

Cypress GUI

Run tests on the terminal:

yarn cypress:run

Cypress GitHub Action

Cypress tests run automatically when you push to any branch of Neon (excluding the gh-pages branch). The first thing you will see when you see your commit on GitHub is a checkmark or an x mark, depending on whether the Cypress tests failed or not.

Commits

You can click on the checkmark / x mark for more details: Example

GitHub Action result

More detailed output of tests can be viewed by clicking the job "E2E on Chrome" on the left sidebar.

Cypress has extensive documentation and examples for all its functionality. Check them out!