DRY + Better naming: Testing flavours and Github

cc @mattwr18

I would suggest that each subfolder like `/backend/`, `/webapp/`,
`/deployment/` and so on should have a file README.md. Thus, not only
gitbook will pick it up but also Github itself. Github is looking for a
file called README.md when iterating through subfolders.
This commit is contained in:
Robert Schäfer 2019-04-12 13:48:47 +02:00
parent 901f5b5b22
commit 216fc2b67c
7 changed files with 53 additions and 56 deletions

View File

@ -4,29 +4,28 @@
* [Edit this Documentation](edit-this-documentation.md) * [Edit this Documentation](edit-this-documentation.md)
* [Features](features.md) * [Features](features.md)
* [Installation](installation.md) * [Installation](installation.md)
* [Backend](backend/README.md)
* [graphql-with-apollo](backend/graphql-with-apollo/README.md)
* [GraphQL with Apollo](backend/graphql-with-apollo/graphql-with-apollo/README.md)
* [Mocking](backend/graphql-with-apollo/graphql-with-apollo/mocking.md)
* [Seeding](backend/graphql-with-apollo/graphql-with-apollo/seeding.md)
* [Import](backend/data-import.md)
* [Middleware](backend/middleware.md)
* [Webapp](webapp/README.md) * [Webapp](webapp/README.md)
* [COMPONENTS](webapp/components.md) * [COMPONENTS](webapp/components.md)
* [PLUGINS](webapp/plugins.md) * [PLUGINS](webapp/plugins.md)
* [STORE](webapp/store.md) * [STORE](webapp/store.md)
* [Component Testing](webapp/component-testing.md)
* [PAGES](webapp/pages.md) * [PAGES](webapp/pages.md)
* [ASSETS](webapp/assets.md) * [ASSETS](webapp/assets.md)
* [LAYOUTS](webapp/layouts.md) * [LAYOUTS](webapp/layouts.md)
* [Styleguide](webapp/styleguide.md) * [Styleguide](webapp/styleguide.md)
* [STATIC](webapp/static.md) * [STATIC](webapp/static.md)
* [MIDDLEWARE](webapp/middleware.md) * [MIDDLEWARE](webapp/middleware.md)
* [Backend](backend/README.md)
* [graphql-with-apollo](backend/graphql-with-apollo/README.md)
* [GraphQL with Apollo](backend/graphql-with-apollo/graphql-with-apollo/README.md)
* [Mocking](backend/graphql-with-apollo/graphql-with-apollo/mocking.md)
* [Seeding](backend/graphql-with-apollo/graphql-with-apollo/seeding.md)
* [Unit Testing](backend/unit-testing.md)
* [Import](backend/data-import.md)
* [Middleware](backend/middleware.md)
* [Testing Guide](testing.md) * [Testing Guide](testing.md)
* [Cypress](cypress/README.md) * [End-to-end tests](cypress/README.md)
* [Integration Testing](cypress/integration-testing.md) * [Frontend tests](webapp/testing.md)
* [Deployment](deployment/deployment.md) * [Backend tests](backend/testing.md)
* [Deployment](deployment/README.md)
* [CONTRIBUTING](CONTRIBUTING.md) * [CONTRIBUTING](CONTRIBUTING.md)
* [CODE OF CONDUCT](CODE_OF_CONDUCT.md) * [CODE OF CONDUCT](CODE_OF_CONDUCT.md)
* [LICENSE](LICENSE.md) * [LICENSE](LICENSE.md)

View File

@ -1,2 +1,37 @@
# cypress # End-to-End Testing
## Run Tests
To run the tests, make sure you are at the root level of the project, in your console and run the following command:
```bash
$ yarn cypress:setup
```
After verifying that there are no errors with the servers starting, open another tab in your terminal and run the following command:
```bash
$ yarn cypress:run
```
![Console output after running cypress test](../.gitbook/assets/grafik%20%281%29.png)
After the test runs, you will also get some video footage of the test run which you can then analyse in more detail.
## Open Interactive Test Console
If you are like me, you might want to see some visual output. The interactive cypress environment also helps at debugging your tests, you can even time travel between individual steps and see the exact state of the app.
To use this feature, you will still run the `yarn cypress:setup` above, but instead of `yarn cypress:run` open another tab in your terminal and run the following command:
```bash
$ yarn cypress:open
```
![Interactive Cypress Environment](../.gitbook/assets/grafik-1%20%281%29.png)
## Write some Tests
Check out the Cypress documentation for further information on how to write tests:
[https://docs.cypress.io/guides/getting-started/writing-your-first-test.html\#Write-a-simple-test](https://docs.cypress.io/guides/getting-started/writing-your-first-test.html#Write-a-simple-test)

View File

@ -1,37 +0,0 @@
# Integration Testing
## Run Tests
To run the tests, make sure you are at the root level of the project, in your console and run the following command:
```bash
$ yarn cypress:setup
```
After verifying that there are no errors with the servers starting, open another tab in your terminal and run the following command:
```bash
$ yarn cypress:run
```
![Console output after running cypress test](../.gitbook/assets/grafik%20%281%29.png)
After the test runs, you will also get some video footage of the test run which you can then analyse in more detail.
## Open Interactive Test Console
If you are like me, you might want to see some visual output. The interactive cypress environment also helps at debugging your tests, you can even time travel between individual steps and see the exact state of the app.
To use this feature, you will still run the `yarn cypress:setup` above, but instead of `yarn cypress:run` open another tab in your terminal and run the following command:
```bash
$ yarn cypress:open
```
![Interactive Cypress Environment](../.gitbook/assets/grafik-1%20%281%29.png)
## Write some Tests
Check out the Cypress documentation for further information on how to write tests:
[https://docs.cypress.io/guides/getting-started/writing-your-first-test.html\#Write-a-simple-test](https://docs.cypress.io/guides/getting-started/writing-your-first-test.html#Write-a-simple-test)

View File

@ -1,20 +1,20 @@
# Testing Guide # Testing Guide
## [Integration Testing](cypress/integration-testing.md) ## [End-to-End Testing](cypress/README.md)
To test all the pieces together, from the user perspective, we use integration tests. They also show if the the backend and the frontend are working as expected in conjunction and also if the browser likes our app. To test all the pieces together, from the user perspective, we use integration tests. They also show if the the backend and the frontend are working as expected in conjunction and also if the browser likes our app.
[more...](cypress/integration-testing.md) [more...](cypress/README.md)
## [Component Testing](webapp/component-testing.md) ## [Component Testing](webapp/testing.md)
Individual Vue Components should also be documented and tested properly. This guarantees that they are reusable and the api gets more solid in the process. Individual Vue Components should also be documented and tested properly. This guarantees that they are reusable and the api gets more solid in the process.
[more...](webapp/component-testing.md) [more...](webapp/testing.md)
## [Unit Testing](backend/unit-testing.md) ## [Unit Testing](backend/testing.md)
Expecially the Backend relies on Unit Tests, as there are no Vue Components. Expecially the Backend relies on Unit Tests, as there are no Vue Components.
[more...](backend/unit-testing.md) [more...](backend/testing.md)