[functionalTestRunner] replace intern#10910
Conversation
b60c5a8 to
d3be827
Compare
ee68177 to
89800f1
Compare
d90fbe4 to
5b8ea08
Compare
|
|
comb through all functional tests:
|
c1415a6 to
25e4f9c
Compare
5bee23d to
73326bf
Compare
|
23 Tests Failing, all in Management app |
|
jenkins, test it |
|
4 Tests Failing, management app |
4cf226f to
5fd1d3f
Compare
|
1 Test failing, management https://kibana-ci.elastic.co/job/elastic+kibana+pull-request+multijob-selenium/3484/consoleFull |
|
@stacey-gammon I tagged you because I incorporated your changes in here, and specifically for the dashboard tests. It's a big PR, so if you wanted to just look at those, I'd be grateful. @LeeDr Would like your feedback on the way the tests look and how the functional-test-runner works. Since you're traveling, if you aren't able to take a close look just yet, it's no big deal, I'll tag others, too! For everyone, I/we will be writing documentation that will help this go live. I can ping you when documentation is ready. |
|
@spalger Would like to add you as reviewer. I'm not sure if I'm including files and directories that should no longer exist. Can you please check? |
31e3438 to
d364014
Compare
|
🎉 |
* [functional_test_runner] replace functional testing tools with custom/pluggable solution * [functional_test_runner] Convert unit tests to commonjs format * [functional_test_runner] Fix dashboard test in wrong mode * [functional_test_runner] Add dashboardLandingPage test subject * [functional_test_runner] Get Visualize page object * [functional_test_runner] Fix outdated references * [functional_test_runner] Fix more outdated refs * [functional_test_runner] Remove duplicate tests * [functional_test_runner] Improve test readability * [functional_test_runner] 😞 So many duplicate methods * [functional_test_runner] Move mgmt `before` outside toplevel describe * [functional_test_runner] Settings page obj missing methods * [functional_test_runner] Add improvements from @gammon * [functional_test_runner] Fix return statements in async funcs * [functional_test_runner] Move before() to correct scope * [functional_test_runner] Add after() hooks to remove index patterns * [functional_test_runner] Attempt to fix vertical bar chart tests * [functional_test_runner] Clean up * [functional_test_runner] Reinstate unit tests * [functional_test_runner] Set default loglevel back to info * [functional_test_runner] Replace `context`s with `describe`s * [functional_test_runner] Better error handling * [functional_test_runner] Add in new Tile Map tests * Incorporate changes from master * [functional_test_runner] validate that every test file has a single top-level suite * Update contributing doc with link to full doc * [docs] Spelling and grammar fixes * docs: writing and running functional tests * [docs] Move plugin doc to plugin area * [docs] Housekeeping. Doc in wrong place * [docs] Remove dup doc file * [grunt] Only run mocha_setup when running tests, not every grunt task
* [esArchiver] combine elasticDump and ScenarioManager (#10359) * As a part of bringing functional testing to plugins, esArchiver gives these plugins a way to capture and reload es indexes without needing to write a bunch of custom code. It works similarly to the elasticDump and ScenarioManager tools that it replaces. Differences: - Streaming implementation allows for much larger archives - CLI for creating and using archives - Configurable archive location - Stores the data in gzipped files (better for source control, searching, large archives) - Automatically identifies and upgrades Kibana config documents Methods: - `#load(name)`: import an archive - `#loadIfNeeded(name)`: import an archive, but skip the documents what belong to any existing index - `#unload(name)`: delete the indexes stored in an archive CLI operations: - `./bin/es_archiver save <name> [index patterns...]`: save the mapping and documents in one or more indexes that match the wild-card patterns into an the `<name>` archive - `./bin/es_archiver load <name>`: load the mapping and documents from the `<name>` archive * [functional_tests/common/nagivate] check for statusPage * [es_archiver] move bins into new scripts dir * [functional_tests/apps/context] use esArchiver * [esArchiver] general improvements after showing to a few folks - remove auto-upgrading config doc logic (until we have better access to kibana version info) - export unload command - remove preemptive checks in favor of reacting to errors - use type "doc" vs "hit" for doc records (consistency) - wrote a bunch of pending tests to think though and plan * [esArchiver] make log a stream that writes to itself * [esArchiver] fill in stats and archive format tests * [esArchiver] splitup action logic * [esArchiver/cli] fix cli --help output and comment * [esArchiver] remove type-based param coercion * [esArchiver/log] use strings for log levels * [esArchvier] remove unused var * [esArchiver/indexDocRecordsStream] add tests * [esArchive] fill in remaining tests * [esArchiver] fix dem tests * [eslint] remove unused vars * [esArchiver/loadIfNeeded] fix call to load() * [esArchiver] remove loadDumpData helpers * [esArchiver] update archives for 5.x * [functionalTestRunner] replace intern (#10910) * [functional_test_runner] replace functional testing tools with custom/pluggable solution * [functional_test_runner] Convert unit tests to commonjs format * [functional_test_runner] Fix dashboard test in wrong mode * [functional_test_runner] Add dashboardLandingPage test subject * [functional_test_runner] Get Visualize page object * [functional_test_runner] Fix outdated references * [functional_test_runner] Fix more outdated refs * [functional_test_runner] Remove duplicate tests * [functional_test_runner] Improve test readability * [functional_test_runner] 😞 So many duplicate methods * [functional_test_runner] Move mgmt `before` outside toplevel describe * [functional_test_runner] Settings page obj missing methods * [functional_test_runner] Add improvements from @gammon * [functional_test_runner] Fix return statements in async funcs * [functional_test_runner] Move before() to correct scope * [functional_test_runner] Add after() hooks to remove index patterns * [functional_test_runner] Attempt to fix vertical bar chart tests * [functional_test_runner] Clean up * [functional_test_runner] Reinstate unit tests * [functional_test_runner] Set default loglevel back to info * [functional_test_runner] Replace `context`s with `describe`s * [functional_test_runner] Better error handling * [functional_test_runner] Add in new Tile Map tests * Incorporate changes from master * [functional_test_runner] validate that every test file has a single top-level suite * Update contributing doc with link to full doc * [docs] Spelling and grammar fixes * docs: writing and running functional tests * [docs] Move plugin doc to plugin area * [docs] Housekeeping. Doc in wrong place * [docs] Remove dup doc file * [grunt] Only run mocha_setup when running tests, not every grunt task * [eslint] remove use of context()
In an effort to make functional/selenium testing more accessible to plugins and external projects, this pr removes intern and replaces it with a custom solution.
Quick info
src/functional_test_runner: source for the bare bones functional test runner. Most functionality via services in configtests/functional/config.js: Kibana's functional_test_runner config file, plugins will have one just like thisconfig: useconfig.get()to read values from the config file)log: uselog.debug()andlog.error()just like console.log but with more organized outputlifecycle: designed for use in other services, calls handlers at certain lifecycle pointslifecycle.on(phaseName, handler): register a listener for a specific phase that will be called at that point. The handler can be async and return a promise if it needs to do async work.beforeLoadTests,beforeTests,beforeEachTest,cleanup,phaseStart,phaseEndtests/functional/services):remote: leadfoot remote that provides access to automated browser (previously injected into eachPageObject)esArchiver: load/unload archives stored with the esArchiver ([esArchiver] combine elasticDump and ScenarioManager #10359)es: elasticsearch clientfind: helpers for remotefindBy*methods that log and manage timeouts (previouslyPageObjects.common.findBy*)retry: helpers for retrying logic (previouslyPageObjects.common.try*)testSubjects: helpers for reading/interacting with test subjects (previouslyPageObjects.common.find/click/findAllTestSubect)docTable: helpers for interacting with doc tablespointSeriesVis: helpers for interacting with point series visualizationsRunning the CLI
This is the second script to be added to the root
scripts/directory. Access it withnode scripts/functional_test_runnerand give it the--helpflag to see what it can do.Debugging Tests
I suggest installing the NIM Chrome Extension, turning on the "auto" setting, and then using the new node.js
--inspectflag.Upstream prs: