You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenSearch Dashboards uses [Jest](https://jestjs.io/) for unit and integration tests and [Selenium](https://www.selenium.dev/) for functional tests.
15
+
OpenSearch Dashboards uses [Jest](https://jestjs.io/) for unit and integration tests, [Selenium](https://www.selenium.dev/) for functional tests, and [Cypress](https://www.cypress.io/) for backwards compatibility tests.
15
16
16
-
In general, we recommend three tiers of tests:
17
+
In general, we recommend four tiers of tests:
17
18
* Unit tests: Unit tests: small and modular tests that utilize mocks for external dependencies.
18
19
* Integration tests: higher-level tests that verify interactions between systems (eg. HTTP APIs, OpenSearch API calls, calling other plugin).
19
20
* End-to-end tests (e2e): functional tests that verify behavior in a web browser.
21
+
* Backwards Compatibility tests: cypress tests that verify any changes are backwards compatible with previous versions.
20
22
21
23
# Requirements
22
24
* Install the latest NodeJS, [NPM](https://www.npmjs.com/get-npm) and [Yarn](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
@@ -48,7 +50,20 @@ To debug functional tests:
48
50
Say that you would want to debug a test in CI group 1, you can run the following command in your environment:
This will print of an address, to which you could open your chrome browser on your instance and navigate to `chrome://inspect/#devices` and inspect the functional test runner `scripts/functional_tests.js`.
53
+
This will print off an address, to which you could open your chrome browser on your instance and navigate to `chrome://inspect/#devices` and inspect the functional test runner `scripts/functional_tests.js`.
54
+
55
+
### Backwards Compatibility tests
56
+
To run all the backwards compatibility tests on vanilla OpenSearch Dashboards:
57
+
58
+
`yarn test:bwc -o [test path to opensearch.tar.gz] -d [test path to opensearch-dashboards.tar.gz]`
59
+
60
+
To run all the backwards compatibility tests on bundled dashboards, pass the bundle parameter to the test:
61
+
62
+
`yarn test:bwc -o [test path to opensearch.tar.gz] -d [test path to opensearch-dashboards.tar.gz] -b true`
63
+
64
+
To run specific versions' backwards compatibility tests, pass the versions to the test:
65
+
66
+
`yarn test:bwc -o [test path to opensearch.tar.gz] -d [test path to opensearch-dashboards.tar.gz] -v "[test versions]"`
52
67
53
68
### Additional checks
54
69
Make sure you run lint checker before submitting a pull request. To run lint checker:
@@ -70,5 +85,4 @@ By default the version of OpenSearch Dashboards will pull the snapshot of the sa
70
85
Although Jest is the standard for this project, there are a few Mocha tests that still exist. You can run these tests by running:
71
86
`yarn test:mocha`
72
87
73
-
However, these tests will eventually be migrated. Please avoid writing new Mocha tests. For further questions or to check the status please see this [issue](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/215).
74
-
88
+
However, these tests will eventually be migrated. Please avoid writing new Mocha tests. For further questions or to check the status please see this [issue](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/215).
0 commit comments