kibana/x-pack/plugins/security_solution/jest.config.dev.js
Robert Austin 2e4151d50e
Transform Security's Cypress Junit reports to have the same format as those produced by FTR and Jest (#162279)
## Summary

Cypress produced Junit reports, but the failed-test-reporter and various
github and kibanamachine workflows rely on a specifically formatted
junit report that includes an encoded version of the spec file path in
each testcase.

For FTR and Jest, these specially formatted junit reports are created by
a custom reporter. Due to the architecture of Cypress, re-using those
would be difficult. Instead this PR adds a script that reads,
transforms, and updates all the junit reports created by Cypress.

### TODO
Some work is not covered in this PR. I need to merge this change to test
that flaky test triaging works in buildkite and kibana machine (note: if
you know how to validate this without merging it, please reach out!)
After I'm confident that this works, I'll open follow up PRs to do the
following:

```[tasklist]
### Follow up work
- [ ] Enable this script for test_serverless cypress tests
- [ ] Enable this script for threat intelligence cypress tests (optional)
- [ ] Enable this script for fleet (optional)
```

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-24 10:50:13 -04:00

17 lines
657 B
JavaScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
module.exports = {
preset: '@kbn/test',
rootDir: '../../../',
projects: [
'<rootDir>/x-pack/plugins/security_solution/common/*/jest.config.js',
'<rootDir>/x-pack/plugins/security_solution/server/*/jest.config.js',
'<rootDir>/x-pack/plugins/security_solution/public/*/jest.config.js',
'<rootDir>/x-pack/plugins/security_solution/scripts/junit_transformer/*/jest.config.js',
],
};