Skip to content

Commit

Permalink
[APM] Update testing dev doc (elastic#119804) (elastic#120469)
Browse files Browse the repository at this point in the history
* [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>

Co-authored-by: Kate Patticha <kate@kpatticha.com>
Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
  • Loading branch information
3 people committed Dec 6, 2021
1 parent fbebe24 commit f9bb6bc
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion x-pack/plugins/apm/dev_docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

---

Expand Down

0 comments on commit f9bb6bc

Please sign in to comment.