[APM] Update testing dev doc (#119804)

* [APM] Update testing dev doc

* Update x-pack/plugins/apm/dev_docs/testing.md

Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
This commit is contained in:
Kate Patticha 2021-12-06 12:44:46 +01:00 committed by GitHub
parent 6e27c4fbf9
commit 36d62f5686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,17 +23,44 @@ API tests are separated in two suites:
- a basic license test suite [default]
- a trial license test suite (the equivalent of gold+)
### Run tests with [--trial] license
```
node scripts/test/api [--trial] [--help]
```
The above command will initiate an Elasticsearch instance on http://localhost:9220 and a kibana instance on http://localhost:5620 and will run the api test against these environments.
Once the tests finish, the instances will be terminated.
### Start test server
```
node scripts/test/api --server
```
Start Elasticsearch and Kibana instances.
### Run all tests
```
node scripts/test/api --runner
```
Run all tests. The test server needs to be running, see [Start Test Server](#start-test-server).
### Update snapshots (from Kibana root)
To update snapshots append `--updateSnapshots` to the `functional_test_runner` command
```
node scripts/functional_test_runner --config x-pack/test/apm_api_integration/[basic | trial]/config.ts --quiet --updateSnapshots
```
The test server needs to be running, see [Start Test Server](#start-test-server).
The API tests are located in [`x-pack/test/apm_api_integration/`](/x-pack/test/apm_api_integration/).
**API Test tips**
- For data generation in API tests have a look at the [elastic-apm-synthtrace](../../../../packages/elastic-apm-synthtrace/README.md) package
- For debugging access Elasticsearch on http://localhost:9220 and Kibana on http://localhost:5620 (`elastic` / `changeme`)
- To update snapshots append `--updateSnapshots` to the functional_test_runner command
---