kibana/test/plugin_functional
Liza Katz 59e60118bc
[Search] Client side session service (#76889) (#80808)
* Add a session service and use it in discover and dashboard

* check unefined

* Start session in visualize

* Fix tests

* docs

* OSS error alignemnt

* Adjust error messages in xpack

* Add getErrorMessage

* Use showError in vizualize
Add original error to expression exception

* Cleanup

* ts, doc and i18n fixes

* Fix jest tests

* Fix functional test

* functional test

* ts

* Update functional tests

* Add unit tests to interceptor and timeout error

* expose toasts test function

* doc

* typos

* lint

* Cleanup

* review 1

* Code review

* doc

* doc fix

* visualization type fix

* fix jest

* Fix xpack functional test

* fix xpack test

* code review

* Add tracking methods to session service

* remove chromium

* Fix ts and jest tests

* jest + docs

* ts fix

* siem test

* Use session service to show a timeout notification per session + more unit tests

* ts and docs

* Remove session service from search source (not needed)

* Code review

* ts

* Single active session in FE session service

* Cleanup

* Don't integrate with dashboard \ visualize
Add functional tests for session toast plugin

* Typescript

* ts

* Improve functional tests

* es

* simplify filter test

* wait until loadedw

* filter test

* delete crypto for now

* Select the correct index 🤦

* timerange

* Adjust functional test logic

* improved test format @dosant

* Handle exceptions

* Don't close sessions automatically, warn instead

* jest

* Adjust functional test

* Remove unused code

* delete export

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-16 14:57:32 +03:00
..
plugins [Search] Client side session service (#76889) (#80808) 2020-10-16 14:57:32 +03:00
services [KP] Expose new es client (#73651) (#73840) 2020-07-30 21:09:14 +02:00
test_suites [Search] Client side session service (#76889) (#80808) 2020-10-16 14:57:32 +03:00
config.ts Allow routes to specify the idle socket timeout in addition to the payload timeout (#73730) (#75350) 2020-08-19 06:50:29 -07:00
README.md [KP] Expose new es client (#73651) (#73840) 2020-07-30 21:09:14 +02:00

Plugin Functional Tests

This folder contains plugin functional tests, i.e. functional tests that should be executed against a Kibana instance with specific test plugins available.

To add a plugin to the instance, just place the plugin folder in the plugins directory.

Add new test suites into the test_suites folder and reference them from the config.js file. These test suites work the same as regular functional test except that they are executed against a Kibana with all plugins (from the plugins directory) installed.

Run the test

To run these tests during development you can use the following commands:

# Start the test server (can continue running)
node scripts/functional_tests_server.js --config test/plugin_functional/config.ts
# Start a test run
node scripts/functional_test_runner.js --config test/plugin_functional/config.ts

Run Kibana with a test plugin

In case you want to start Kibana with one of the test plugins (e.g. for developing the test plugin), you can just run:

yarn start --plugin-path=test/plugin_functional/plugins/<plugin_folder>

If you wish to start Kibana with multiple test plugins, you can run:

yarn start --plugin-path=test/plugin_functional/plugins/<plugin_folder1> --plugin-path=test/plugin_functional/plugins/<plugin_folder2> ... 

If you wish to load up specific es archived data for your test, you can do so via the es_archiver script detailed in the Scripts README.md

Another option, which will automatically use any specific settings the test environment may rely on, is to boot up the functional test server pointing to the plugin configuration file.

node scripts/functional_tests_server --config test/plugin_functional/config.ts

Note: you may still need to use the es_archiver script to boot up any required data.