There are two kinds of tests in this project - unit and E2E
Unit tests are used to test individual modules within a package. While this approach is fast, it doesn't guarantee that the entire product functions correctly from a user's perspective.
On the other hand, E2E tests enable comprehensive testing of the product from the user's point of view. We rely on Playwright for E2E testing, which is integrated into rete-qa
package and comes equipped with a set of UI tests for basic framework features.
Guidelines for writing tests:
The main purpose of this tool is to conduct regression UI testing on different combinations of supported features, which are presented as individual packages and various integrations with UI frameworks.
Playwright serves as the underlying technology for this testing tool and enables it to conduct tests in three different browser types: Chromium, Firefox, WebKit.
Additionally, we test our framework on various versions of commonly used UI frameworks, such as Angular, Svelte, Vue.js, and React.js. This gives us 27 test runs across different environments as we have a matrix of browsers and framework versions
Browser \ Stack | Angular 18 | Angular 16 | Angular 14 | Angular 12 | Svelte 4 | Svelte 3 | Vue.js 3 | Vue.js 2 | React.js 18 | React.js 16 | Lit 3 |
---|---|---|---|---|---|---|---|---|---|---|---|
Chromium | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
Firefox | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
WebKit | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
npm i -g rete-qa
Don't forget to install the additional system dependencies as per the Playwright's instructions.
Run the command and wait until the projects are generated for various frameworks and their dependencies are installed
rete-qa init --deps-alias dependencies.json
where dependencies.json
(optional) is a JSON file, which should contain a mapping of dependencies
Dependencies are typically installed from npmjs using latest
tag, but you can specify a different version by providing name@version
or path to the tarball. For example, you can substitute a plugin with your own version of the plugin that has not yet been published
{
"my-rete-plugin": "../my-plugin/my-rete-plugin-1.0.0.tgz"
}
Run the tests for provided stacks (React.js, Vue.js, Angular, Svelte) and different browsers (Chromium, Firefox, WebKit)
rete-qa test