mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Observability Onboarding] Add instructions for testing to the README file (#212752)
## Summary Add instructions for testing to the README file
This commit is contained in:
parent
0da5a87207
commit
6829f07fdb
1 changed files with 83 additions and 0 deletions
|
@ -9,3 +9,86 @@ To run the stateful onboarding flows start Kibana as usual.
|
|||
## Serverless onboarding
|
||||
|
||||
To run the serverless onboarding flows start Kibana using `yarn serverless-oblt`.
|
||||
|
||||
## Development
|
||||
|
||||
### Unit Tests
|
||||
|
||||
Kibana primarily uses Jest for unit testing. Each plugin or package defines a `jest.config.js` that extends a preset provided by the `@kbn/test` package. The following command runs all onboarding unit tests:
|
||||
|
||||
```sh
|
||||
yarn jest --config x-pack/solutions/observability/plugins/observability_onboarding/jest.config.js
|
||||
```
|
||||
|
||||
You can also run a specific test by passing the filepath as an argument, e.g.:
|
||||
|
||||
```sh
|
||||
yarn jest --config x-pack/solutions/observability/plugins/observability_onboarding/jest.config.js x-pack/solutions/observability/plugins/observability_onboarding/public/application/header/custom_header.test.tsx
|
||||
```
|
||||
|
||||
### Deployment-agnostic API tests
|
||||
|
||||
The deployment-agnostic API tests are located in [`x-pack/test/api_integration/deployment_agnostic/apis/observability/onboarding`](/x-pack/test/api_integration/deployment_agnostic/apis/observability/onboarding/).
|
||||
|
||||
#### Start server and run test (stateful)
|
||||
|
||||
```sh
|
||||
# start server
|
||||
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
|
||||
|
||||
# run tests
|
||||
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --include ./x-pack/test/api_integration/deployment_agnostic/apis/observability/onboarding/index.ts
|
||||
```
|
||||
|
||||
#### Start server and run test (serverless)
|
||||
|
||||
```sh
|
||||
# start server
|
||||
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
|
||||
|
||||
# run tests
|
||||
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts --include ./x-pack/test/api_integration/deployment_agnostic/apis/observability/onboarding/index.ts
|
||||
```
|
||||
|
||||
### API integration tests
|
||||
|
||||
#### Basic config
|
||||
```sh
|
||||
# start server
|
||||
yarn test:ftr:server --config ./x-pack/test/observability_onboarding_api_integration/basic/config.ts
|
||||
|
||||
# run tests
|
||||
yarn test:ftr:runner --config ./x-pack/test/observability_onboarding_api_integration/basic/config.ts --include ./x-pack/test/observability_onboarding_api_integration/tests/index.ts
|
||||
```
|
||||
|
||||
#### Cloud config
|
||||
```sh
|
||||
# start server
|
||||
yarn test:ftr:server --config ./x-pack/test/observability_onboarding_api_integration/cloud/config.ts
|
||||
|
||||
# run tests
|
||||
yarn test:ftr:runner --config ./x-pack/test/observability_onboarding_api_integration/cloud/config.ts --include ./x-pack/test/observability_onboarding_api_integration/tests/index.ts
|
||||
```
|
||||
|
||||
### Functional Tests
|
||||
|
||||
#### Start server and run test (serverless)
|
||||
```sh
|
||||
# start server
|
||||
yarn test:ftr:server --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts
|
||||
|
||||
# run tests
|
||||
yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/onboarding/index.ts
|
||||
```
|
||||
|
||||
##### Running Individual Tests
|
||||
```sh
|
||||
yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/onboarding/index.ts/$1
|
||||
```
|
||||
|
||||
### Playwright tests (Scout)
|
||||
See [./ui_tests/README.md](./ui_tests/README.md)
|
||||
|
||||
|
||||
### Playwright tests (Ensemble)
|
||||
See [./e2e/playwright/README.md](./e2e/playwright/README.md)
|
Loading…
Add table
Add a link
Reference in a new issue