Coder Social home page Coder Social logo

mtlynch / hello-world-cypress Goto Github PK

View Code? Open in Web Editor NEW
55.0 3.0 64.0 32 KB

A simple example of using Cypress.io for end-to-end testing

Home Page: https://mtlynch.io/painless-web-app-testing/

License: MIT License

Dockerfile 3.43% JavaScript 14.76% Go 81.80%
cypress e2e-tests docker docker-compose

hello-world-cypress's Introduction

hello-world-cypress

Overview

This repo shows a basic example of using Cypress and Docker Compose to create simple end-to-end tests for any web application. This example uses a Go application, but you can reuse the pattern in this repository for any web application that can run in Docker.

For more information, see the blog post, "Easy End-to-End Testing with Cypress."

Run the test app

The example application is called Sentimentalyzer, a very rudimentary text sentiment analyzer. To run it, enter the following commands:

docker build --tag sentimentalyzer .
docker run \
  --interactive \
  --tty \
  --env PORT=8123 \
  --publish 8123:8123 \
  sentimentalyzer

The app will be running on localhost:8123.

Run end-to-end tests

To execute the end-to-end tests for Sentimentalyzer, enter the following commands:

cd e2e
docker-compose up --abort-on-container-exit --exit-code-from cypress

When the command completes, you will see test output on the console and a video of the test run will appear in the folder e2e/cypress/integration/videos.

Other branches

This repo contains several branches to demonstrate different Cypress scenarios:

Scenario Branch
Basic Cypress example master
Using Cypress with Chrome browser chrome
Running Cypress from within Circle CI circle
Running Cypress from within Travis CI travis
Running Cypress in interactive mode interactive

hello-world-cypress's People

Contributors

adityamangal1 avatar divinity76 avatar mtlynch avatar tecfu avatar the-alchemist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hello-world-cypress's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.