Add instructions for running reporting functional tests to x-pack README (#22683)

* add instructions

* rest of instructions

* pdf-image requirements

* typo

* add Ubutnu commands
This commit is contained in:
Nathan Reese 2018-09-05 13:02:28 -06:00 committed by GitHub
parent 23ed2135bf
commit 865a51de0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,6 +100,36 @@ We also have SAML API integration tests which set up Elasticsearch and Kibana wi
node scripts/functional_tests --config test/saml_api_integration/config
```
#### Running Reporting functional tests
prerequisites:
The reporting functional tests use [pdf-image](https://www.npmjs.com/package/pdf-image) to convert PDF's pages to png files for image comparisions between generated reports and baseline reports.
pdf-image requires the system commands `convert`, `gs`, and `pdfinfo` to function. Those can be set up by running the following.
```sh
//OSX
brew install imagemagick ghostscript poppler
//Ubutnu
sudo apt-get install imagemagick ghostscript poppler-utils
```
To run the reporting functional tests:
Start the test server
```sh
// Run from the directory KIBANA_HOME/x-pack
node scripts/functional_tests_server
```
Start the test runner
```sh
// Run from the directory KIBANA_HOME/x-pack
node ../scripts/functional_test_runner --config test/reporting/configs/chromium_functional.js
```
**Note** Configurations from `kibana.dev.yml` are picked up when running the tests. Ensure that `kibana.dev.yml` does not contain any `xpack.reporting` configurations.
#### Developing functional tests
If you are **developing functional tests** then you probably don't want to rebuild Elasticsearch and wait for all that setup on every test run, so instead use this command to build and start just the Elasticsearch and Kibana servers: