kibana/test/plugin_functional
Vadim Dalecky f18e7439d9
「AppArch」Interpreter 👉 New Platform (#39329)
* feat: 🎸 set-up NP data plugin

* refactor: 💡 move interpreter functions registry to NP

* refactor: 💡 move interpreter renderer registry to NP plugin

* refactor: 💡 move interpreter typesRegistry to NP

* refactor: 💡 move interpreter types to NP

* chore: 🤖 import typeRegistry from NP and change TS type folder

* refactor: 💡 move interpreter expression types to NP

* refactor: 💡 move rest of interpreter common folder to NP plugin

* fix: 🐛 fix TypeScript errors

* test: 💍 improve typings and test mocks

* refactor: 💡 make Interpreter internal registry impl private

* test: 💍 inline NP backdoor mock creation in test suites

* chore: 🤖 change @kbn/interpreter import paths to try fix errors

* fix: 🐛 improve core Plugin interfaces

* feat: 🎸 add stop() lifecycle to NP data plugins

* refactor: 💡 move interpreter into expressions service data NP

* refactor: 💡 inline Registry @kbn/interpreter class

* refactor: 💡 remove dependency on @kbn/interpreter in data pub

* refactor: 💡 move interpreter common dir into expressions dir

* fix: 🐛 use TS types in kibana_context

* feat: 🎸 add types suggested in PR review

* feat: 🎸 add semantic interpreter registration functions

* refactor: 💡 use require for all @kbn/interpreter imports

* test: 💍 add Karma test mocks, thx @spalger 🙏

* docs: ✏️ update Core docs

* test: 💍 add Sinon stubs for registries

* chore: 🤖 change import syntax in hopes CI will work

* chore: 🤖 set App Architecture as owners of data plugin

* docs: ✏️ add README

* chore: 🤖 change import in hopes to fix optimizer

* fix: 🐛 make stop() plugin life-cycle optional

* docs: ✏️ update Core API docs

* test: 💍 remove unnecessary Jest mock

* chore: 🤖 don't import from deeply inside a plugin

* refactor: 💡 try different interpreter import

* fix: 🐛 fix Karma mocking

* fix: 🐛 fix TypeScript type imports

* test: 💍 fix broken test
2019-07-02 09:07:07 +02:00
..
plugins 「AppArch」Interpreter 👉 New Platform (#39329) 2019-07-02 09:07:07 +02:00
test_suites Dashboard embeddable container plugin (#38974) 2019-06-25 08:43:28 -04:00
config.js Embeddable API V2 (#37510) 2019-06-07 13:30:55 -04:00
README.md Plugin test readme’s (#26632) 2018-12-04 15:23:23 -05: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.js
# Start a test run
node scripts/functional_test_runner.js --config test/plugin_functional/config.js

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.js

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