Skip to content

matthew-js-porter-learning/cypress-example

Repository files navigation

Cypress Example

This is example of using Cypress for End to End UI Testing and was created using Create React App. This project includes a Github Workflow that deploys to a static S3 Site and runs the test against it.

Run Cypress Tests

Start Development Server

To start the development server run the following command

npm start

The application will be available at http://localhost:3000

Run Cypress Tests

To run the Cypress tests, run the following command.

npm run cypress:run

To open the Cypress run

npm run cypress:open

Deploy

Cloudformation

First create the S3 Bucket.

aws cloudformation update-stack --stack-name cypress-example --template-body file://aws/cloudformation.yml

Deploy to S3

npm run build
aws s3 sync build s3://cypress-example

Run Tests against remote server

export CYPRESS_BASE_URL=http://cypress-example.s3-website-us-east-1.amazonaws.com
npm run cypress:run

About

An Example on how to setup and run Cypress tests for a React application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published