kibana/packages/kbn-failed-test-reporter-cli/failed_tests_reporter
Alex Szabo 9d2696b5c5
[Ops] Upgrade to axios 1.4 (#163732)
## Summary
upgrade `axios` to 1.4

- adjust to header usage, and config optionality
- Axios' adapters are now resolved from a string key by axios, no need
to import/instantiate adapters
- most of the changed code stems from changes in Axios' types
  - `response.config` is now optional
- there was a change in the type of AxiosHeaders <->
InternalAxiosHeaders

Closes: #162661 
Closes: #162414

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-22 11:47:48 +02:00
..
__fixtures__ [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
add_messages_to_report.test.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
add_messages_to_report.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
buildkite_metadata.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
es_config [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
existing_failed_test_issues.test.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
existing_failed_test_issues.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
failed_tests_reporter_cli.ts Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
get_failures.test.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
get_failures.ts [failed test reporter] no github issues for WebDriver invalid session id (#155707) 2023-04-25 17:06:34 +02:00
github_api.ts [Ops] Upgrade to axios 1.4 (#163732) 2023-08-22 11:47:48 +02:00
issue_metadata.test.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
issue_metadata.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
README.md [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
report_failure.test.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
report_failure.ts [kbn-failed-test-reporter-cli] truncate report message to fix github api call failure (#155141) 2023-04-19 16:39:35 +02:00
report_failures_to_es.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
report_failures_to_file.ts Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
report_failures_to_file_html_template.html [journeys] restart ES for each journey, fix flakiness (#141530) 2022-09-26 08:56:31 -07:00
report_metadata.test.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
report_metadata.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00
test_report.ts [ftr] add first-class support for playwrite journeys (#140680) 2022-09-22 01:06:46 -07:00

failed tests reporter

A little CLI that runs in CI to find the failed tests in the JUnit reports, then create/update github issues for each failure.

Test this script locally

To fetch some JUnit reports from a recent build on CI, visit its Google Cloud Storage Upload Report and execute the following in the JS Console:

copy(`wget -x -nH --cut-dirs 5 -P "target/downloaded_junit" "${Array.from($$('a[href$=".xml"]')).filter(a => a.innerText === 'Download').map(a => a.href.replace('https://storage.cloud.google.com/', 'https://storage.googleapis.com/')).join('" "')}"`)

This copies a script to download the reports, which you should execute in the root of the Kibana repository.

Next, run the CLI in --no-github-update mode so that it doesn't actually communicate with Github and --no-report-update to prevent the script from mutating the reports on disk and instead log the updated report.

node scripts/report_failed_tests.js --verbose --no-github-update --no-report-update target/downloaded_junit/**/*.xml

Unless you specify the GITHUB_TOKEN environment variable requests to read existing issues will use anonymous access which is limited to 60 requests per hour.