Skip to content

Commit

Permalink
Deprecate test:ui commands (elastic#21092)
Browse files Browse the repository at this point in the history
* Deprecate test:ui commands
  • Loading branch information
archanid authored and archanid committed Jul 23, 2018
1 parent 0a61ab7 commit 725782e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 33 deletions.
6 changes: 3 additions & 3 deletions docs/development/core/development-functional-tests.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 0 additions & 11 deletions tasks/config/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,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',
],
},
};
};
3 changes: 2 additions & 1 deletion tasks/jenkins.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = function (grunt) {
]);

grunt.registerTask('jenkins:selenium', [
'test:uiRelease'
'checkPlugins',
'run:functionalTestsRelease',
]);
};
18 changes: 2 additions & 16 deletions tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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}"`);

Expand Down

0 comments on commit 725782e

Please sign in to comment.