Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One test CLI to rule them all #14476

Closed
epixa opened this issue Oct 17, 2017 · 7 comments
Closed

One test CLI to rule them all #14476

epixa opened this issue Oct 17, 2017 · 7 comments
Labels
Team:Operations Team label for Operations Team test

Comments

@epixa
Copy link
Contributor

epixa commented Oct 17, 2017

We have a ton of different ways to test code and features in Kibana, but there's very little consistency in how you run any of the tests. I propose a single test CLI to run any or all of the individual test suites:

tasks

run all tests (default)

$ node scripts/test

run unit-like tests, no slow tests

$ node scripts/test unit --jest --mocha

test end-user interactions, a mix of selenium tests and http request testing (server)

$ node scripts/test app --selenium --server

test all api endpoints (/api)

$ node scripts/test api

test upgrade paths to the current version

$ node scripts/test upgrade --from

test different deployment scenarios (load balanced, local coordinating node, base path)

$ node scripts/test deployment --scenario

guaranteed release blockers

$ node scripts/test smoke

all tasks also accept:
--grep
--bail
--quiet
--verbose
--debug

@epixa epixa added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc test labels Oct 17, 2017
@epixa
Copy link
Contributor Author

epixa commented Oct 17, 2017

cc @kjbekkelund @LeeDr @spalger

@cjcenizal
Copy link
Contributor

I imagine that you can run multiple types of tests by adding them as additional arguments, e.g. node scripts/test api unit --jest, right?

@spalger
Copy link
Contributor

spalger commented Oct 20, 2017

I see a few advantages to doing as CJ suggested, but I'm concerned about the difficulty of implementing the feature versus its payoff

  • unified reporting when using several configs
  • allow failures within tests to not prevent the next test type, but still produce an overall exit status
  • possible resource sharing between test types

If these seem like important features then we probably should find a syntax that allows specific arguments to be used for explicit test configs (maybe node scripts/test unit --bail AND api --grep “saved_objects”)

I don't expect it to be super easy and will probably require custom argv parsing since we usually only get a map and won't be able to apply configuration to individual types. I also expect CI to run these tests in independent jobs for concurrency, so it won't utilize this feature. Finally, I don't expect resource sharing to be very straight forward. I would prefer just supporting && for now.

node scripts/test api && node scripts/test unit --jest

@epixa
Copy link
Contributor Author

epixa commented Oct 20, 2017

++ to keeping the interface simple for now. If there's a real need that && can't provide, then we can always improve on what we have at that time.

@rashmivkulkarni
Copy link
Contributor

cc @liza-mae ( this may be of interest to you)

@epixa epixa added Team:Operations Team label for Operations Team and removed Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Sep 10, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations

@tylersmalley tylersmalley added 1 and removed 1 labels Oct 11, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Oct 12, 2021
@tylersmalley tylersmalley removed loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. EnableJiraSync labels Mar 16, 2022
@tylersmalley
Copy link
Contributor

This will be done with Bazel - this issue is not needed to track this anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Operations Team label for Operations Team test
Projects
None yet
Development

No branches or pull requests

6 participants