Skip to content

Measure cy code coverage #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).

![Fuel savings](images/fuel-savings.gif)

# Quick Start

```
Expand All @@ -11,6 +13,12 @@ npm start

The above commands will install dependencies and start the app. To run tests, run `npm test` on a separate command line. There are no tests written in the master branch.

**Tip:** to start the application and the mock API and open Cypress, you can use [start-server-and-test](https://github.com/bahmutov/start-server-and-test) utility.

```shell
npm run dev
```

## Testing libraries

This instance of create-react-app has been enhanced with the following testing libraries:
Expand All @@ -23,3 +31,13 @@ This instance of create-react-app has been enhanced with the following testing l
| react-test-renderer | Render React components to JSON for snapshot testing |
| redux-mock-store | Mock store for testing your redux async action creators and middleware |
| Cypress | In browser integration testing via Mocha and Chai |

## Complete code coverage with Cypress

When you run the application with `npm start` it instruments the source code using [@cypress/instrument-cra](https://github.com/cypress-io/instrument-cra) module. The code coverage is collected using [@cypress/code-coverage](https://github.com/cypress-io/code-coverage) plugin and saved in `coverage` folder.

![Coverage report](images/96.png)

For more details about code coverage, see
- [Cypress code coverage guide](https://on.cypress.io/code-coverage)
- [Complete code coverage with Cypress](https://www.cypress.io/blog/2019/08/08/webcast-recording-complete-code-coverage-with-cypress/) webinar
Loading