kibana/scripts
Spencer 4f0d2ade1e
[kbn-test] convert kibana-install-dir flag to installDir option (#21317)
* [kbn-test] convert kibana-install-dir flag to installDir option

* [kbn-test] replicate kibana-install-dir handling to startServers

* [ftr] try running functional tests in production in CI

* Revert "[ftr] try running functional tests in production in CI"

This reverts commit e5b94aa024.

* [core/public/legacyPlatform] exclude ui/test_harness from the distributable

* [optimizer] fix `process.env.IS_KIBANA_DISTRIBUTABLE` definition

* [optimizer] only define `process.env.IS_KIBANA_DISTRIBUTABLE` when needed

Adding a `webpack.DefinePlugin` slows down the optimizer a small amount,
so only apply it when it is necessary, and skip it if it is going to
be defined as "false".

* [kbn-test/startServer] don't run in --dev mode if running from dist

* [ftr/kibanaServer/version] attach `-SNAPSHOT` suffix to version if running build_snapshot
2018-08-02 17:23:34 -07:00
..
backport.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
build.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
check_file_casing.js Change check_file_casing to require setup_node_env (#19499) 2018-05-29 11:48:43 -04:00
docs.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
es.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
es_archiver.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
eslint.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
extract_default_translations.js Implement a build tool for default messages extraction (#19620) 2018-07-17 15:56:55 +03:00
functional_test_runner.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
functional_tests.js [kbn-test] convert kibana-install-dir flag to installDir option (#21317) 2018-08-02 17:23:34 -07:00
functional_tests_server.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
generate_plugin.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
jest.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
jest_integration.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
kbn.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
kibana.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
kibana_keystore.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
kibana_plugin.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
makelogs.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
mocha.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
notice.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
precommit_hook.js chore(NA): remove node version validator from git pre-commit hook script. (#19950) 2018-06-15 16:14:48 +01:00
README.md Validate current node version (#19154) 2018-05-25 18:43:01 +01:00
tslint.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00

Kibana Dev Scripts

This directory contains scripts useful for interacting with Kibana tools in development. Use the node executable and --help flag to learn about how they work:

node scripts/{{script name}} --help

For Developers

This directory is excluded from the build and tools within it should help users discover their capabilities. Each script in this directory must:

  • require src/setup_node_env to bootstrap NodeJS environment
  • call out to source code in the src or packages directories
  • react to the --help flag
  • run everywhere OR check and fail fast when a required OS or toolchain is not available

Functional Test Scripts

node scripts/functional_tests [--config test/functional/config.js --config test/api_integration/config.js]

Runs all the functional tests: selenium tests and api integration tests. List configs with multiple --config arguments. Uses the @kbn/test library to run Elasticsearch and Kibana servers and tests against those servers, for multiple server+test setups. In particular, calls out to runTests(). Can be run on a single config.

node scripts/functional_tests_server [--config test/functional/config.js]

Starts just the Elasticsearch and Kibana servers given a single config, i.e. via --config test/functional/config.js or --config test/api_integration/config. Allows the user to start just the servers with this script, and keep them running while running tests against these servers. The idea is that the same config file configures both Elasticsearch and Kibana servers. Uses the startServers() method from @kbn/test library.

Example. Start servers and run tests, separately, but using the same config:

# Just the servers
node scripts/functional_tests_server --config path/to/config

In another terminal:

# Just the tests--against the running servers
node scripts/functional_test_runner --config path/to/config

For details on how the internal methods work, read this readme.