Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anishkny/realworld-e2e-test

End-to-end testing for a RealWorld React/NodeJS stack using Mocha and Chrome Puppeteer
https://github.com/anishkny/realworld-e2e-test

circleci end-to-end-testing jest nodejs puppeteer react realworld redux

Last synced: about 2 months ago
JSON representation

End-to-end testing for a RealWorld React/NodeJS stack using Mocha and Chrome Puppeteer

Awesome Lists containing this project

README

        

# RealWorld End-to-End Integration Testing

[![CircleCI](https://circleci.com/gh/anishkny/realworld-e2e-test.svg?style=shield)](https://circleci.com/gh/anishkny/realworld-e2e-test)

An end-to-end integration test example for a [RealWorld](https://realworld.io) [React](https://github.com/gothinkster/react-redux-realworld-example-app)/[NodeJS](https://github.com/gothinkster/node-express-realworld-example-app) stack using [Mocha](https://mochajs.org) and [Chrome Puppeteer](https://github.com/GoogleChrome/puppeteer).

Demonstrates spinning up both the frontend (React/Redux) and backend (NodeJS) stacks for the RealWorld Conduit webapp, and then using Mocha to drive a headless Chrome via Puppeteer.

Designed to work with [CircleCI](https://circleci.com/gh/anishkny/realworld-e2e-test).

![Screencast](https://realworld-e2e-test-assets.netlify.app/realworld-e2e-test.gif)

## Getting Started

### Prerequisites

```
Docker CE 17+ (for Mongo)
Node 7+ (for Puppeteer)
```

### Installing

Pull MongoDB image and run it
```
docker pull mongo
docker run -p 27017:27017 mongo
```

Install dependencies and start the app aka system under test (SUT)
```
npm install
npm run start
```
This step will start the backend server at port 3000 and frontend static server at port 4100. If all went well, you can navigate your browser to: http://localhost:4100/

## Running the tests

```
npm test
```

[![asciicast](https://realworld-e2e-test-assets.netlify.app/screencast-short.gif)](https://asciinema.org/a/147023?t=0)