kibana/scripts
archana b58e757794
Functional test setup with kbn-test package (#18568)
Restructure testing with kbn-test package

 - Run with multiple configs, move cli options to config
 - Package-ify kbn-test
 - Eventually we'll have functional_test_runner live in a package
of its own, and then this kbn-test will use that as a dependency,
probably still as a devDependency.
 - Implement functional_tests_server
 - Collapse single and multiple config apis into one command

Use kbn-es

Replace es_test_cluster + es_test_config with kbn/test utils

Implement new createEsTestCluster

Improve scripts, jsdocs, cli top-level tools

Lift error handling to the top level
2018-05-09 18:23:49 -05:00
..
backport.js Add Backport to toolchain (#14525) 2017-10-24 16:38:18 -04:00
build.js Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
docs.js create babel-preset and babel-register modules (#13973) 2017-09-19 17:44:47 -07:00
es.js [kbn-es] Use basic license as default (#18577) 2018-04-25 14:00:24 -07:00
es_archiver.js create babel-preset and babel-register modules (#13973) 2017-09-19 17:44:47 -07:00
eslint.js [eslint] add eslint dev script (#14889) 2017-11-14 10:11:59 -07:00
functional_test_runner.js create babel-preset and babel-register modules (#13973) 2017-09-19 17:44:47 -07:00
functional_tests.js Functional test setup with kbn-test package (#18568) 2018-05-09 18:23:49 -05:00
functional_tests_server.js Functional test setup with kbn-test package (#18568) 2018-05-09 18:23:49 -05:00
generate_plugin.js [kbn-plugin-generator] add plugin generator to the repo (#16655) 2018-02-12 12:23:23 -07:00
jest.js Introduce Jest integration tests. (#16735) 2018-02-19 17:02:01 +01:00
jest_integration.js Introduce Jest integration tests. (#16735) 2018-02-19 17:02:01 +01:00
kbn.js [kbn-pm] rename from kbn-build (#16739) 2018-02-14 10:57:13 -07:00
kibana.js Create separate startup scripts for development and production (#13806) 2017-11-22 12:49:37 -06:00
kibana_keystore.js Snake case scripts/kibana-keystore.js and scripts/kibana-plugin.js (#15331) 2018-02-02 09:54:02 -06:00
kibana_plugin.js Snake case scripts/kibana-keystore.js and scripts/kibana-plugin.js (#15331) 2018-02-02 09:54:02 -06:00
makelogs.js Convert makelogs and mocha npm scripts (#11665) 2017-05-09 10:53:10 -07:00
mocha.js create babel-preset and babel-register modules (#13973) 2017-09-19 17:44:47 -07:00
notice.js Add/generate/verify NOTICE.txt file (#17504) 2018-04-04 09:12:44 -07:00
precommit_hook.js [precommit hook] add dev script (#14890) 2017-11-20 14:22:24 -07:00
README.md Functional test setup with kbn-test package (#18568) 2018-05-09 18:23:49 -05: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/babel-register to bootstrap babel
  • 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.