Deprecate test:ui commands (#21092)

* Deprecate test:ui commands
This commit is contained in:
archana 2018-07-23 14:48:27 -05:00 committed by GitHub
parent a9e79716d3
commit d1cb0a44f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 33 deletions

View file

@ -12,20 +12,20 @@ There are three ways to run the tests depending on your goals:
1. Easiest option:
** Description: Starts up Kibana & Elasticsearch servers, followed by running tests. This is much slower when running the tests multiple times because slow startup time for the servers. Recommended for single-runs.
** `yarn test:ui`
** `node scripts/functional_tests`
*** does everything in a single command, including running Elasticsearch and Kibana locally
*** tears down everything after the tests run
*** exit code reports success/failure of the tests
2. Best for development:
** Description: Two commands, run in separate terminals, separate the components that are long-running and slow from those that are ephemeral and fast. Tests can be re-run much faster, and this still runs Elasticsearch & Kibana locally.
** `yarn test:ui:server`
** `node scripts/functional_tests_server`
*** starts Elasticsearch and Kibana servers
*** slow to start
*** can be reused for multiple executions of the tests, thereby saving some time when re-running tests
*** automatically restarts the Kibana server when relevant changes are detected
** `node scripts/functional_test_runner`
*** runs the tests against Kibana & Elasticsearch servers that were started `yarn test:ui:server`
*** runs the tests against Kibana & Elasticsearch servers that were started by `node scripts/functional_tests_server`
*** exit code reports success or failure of the tests
3. Custom option:

View file

@ -49,8 +49,8 @@
"test:dev": "grunt test:dev",
"test:quick": "grunt test:quick",
"test:browser": "grunt test:browser",
"test:ui": "grunt test:ui",
"test:ui:server": "grunt test:ui:server",
"test:ui": "echo 'use `node scripts/functional_tests`' && false",
"test:ui:server": "echo 'use `node scripts/functional_tests_server`' && false",
"test:ui:runner": "echo 'use `node scripts/functional_test_runner`' && false",
"test:server": "grunt test:server",
"test:coverage": "grunt test:coverage",

View file

@ -179,16 +179,5 @@ module.exports = function (grunt) {
'--server.maxPayloadBytes=1648576',
],
},
functionalTestsDevServer: {
cmd: process.execPath,
args: [
'scripts/functional_tests_server',
'--config', 'test/functional/config.js',
'--debug',
'--',
'--server.maxPayloadBytes=1648576',
],
},
};
};

View file

@ -39,6 +39,7 @@ module.exports = function (grunt) {
]);
grunt.registerTask('jenkins:selenium', [
'test:uiRelease'
'checkPlugins',
'run:functionalTestsRelease',
]);
};

View file

@ -58,8 +58,9 @@ module.exports = function (grunt) {
grunt.registerTask('test:coverage', [ 'run:testCoverageServer', 'karma:coverage' ]);
grunt.registerTask('test:quick', [
'checkPlugins',
'test:server',
'test:ui',
'run:functionalTests',
'test:jest',
'test:jest_integration',
'test:projects',
@ -73,21 +74,6 @@ module.exports = function (grunt) {
'karma:dev'
]);
grunt.registerTask('test:ui', [
'checkPlugins',
'run:functionalTests',
]);
grunt.registerTask('test:uiRelease', [
'checkPlugins',
'run:functionalTestsRelease',
]);
grunt.registerTask('test:ui:server', [
'checkPlugins',
'run:functionalTestsDevServer',
]);
grunt.registerTask('test', subTask => {
if (subTask) grunt.fail.fatal(`invalid task "test:${subTask}"`);