From d08c1ac66cad45216a446a8b86d0c8c386d24dae Mon Sep 17 00:00:00 2001 From: Rasheed Amir Date: Fri, 28 Jun 2019 16:44:44 +0200 Subject: [PATCH] Fix testing (#30) * break testing into backend and frontend * remove duplicated text --- .vuepress/config.js | 3 ++- testing/{testing.md => backend.md} | 27 ------------------------- testing/frontend.md | 32 ++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 28 deletions(-) rename testing/{testing.md => backend.md} (97%) create mode 100644 testing/frontend.md diff --git a/.vuepress/config.js b/.vuepress/config.js index f43ac2a..431a40e 100644 --- a/.vuepress/config.js +++ b/.vuepress/config.js @@ -62,7 +62,8 @@ module.exports = { { title: 'Testing', children: [ - '/testing/testing' + '/testing/backend', + '/testing/frontend' ] }, { diff --git a/testing/testing.md b/testing/backend.md similarity index 97% rename from testing/testing.md rename to testing/backend.md index feb011d..853bec0 100644 --- a/testing/testing.md +++ b/testing/backend.md @@ -234,33 +234,6 @@ Tests should be automated as part of the build, release, run (delivery) pipeline These three sets of tests, combined, should provide an extremely high level of confidence that any introduced change has not broken existing functionality. -# Frontend Testing (Microfrontends) - -Usually question arises how to test frontend? - -### 1 Unit Tests - -- Business logic unit tests - -### 2 Component Tests - -- e.g. click on button should open a date picker - -### 3 Integration Tests - -- Most of the tests should be written at this level -- Test/verify the accepted user scenarios -- CDC from frontend to backend? - -### 4 E2E Tests - -- Recommended to use Cypress - -### 5 Best Practices - -- Test as a user; never test underlying implementation details; so, one can easily switch the technology -- https://testing-library.com/ - # References * https://martinfowler.com/articles/microservice-testing/ diff --git a/testing/frontend.md b/testing/frontend.md new file mode 100644 index 0000000..d290181 --- /dev/null +++ b/testing/frontend.md @@ -0,0 +1,32 @@ +# Frontend Testing (Microfrontends) + +Usually question arises how to test frontend? + +### 1 Unit Tests + +- Business logic unit tests + +### 2 Component Tests + +- e.g. click on button should open a date picker + +### 3 Integration Tests + +- Most of the tests should be written at this level +- Test/verify the accepted user scenarios +- CDC from frontend to backend? + +### 4 E2E Tests + +- Recommended to use Cypress + +### 5 Best Practices + +- Test as a user; never test underlying implementation details; so, one can easily switch the technology +- https://testing-library.com/ + +# References + +* https://martinfowler.com/articles/microservice-testing/ +* https://www.thoughtworks.com/insights/blog/architecting-continuous-delivery +* https://vrockai.github.io/blog/2017/10/28/cypress-keycloak-intregration/