diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 0000000..dd00b8f
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1,47 @@
+# Contributing
+
+Thanks for choosing to contribute!
+
+The following are a set of guidelines to follow when contributing to this project.
+
+## Code Of Conduct
+
+This project adheres to the Adobe [code of conduct](../CODE_OF_CONDUCT.md). By participating,
+you are expected to uphold this code. Please report unacceptable behavior to
+[Grp-opensourceoffice@adobe.com](mailto:Grp-opensourceoffice@adobe.com).
+
+## Have A Question?
+
+Start by filing an issue. The existing committers on this project work to reach
+consensus around project direction and issue solutions within issue threads
+(when appropriate).
+
+## Contributor License Agreement
+
+All third-party contributions to this project must be accompanied by a signed contributor
+license agreement. This gives Adobe permission to redistribute your contributions
+as part of the project. [Sign our CLA](https://opensource.adobe.com/cla.html). You
+only need to submit an Adobe CLA one time, so if you have submitted one previously,
+you are good to go!
+
+## Code Reviews
+
+All submissions should come in the form of pull requests and need to be reviewed
+by project committers. Read [GitHub's pull request documentation](https://help.github.com/articles/about-pull-requests/)
+for more information on sending pull requests.
+
+Lastly, please follow the [pull request template](PULL_REQUEST_TEMPLATE.md) when
+submitting a pull request!
+
+## From Contributor To Committer
+
+We love contributions from our community! If you'd like to go a step beyond contributor
+and become a committer with full write access and a say in the project, you must
+be invited to the project. The existing committers employ an internal nomination
+process that must reach lazy consensus (silence is approval) before invitations
+are issued. If you feel you are qualified and want to get more deeply involved,
+feel free to reach out to existing committers to have a conversation about that.
+
+## Security Issues
+
+Security issues shouldn't be reported on this issue tracker. Instead, [file an issue to our security experts](https://helpx.adobe.com/security/alertus.html).
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..389679c
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,16 @@
+
+
+
+### Expected Behaviour
+
+### Actual Behaviour
+
+### Reproduce Scenario (including but not limited to)
+
+#### Steps to Reproduce
+
+#### Platform and Version
+
+#### Sample Code that illustrates the problem
+
+#### Logs taken while reproducing problem
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..9efe0d8
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,45 @@
+
+
+## Description
+
+
+
+## Related Issue
+
+
+
+
+
+
+## Motivation and Context
+
+
+
+## How Has This Been Tested?
+
+
+
+
+
+## Screenshots (if appropriate):
+
+## Types of changes
+
+
+
+- [ ] Bug fix (non-breaking change which fixes an issue)
+- [ ] New feature (non-breaking change which adds functionality)
+- [ ] Breaking change (fix or feature that would cause existing functionality to change)
+
+## Checklist:
+
+
+
+
+- [ ] I have signed the [Adobe Open Source CLA](https://opensource.adobe.com/cla.html).
+- [ ] My code follows the code style of this project.
+- [ ] My change requires a change to the documentation.
+- [ ] I have updated the documentation accordingly.
+- [ ] I have read the **CONTRIBUTING** document.
+- [ ] I have added tests to cover my changes.
+- [ ] All new and existing tests passed.
diff --git a/.github/workflows/go-surefire-build-PR.yaml b/.github/workflows/go-surefire-build-PR.yaml
new file mode 100644
index 0000000..fb2519b
--- /dev/null
+++ b/.github/workflows/go-surefire-build-PR.yaml
@@ -0,0 +1,24 @@
+name: Build PR
+
+on:
+ pull_request:
+ types:
+ - opened
+ - reopened
+
+jobs:
+ build:
+ name: test-go-surefire
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out
+ uses: actions/checkout@v4
+ - name: Build PR
+ uses: actions/setup-go@v5
+ with:
+ go-version: '^1.21.0' # The Go version to download (if necessary) and use.
+ - run: |
+ go clean -i ./...
+ go get -v ./...
+ go test -v ./...
+ go build -v ./...
diff --git a/.github/workflows/go-surefire-build-main.yaml b/.github/workflows/go-surefire-build-main.yaml
new file mode 100644
index 0000000..a1869a5
--- /dev/null
+++ b/.github/workflows/go-surefire-build-main.yaml
@@ -0,0 +1,23 @@
+name: Build main
+
+on:
+ push:
+ branches:
+ - main
+
+jobs:
+ build:
+ name: build-go-surefire
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out
+ uses: actions/checkout@v4
+ - name: Build PR
+ uses: actions/setup-go@v5
+ with:
+ go-version: '^1.21.0' # The Go version to download (if necessary) and use.
+ - run: |
+ go clean -i ./...
+ go get -v ./...
+ go test -v ./...
+ go build -v ./...
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8933621
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+.vscode
+.fleet
+
+.idea
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..cd22f78
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,4 @@
+Authors ordered by first contribution
+
+teckhardt@adobe.com
+ehmke@adobe.com
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..cee55da
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,79 @@
+# Adobe Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our project and community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
+
+## Our Standards
+
+Examples of behavior that contribute to a positive environment for our project and community include:
+
+* Demonstrating empathy and kindness toward other people
+* Being respectful of differing opinions, viewpoints, and experiences
+* Giving and gracefully accepting constructive feedback
+* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
+* Focusing on what is best, not just for us as individuals but for the overall community
+
+Examples of unacceptable behavior include:
+
+* The use of sexualized language or imagery, and sexual attention or advances of any kind
+* Trolling, insulting or derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others’ private information, such as a physical or email address, without their explicit permission
+* Other conduct which could reasonably be considered inappropriate in a professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies when an individual is representing the project or its community both within project spaces and in public spaces. Examples of representing a project or community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by first contacting the project team. Oversight of Adobe projects is handled by the Adobe Open Source Office, which has final say in any violations and enforcement of this Code of Conduct and can be reached at Grp-opensourceoffice@adobe.com. All complaints will be reviewed and investigated promptly and fairly.
+
+The project team must respect the privacy and security of the reporter of any incident.
+
+Project maintainers who do not follow or enforce the Code of Conduct may face temporary or permanent repercussions as determined by other members of the project's leadership or the Adobe Open Source Office.
+
+## Enforcement Guidelines
+
+Project maintainers will follow these Community Impact Guidelines in determining the consequences for any action they deem to be in violation of this Code of Conduct:
+
+**1. Correction**
+
+Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
+
+Consequence: A private, written warning from project maintainers describing the violation and why the behavior was unacceptable. A public apology may be requested from the violator before any further involvement in the project by violator.
+
+**2. Warning**
+
+Community Impact: A relatively minor violation through a single incident or series of actions.
+
+Consequence: A written warning from project maintainers that includes stated consequences for continued unacceptable behavior. Violator must refrain from interacting with the people involved for a specified period of time as determined by the project maintainers, including, but not limited to, unsolicited interaction with those enforcing the Code of Conduct through channels such as community spaces and social media. Continued violations may lead to a temporary or permanent ban.
+
+**3. Temporary Ban**
+
+Community Impact: A more serious violation of community standards, including sustained unacceptable behavior.
+
+Consequence: A temporary ban from any interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Failure to comply with the temporary ban may lead to a permanent ban.
+
+**4. Permanent Ban**
+
+Community Impact: Demonstrating a consistent pattern of violation of community standards or an egregious violation of community standards, including, but not limited to, sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
+
+Consequence: A permanent ban from any interaction with the community.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1,
+available at [https://contributor-covenant.org/version/2/1][version]
+
+[homepage]: https://contributor-covenant.org
+[version]: https://contributor-covenant.org/version/2/1
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..2dd9041
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2022 Adobe
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..996be74
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,7 @@
+local-build:
+ go clean -i ./...
+ go get -v ./...
+ go test -v ./...
+ go build --v ./...
+
+.PHONY: local-build
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6d881a6
--- /dev/null
+++ b/README.md
@@ -0,0 +1,56 @@
+# Surefire Result Parser
+
+Reads Surefire Results from multiple XML files and aggregates then for further processing.
+
+## Features
+Surefire XML Test results are parsed into structs. [Data Model](doc/datamodel.md) shows
+the data-structure surefire results is converted to.
+
+## Installation
+
+- Install Go, at least version 1.21.0
+- Run `make local-build`. This will resolve dependencies and run tests
+
+## Usage
+
+Read test-result XML files from `~/test-results` directory.
+
+```
+files, _ := listTestReportFiles()
+
+testResults, err := NewJUnitReportsReaderBuilder().Build().FromReportFiles(files)
+
+func listTestReportFiles() ([]string, error) {
+ sureFireTestResult := []string{}
+ items, err := os.ReadDir(~/test-results)
+
+ if err != nil {
+ return nil, err
+ }
+
+ for _, item := range items {
+ if item.Type().IsRegular() && strings.HasSuffix(item.Name(), ".xml") {
+ sureFireTestResult = append(sureFireTestResult, fmt.Sprintf("%s/%s", path, item.Name()))
+ }
+ }
+
+ return sureFireTestResult, nil
+}
+```
+
+There is also support for adding labels to results on Suite level.
+
+```
+files, _ := listTestReportFiles()
+
+testResults, err := NewJUnitReportsReaderBuilder().WithLabeler(func(suite TestSuite) []string {
+ return []string{"label"}
+ }).Build().FromReportFiles(files)
+```
+### Contributing
+
+Contributions are welcomed! Read the [Contributing Guide](./.github/CONTRIBUTING.md) for more information.
+
+### Licensing
+
+This project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for more information.
diff --git a/doc/datamodel.md b/doc/datamodel.md
new file mode 100644
index 0000000..eb0736e
--- /dev/null
+++ b/doc/datamodel.md
@@ -0,0 +1,104 @@
+# Data Model surefire results get converted to
+
+## Overview
+
+```mermaid
+ %%{init: {'theme':'neutral'}}%%
+ classDiagram
+ class TestResults
+ TestResults : TestSuites() []TestSuite
+ TestResults: Successes() int
+ TestResults: Failures() int
+ TestResults: Errors() int
+ TestResults: Skipped() int
+ TestResults: Tests() int
+ TestResults: Flakes() int
+
+ class TestSuite
+ TestSuite : NonSuccessfulTestCases() []TestCase
+ TestSuite : SuccessfulTestCases() []TestCase
+ TestSuite : SkippedTestCases() []TestCase
+ TestSuite : FlakyTestCases() []TestCase
+ TestSuite : Success() int
+ TestSuite : Failure() int
+ TestSuite : Error() int
+ TestSuite : Skipped() int
+ TestSuite : Name() string
+ TestSuite : Time() float64
+
+ class TestCase
+ TestCase : Name string
+ TestCase : AmountRerunFailures int
+ TestCase : AmountRerunErrors int
+ TestCase : AmountFlakyFailures int
+ TestCase : AmountFlakyErrors int
+
+ class Skipped
+ Skipped : Message string
+
+ class Issue
+ Issue : Message string
+ Issue : Detail string
+
+
+ TestResults "1" --> "0..*" TestSuite
+
+ TestSuite "1" --> "0..*" TestCase
+
+ TestCase "1" --> "0..1" Skipped
+ TestCase "1" --> "0..1" Issue : Issue
+ TestCase "1" --> "0..*" Issue : RerunFailures
+ TestCase "1" --> "0..*" Issue : RerunErrors
+ TestCase "1" --> "0..*" Issue : FlakyFailures
+ TestCase "1" --> "0..*" Issue : FlakyErrors
+
+ TestCase "1" --> "1" TestSuite : Suite
+```
+
+## Types
+- TestResults: Root object encapsulating test results
+ - Tests: Returns the overall amount of tests
+ - Successes: Returns the overall amount of successful tests
+ - Failures: Returns the overall amount of failing tests
+ - Errors: Returns the overall amount of erroneous tests
+ - Skipped: Returns the overall amount of skipped tests
+ - Flakes: Returns the overall amount of flaky tests
+ - TestSuites: Returns all test suites. Those suites with an empty name are skipped
+
+- TestSuite: Represents a surefire test suite. Carries tests from that suite and provides methods to extract tests
+ - NonSuccessfulTestCases: Returns those tests which where not successful, either result in error or failure
+ - SuccessfulTestCases: Returns successful tests
+ - SkippedTestCases: Returns skipped tests
+ - Success: Returns the amount of successful tests
+ - Failure: Returns the amount of failing tests
+ - Error: Returns the amount of tests in error
+ - Skipped: Returns the amount of skipped tests
+ - Name: Returns the name of the test suite
+ - Time: Returns the amount of seconds the suite needed to run
+
+- TestCase: Represents a surefire test suite. Carries tests from that suite and provides methods to extract tests
+ - Name: The name of this test
+ - Suite: Backward reference to the enclosing suite
+ - Issue: When this test failed or resulted in error, return that as an Issue
+ - RerunFailures: When a test failed return the RerunIssues from re-runs
+ - AmountRerunFailures: The amount of re-runs when test failed
+ - RerunErrors: When a test resulted in error, return the RerunIssues from re-runs
+ - AmountRerunErrors: The amount of re-runs when test resulted in error
+ - FlakyFailures: When a test succeeded, return the re-runs as RerunIssues
+ - AmountFlakyFailures: When a test succeeded, return the amount of failures from re-runs
+ - FlakyErrors: When a test resulted in error, return the re-runs as RerunIssues
+ - AmountFlakyErrors: When a test resulted in error, return the amount of errors from re-runs
+ - Skipped: If a test was skipped, return this
+
+- Issue:
+ - Message: The message describing the issue
+ - Detail: Details for this issue, can be assumed to be a stack trace
+
+- RerunIssue:
+ - Message: The message describing the issue
+ - Stacktrace: Stacktrace for this issue
+ - SystemOut: Message which appears on system-out
+ - StackError: Message which appears on system-err
+
+- Skipped:
+ - Message: The message justifying why a test was skipped
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..4088e51
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,11 @@
+module adobe/go-surefire
+
+go 1.21.0
+
+require github.com/stretchr/testify v1.8.4
+
+require (
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ gopkg.in/yaml.v3 v3.0.1 // indirect
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..fa4b6e6
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,10 @@
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
+github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/sample/TEST-org.example.AnotherIT.xml b/sample/TEST-org.example.AnotherIT.xml
new file mode 100644
index 0000000..0a85d4e
--- /dev/null
+++ b/sample/TEST-org.example.AnotherIT.xml
@@ -0,0 +1,1270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+to be equal to:
+
+but was not.
+ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
+ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
+ at org.example.AnotherIT.flaky1(AnotherIT.java:30)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:566)
+ at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
+ at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
+ at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
+ at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
+ at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
+ at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
+ at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
+ at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
+]]>
+
+
+
+
+
+to be equal to:
+
+but was not.
+ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
+ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
+ at org.example.AnotherIT.flaky2(AnotherIT.java:40)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:566)
+ at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
+ at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
+ at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
+ at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
+ at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
+ at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
+ at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
+ at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
+]]>
+
+
+
+
+to be equal to:
+
+but was not.
+ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
+ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
+ at org.example.AnotherIT.failure1(AnotherIT.java:57)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:566)
+ at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
+ at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
+ at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
+ at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
+ at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
+ at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
+ at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
+ at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
+]]>
+
+
+to be equal to:
+
+but was not.
+ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
+ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
+ at org.example.AnotherIT.failure1(AnotherIT.java:57)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:566)
+ at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
+ at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
+ at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
+ at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:162)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
+ at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
+ at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
+ at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
+ at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
+]]>
+
+
+
+to be equal to:
+
+but was not.
+ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
+ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
+ at org.example.AnotherIT.failure1(AnotherIT.java:57)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:566)
+ at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
+ at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
+ at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
+ at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:162)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
+ at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
+ at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
+ at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
+ at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
+]]>
+
+
+
+to be equal to:
+
+but was not.
+ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
+ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
+ at org.example.AnotherIT.failure1(AnotherIT.java:57)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:566)
+ at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
+ at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
+ at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
+ at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:162)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
+ at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
+ at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
+ at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
+ at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
+]]>
+
+
+
+to be equal to:
+
+but was not.
+ at jdk.internal.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
+ at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
+ at org.example.AnotherIT.failure1(AnotherIT.java:57)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:566)
+ at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
+ at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
+ at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
+ at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:162)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
+ at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
+ at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
+ at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
+ at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
+]]>
+
+
+
+to be equal to:
+
+but was not.
+ at jdk.internal.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
+ at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
+ at org.example.AnotherIT.failure1(AnotherIT.java:57)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:566)
+ at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
+ at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
+ at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
+ at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
+ at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
+ at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
+ at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
+ at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
+ at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
+ at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
+ at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
+ at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
+ at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
+ at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
+ at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:162)
+ at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
+ at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
+ at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
+ at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
+ at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
+]]>
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sample/TEST-org.example.SkippingSuiteIT.xml b/sample/TEST-org.example.SkippingSuiteIT.xml
new file mode 100644
index 0000000..5b21b25
--- /dev/null
+++ b/sample/TEST-org.example.SkippingSuiteIT.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sample/failsafe-summary.xml b/sample/failsafe-summary.xml
new file mode 100644
index 0000000..5008015
--- /dev/null
+++ b/sample/failsafe-summary.xml
@@ -0,0 +1,8 @@
+
+
+ 1330
+ 0
+ 0
+ 53
+
+
\ No newline at end of file
diff --git a/surefire-interface.go b/surefire-interface.go
new file mode 100644
index 0000000..a47573b
--- /dev/null
+++ b/surefire-interface.go
@@ -0,0 +1,63 @@
+/*
+Copyright 2023 Adobe. All rights reserved.
+This file is licensed to you under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License. You may obtain a copy
+of the License at http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under
+the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
+OF ANY KIND, either express or implied. See the License for the specific language
+governing permissions and limitations under the License.
+*/
+
+package surefire
+
+import (
+ "encoding/xml"
+)
+
+// surefireTestsuite encapsulates the data from a single test suite
+type surefireTestsuite struct {
+ Suite xml.Name `xml:"testsuite"`
+ Name string `xml:"name,attr"`
+ Time float64 `xml:"time,attr"`
+ Tests int `xml:"tests,attr"`
+ Errors int `xml:"errors,attr"`
+ Skipped int `xml:"skipped,attr"`
+ Failures int `xml:"failures,attr"`
+ Testcases []surefireTestcase `xml:"testcase"`
+ Filename string
+}
+
+// surefireTestcase encapsulates the data from a single test case
+type surefireTestcase struct {
+ Name string `xml:"name,attr"`
+ Classname string `xml:"classname,attr"`
+ Time float64 `xml:"time,attr"`
+ Skipped *surefireSkipped `xml:"skipped"`
+ Failure *surefireProblem `xml:"failure"`
+ Error *surefireProblem `xml:"error"`
+ ReRunErrors []surefireRerun `xml:"rerunError"`
+ ReRunFailures []surefireRerun `xml:"rerunFailure"`
+ FlakyError []surefireRerun `xml:"flakyError"`
+ FlakyFailure []surefireRerun `xml:"flakyFailure"`
+}
+
+// surefireSkipped is present if the referencing test case was skipped
+type surefireSkipped struct {
+ Message string `xml:"message,attr"`
+}
+
+// surefireProblem is present if the referencing test case failed or errored
+type surefireProblem struct {
+ Message string `xml:"message,attr"`
+ Data string `xml:",chardata"`
+}
+
+// surefireRerun represents errors, failures and flakes from re-runs
+type surefireRerun struct {
+ Message string `xml:"message,attr"`
+ Stacktrace string `xml:"stackTrace"`
+ SystemOut string `xml:"system-out"`
+ SystemError string `xml:"system-err"`
+}
diff --git a/surefire-reader.go b/surefire-reader.go
new file mode 100644
index 0000000..20b664f
--- /dev/null
+++ b/surefire-reader.go
@@ -0,0 +1,195 @@
+/*
+Copyright 2023 Adobe. All rights reserved.
+This file is licensed to you under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License. You may obtain a copy
+of the License at http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under
+the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
+OF ANY KIND, either express or implied. See the License for the specific language
+governing permissions and limitations under the License.
+*/
+
+package surefire
+
+import (
+ "encoding/xml"
+ "fmt"
+ "io"
+ "log/slog"
+ "os"
+ "sync"
+)
+
+type JUnitReportsReader struct {
+ labeler Labeler
+}
+
+func (b *JUnitReportsReader) FromReportFiles(surefireReportFiles []string) (TestResults, error) {
+ surefireSuites, err := parseSurefireReports(surefireReportFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ return b.FromJUnitRepresentation(surefireSuites), nil
+}
+
+func (b *JUnitReportsReader) FromJUnitRepresentation(surefireSuites []surefireTestsuite) TestResults {
+ testResults := testResults{}
+
+ for _, surefireSuite := range surefireSuites {
+ testSuite := testSuite{
+ name: surefireSuite.Name,
+ filename: surefireSuite.Filename,
+ time: surefireSuite.Time,
+ testcases: make([]TestCase, 0),
+ successes: 0,
+ failures: 0,
+ errors: 0,
+ skipped: 0,
+ labels: make([]string, 0),
+ }
+
+ for _, surefireTestCase := range surefireSuite.Testcases {
+ var issue *Issue
+ _failure := optionalTestProblem(surefireTestCase.Failure)
+ _error := optionalTestProblem(surefireTestCase.Error)
+
+ var status Status
+ var skipped *Skipped
+
+ _skipped := surefireTestCase.Skipped
+
+ if _skipped != nil {
+ testSuite.skipped++
+ skipped = &Skipped{Message: _skipped.Message}
+ status = Skip
+ } else if _failure != nil {
+ testSuite.failures++
+ issue = _failure
+ status = Failure
+ } else if _error != nil {
+ testSuite.errors++
+ issue = _error
+ status = Error
+ } else {
+ testSuite.successes++
+ status = Success
+ }
+
+ if amountOf(surefireTestCase.FlakyError)+amountOf(surefireTestCase.FlakyFailure) > 0 {
+ status = Flaky
+ }
+
+ testCase := TestCase{
+ Name: surefireTestCase.Name,
+ Classname: surefireTestCase.Classname,
+ Fullname: surefireTestCase.Classname + "." + surefireTestCase.Name,
+ Suite: &testSuite,
+
+ Time: surefireSuite.Time,
+ Issue: issue,
+ Skipped: skipped,
+ RerunErrors: toReRunIssues(surefireTestCase.ReRunErrors),
+ AmountRerunErrors: amountOf(surefireTestCase.ReRunErrors),
+
+ RerunFailures: toReRunIssues(surefireTestCase.ReRunFailures),
+ AmountRerunFailures: amountOf(surefireTestCase.ReRunFailures),
+
+ FlakyErrors: toReRunIssues(surefireTestCase.FlakyError),
+ AmountFlakyErrors: amountOf(surefireTestCase.FlakyError),
+
+ FlakyFailures: toReRunIssues(surefireTestCase.FlakyFailure),
+ AmountFlakyFailures: amountOf(surefireTestCase.FlakyFailure),
+ Status: status,
+ }
+
+ testSuite.testcases = append(testSuite.testcases, testCase)
+ }
+ if b.labeler != nil {
+ testSuite.labels = b.labeler(&testSuite)
+ }
+ testResults.append(&testSuite)
+ }
+
+ return &testResults
+}
+
+type JUnitReportsReaderBuilder struct {
+ JUnitReportsReader JUnitReportsReader
+}
+
+func NewJUnitReportsReaderBuilder() *JUnitReportsReaderBuilder {
+ return &JUnitReportsReaderBuilder{
+ JUnitReportsReader: JUnitReportsReader{},
+ }
+}
+
+func (b *JUnitReportsReaderBuilder) WithLabeler(labeler Labeler) *JUnitReportsReaderBuilder {
+ b.JUnitReportsReader.labeler = labeler
+ return b
+}
+
+func (b *JUnitReportsReaderBuilder) Build() *JUnitReportsReader {
+ return &b.JUnitReportsReader
+}
+
+func parseSurefireReports(surefireReportFiles []string) ([]surefireTestsuite, error) {
+ testsuites := make([]surefireTestsuite, 0)
+ errors := make([]error, 0)
+ var wg sync.WaitGroup
+ reportMutex := sync.Mutex{}
+ errorMutex := sync.Mutex{}
+ wg.Add(len(surefireReportFiles))
+
+ for _, file := range surefireReportFiles {
+ go func(file string) {
+ xmlFile, openFileError := os.Open(file)
+ suite, readReportError := readReport(xmlFile)
+ suite.Filename = file
+ closeFileError := xmlFile.Close()
+ if openFileError != nil || readReportError != nil || closeFileError != nil {
+ errorMutex.Lock()
+ if openFileError != nil {
+ errors = append(errors, openFileError)
+ }
+ if readReportError != nil {
+ errors = append(errors, readReportError)
+ }
+ if closeFileError != nil {
+ errors = append(errors, closeFileError)
+ }
+
+ wg.Done()
+ errorMutex.Unlock()
+ return
+ }
+ reportMutex.Lock()
+ if suite.Name != "" {
+ testsuites = append(testsuites, suite)
+ }
+ wg.Done()
+ reportMutex.Unlock()
+ }(file)
+ }
+ wg.Wait()
+ if len(errors) > 0 {
+ slog.Error("error reading test report files", "errors", errors)
+ return nil, fmt.Errorf("one or more error occured when reading test report files %s", errors)
+ }
+ return testsuites, nil
+}
+
+// readReport parses xml content from given reader and returns a Testsuite
+func readReport(reader io.Reader) (surefireTestsuite, error) {
+ var testsuite surefireTestsuite
+
+ decoder := xml.NewDecoder(reader)
+ err := decoder.Decode(&testsuite)
+ if err != nil {
+ return surefireTestsuite{}, fmt.Errorf("error decoding XML: %s", err)
+
+ }
+
+ return testsuite, nil
+}
diff --git a/surefire-reader_test.go b/surefire-reader_test.go
new file mode 100644
index 0000000..69f3947
--- /dev/null
+++ b/surefire-reader_test.go
@@ -0,0 +1,28 @@
+/*
+Copyright 2023 Adobe. All rights reserved.
+This file is licensed to you under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License. You may obtain a copy
+of the License at http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under
+the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
+OF ANY KIND, either express or implied. See the License for the specific language
+governing permissions and limitations under the License.
+*/
+
+package surefire
+
+import (
+ "testing"
+
+ a "github.com/stretchr/testify/assert"
+)
+
+func TestUnMarshalInvalidXml(t *testing.T) {
+ assert := a.New(t)
+ suites, err := parseSurefireReports([]string{
+ "./sample/failsafe-summary.xml",
+ "./sample/TEST-org.example.AnotherIT.xml"})
+ assert.Nil(err)
+ assert.Equal(1, len(suites))
+}
diff --git a/test-results-conversion.go b/test-results-conversion.go
new file mode 100644
index 0000000..943cc21
--- /dev/null
+++ b/test-results-conversion.go
@@ -0,0 +1,47 @@
+/*
+Copyright 2023 Adobe. All rights reserved.
+This file is licensed to you under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License. You may obtain a copy
+of the License at http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under
+the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
+OF ANY KIND, either express or implied. See the License for the specific language
+governing permissions and limitations under the License.
+*/
+
+package surefire
+
+func optionalTestProblem(p *surefireProblem) *Issue {
+ if p == nil {
+ return nil
+ }
+
+ return &Issue{Message: p.Message, Detail: p.Data}
+}
+
+func toReRunIssues(runs []surefireRerun) []RerunIssue {
+ if runs == nil || len(runs) == 0 {
+ return nil
+ }
+
+ issues := make([]RerunIssue, len(runs))
+ for i, r := range runs {
+ issues[i] = RerunIssue{
+ Message: r.Message,
+ Stacktrace: r.Stacktrace,
+ SystemOut: r.SystemOut,
+ SystemError: r.SystemError,
+ }
+ }
+
+ return issues
+}
+
+func amountOf(runs []surefireRerun) int {
+ if runs == nil {
+ return 0
+ }
+
+ return len(runs)
+}
diff --git a/test-results-conversion_test.go b/test-results-conversion_test.go
new file mode 100644
index 0000000..9007798
--- /dev/null
+++ b/test-results-conversion_test.go
@@ -0,0 +1,397 @@
+/*
+Copyright 2023 Adobe. All rights reserved.
+This file is licensed to you under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License. You may obtain a copy
+of the License at http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under
+the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
+OF ANY KIND, either express or implied. See the License for the specific language
+governing permissions and limitations under the License.
+*/
+
+package surefire
+
+import (
+ "regexp"
+ "testing"
+
+ a "github.com/stretchr/testify/assert"
+)
+
+func TestConvertNonIntersectedTestCasesResult(t *testing.T) {
+ suites := []surefireTestsuite{
+ {
+ Name: "Failure-Suite",
+ Time: 1.0,
+ Testcases: []surefireTestcase{
+ {
+ Name: "Test-1",
+ Time: 1.0,
+ Failure: &surefireProblem{
+ Message: "Failure-1",
+ Data: "Failure-1-Data",
+ },
+ },
+ {
+ Name: "Test-2",
+ Time: 1.0,
+ Error: &surefireProblem{
+ Message: "Error-1",
+ Data: "Error-1-Data",
+ },
+ },
+ },
+ },
+ {
+ Name: "Success-Suite",
+ Time: 1.0,
+ Testcases: []surefireTestcase{
+ {
+ Name: "Test-3",
+ Time: 1.0,
+ },
+ },
+ },
+ {
+ Name: "Skipped-Suite",
+ Time: 1.0,
+ Testcases: []surefireTestcase{
+ {
+ Name: "Test-4",
+ Time: 1.0,
+ Skipped: &surefireSkipped{Message: "Skipped"},
+ },
+ },
+ },
+ }
+ assert := a.New(t)
+ testResult := NewJUnitReportsReaderBuilder().Build().FromJUnitRepresentation(suites)
+ assert.Equal(3, len(testResult.TestSuites()))
+ assert.Equal(1, testResult.Errors())
+ assert.Equal(1, testResult.Failures())
+ assert.Equal(1, testResult.Skipped())
+ assert.Equal(4, testResult.Tests())
+ assert.Equal(0, testResult.Flakes())
+
+ failureSuite := suiteByName("Failure-Suite", testResult.TestSuites())
+ assert.NotNil(failureSuite)
+ assert.Equal(2, len(failureSuite.NonSuccessfulTestCases()))
+ assert.Equal(1.0, failureSuite.Time())
+
+ testCase1 := caseByName("Test-1", failureSuite.NonSuccessfulTestCases())
+ assert.NotNil(testCase1)
+ assert.Equal("Failure-Suite", testCase1.Suite.Name())
+ assert.NotNil(testCase1.Issue)
+ assert.Equal("Failure-1", testCase1.Issue.Message)
+ assert.Equal("Failure-1-Data", testCase1.Issue.Detail)
+
+ testCase2 := caseByName("Test-2", failureSuite.NonSuccessfulTestCases())
+ assert.NotNil(testCase2)
+ assert.Equal("Failure-Suite", testCase2.Suite.Name())
+ assert.NotNil(testCase2.Issue)
+ assert.Equal("Error-1", testCase2.Issue.Message)
+ assert.Equal("Error-1-Data", testCase2.Issue.Detail)
+
+ successSuite := suiteByName("Success-Suite", testResult.TestSuites())
+ assert.NotNil(successSuite)
+ assert.Equal(1, len(successSuite.SuccessfulTestCases()))
+ assert.Equal(1.0, successSuite.Time())
+ testCase3 := caseByName("Test-3", successSuite.SuccessfulTestCases())
+ assert.NotNil(testCase3)
+
+ skippedSuite := suiteByName("Skipped-Suite", testResult.TestSuites())
+ assert.NotNil(skippedSuite)
+ assert.Equal(1, len(skippedSuite.SkippedTestCases()))
+ assert.Equal(1.0, skippedSuite.Time())
+
+ testCase4 := caseByName("Test-4", skippedSuite.SkippedTestCases())
+ assert.NotNil(testCase4)
+ assert.Equal("Skipped-Suite", testCase4.Suite.Name())
+ assert.NotNil(testCase4.Skipped)
+ assert.Equal("Skipped", testCase4.Skipped.Message)
+}
+
+func TestConvertIntersectedTestCasesResult(t *testing.T) {
+ suites := []surefireTestsuite{
+ {
+ Name: "Intersected-Suite",
+ Time: 1.0,
+ Testcases: []surefireTestcase{
+ {
+ Name: "Test-1",
+ Time: 1.0,
+ Failure: &surefireProblem{
+ Message: "Failure-1",
+ Data: "Failure-1-Data",
+ },
+ },
+ {
+ Name: "Test-2",
+ Time: 1.0,
+ Error: &surefireProblem{
+ Message: "Error-1",
+ Data: "Error-1-Data",
+ },
+ },
+ {
+ Name: "Test-3",
+ Time: 1.0,
+ },
+ {
+ Name: "Test-4",
+ Time: 1.0,
+ Skipped: &surefireSkipped{Message: "Skipped"},
+ },
+ },
+ },
+ }
+ assert := a.New(t)
+ testResult := NewJUnitReportsReaderBuilder().Build().FromJUnitRepresentation(suites)
+ assert.Equal(1, len(testResult.TestSuites()))
+ assert.Equal(1, testResult.Errors())
+ assert.Equal(1, testResult.Failures())
+ assert.Equal(1, testResult.Skipped())
+ assert.Equal(4, testResult.Tests())
+ assert.Equal(0, testResult.Flakes())
+
+ suite := suiteByName("Intersected-Suite", testResult.TestSuites())
+ assert.NotNil(suite)
+ assert.Equal(2, len(suite.NonSuccessfulTestCases()))
+ assert.Equal(1, len(suite.SuccessfulTestCases()))
+ assert.Equal(1, len(suite.SkippedTestCases()))
+
+ testCase1 := caseByName("Test-1", suite.NonSuccessfulTestCases())
+ assert.NotNil(testCase1)
+ assert.Equal("Intersected-Suite", testCase1.Suite.Name())
+ assert.NotNil(testCase1.Issue)
+ assert.Equal("Failure-1", testCase1.Issue.Message)
+ assert.Equal("Failure-1-Data", testCase1.Issue.Detail)
+
+ testCase2 := caseByName("Test-2", suite.NonSuccessfulTestCases())
+ assert.NotNil(testCase2)
+ assert.Equal("Intersected-Suite", testCase2.Suite.Name())
+ assert.NotNil(testCase2.Issue)
+ assert.Equal("Error-1", testCase2.Issue.Message)
+ assert.Equal("Error-1-Data", testCase2.Issue.Detail)
+
+ assert.Equal(1, len(suite.SuccessfulTestCases()))
+
+ testCase3 := caseByName("Test-3", suite.SuccessfulTestCases())
+ assert.Equal("Intersected-Suite", testCase3.Suite.Name())
+ assert.NotNil(testCase3)
+
+ assert.Equal(1, len(suite.SkippedTestCases()))
+
+ testCase4 := caseByName("Test-4", suite.SkippedTestCases())
+ assert.NotNil(testCase4)
+ assert.Equal("Intersected-Suite", testCase4.Suite.Name())
+ assert.NotNil(testCase4.Skipped)
+ assert.Equal("Skipped", testCase4.Skipped.Message)
+}
+
+func TestFlakyRuns(t *testing.T) {
+ suites := []surefireTestsuite{
+ {
+ Name: "Flaky-Suite",
+ Time: 1.0,
+ Testcases: []surefireTestcase{
+ {
+ Name: "FlakyTest-1",
+ Time: 1.0,
+ ReRunErrors: []surefireRerun{
+ {
+ Message: "Rerun-Error-1",
+ Stacktrace: "Rerun-Error-1-Stacktrace",
+ SystemError: "Rerun-Error-1-SystemError",
+ SystemOut: "Rerun-Error-1-SystemOut",
+ },
+ {
+ Message: "Rerun-Error-2",
+ Stacktrace: "Rerun-Error-2-Stacktrace",
+ SystemError: "Rerun-Error-2-SystemError",
+ SystemOut: "Rerun-Error-2-SystemOut",
+ },
+ },
+ ReRunFailures: []surefireRerun{
+ {
+ Message: "Rerun-Failure-1",
+ Stacktrace: "Rerun-Failure-1-Stacktrace",
+ SystemError: "Rerun-Failure-1-SystemError",
+ SystemOut: "Rerun-Failure-1-SystemOut",
+ },
+ {
+ Message: "Rerun-Failure-2",
+ Stacktrace: "Rerun-Failure-2-Stacktrace",
+ SystemError: "Rerun-Failure-2-SystemError",
+ SystemOut: "Rerun-Failure-2-SystemOut",
+ },
+ },
+ FlakyError: []surefireRerun{
+ {
+ Message: "FlakyError-1",
+ Stacktrace: "FlakyError-1-Stacktrace",
+ SystemError: "FlakyError-1-SystemError",
+ SystemOut: "FlakyError-1-SystemOut",
+ },
+ {
+ Message: "FlakyError-2",
+ Stacktrace: "FlakyError-2-Stacktrace",
+ SystemError: "FlakyError-2-SystemError",
+ SystemOut: "FlakyError-2-SystemOut",
+ },
+ },
+ FlakyFailure: []surefireRerun{
+ {
+ Message: "FlakyFailure-1",
+ Stacktrace: "FlakyFailure-1-Stacktrace",
+ SystemError: "FlakyFailure-1-SystemError",
+ SystemOut: "FlakyFailure-1-SystemOut",
+ },
+ {
+ Message: "FlakyFailure-2",
+ Stacktrace: "FlakyFailure-2-Stacktrace",
+ SystemError: "FlakyFailure-2-SystemError",
+ SystemOut: "FlakyFailure-2-SystemOut",
+ },
+ },
+ },
+ },
+ },
+ }
+ assert := a.New(t)
+ testResult := NewJUnitReportsReaderBuilder().Build().FromJUnitRepresentation(suites)
+ assert.Equal(1, len(testResult.TestSuites()))
+ assert.Equal(1, testResult.Tests())
+ assert.Equal(1, testResult.Flakes())
+
+ failureSuite := suiteByName("Flaky-Suite", testResult.TestSuites())
+ assert.NotNil(failureSuite)
+ assert.Equal(1, len(failureSuite.SuccessfulTestCases()))
+
+ flakyTest := caseByName("FlakyTest-1", failureSuite.SuccessfulTestCases())
+ assert.NotNil(flakyTest)
+
+ assert.NotNil(flakyTest.RerunFailures)
+ assert.Equal(2, flakyTest.AmountRerunFailures)
+ for _, r := range flakyTest.RerunFailures {
+ assert.NotNil(r)
+ assert.Regexp("Rerun-Failure-[1-2]", r.Message)
+ assert.Regexp("Rerun-Failure-[1-2]-Stacktrace", r.Stacktrace)
+ assert.Regexp("Rerun-Failure-[1-2]-SystemError", r.SystemError)
+ assert.Regexp("Rerun-Failure-[1-2]-SystemOut", r.SystemOut)
+ }
+
+ assert.NotNil(flakyTest.RerunErrors)
+ assert.Equal(2, flakyTest.AmountRerunErrors)
+ for _, r := range flakyTest.RerunErrors {
+ assert.NotNil(r)
+ assert.Regexp("Rerun-Error-[1-2]", r.Message)
+ assert.Regexp("Rerun-Error-[1-2]-Stacktrace", r.Stacktrace)
+ assert.Regexp("Rerun-Error-[1-2]-SystemError", r.SystemError)
+ assert.Regexp("Rerun-Error-[1-2]-SystemOut", r.SystemOut)
+ }
+
+ assert.NotNil(flakyTest.FlakyFailures)
+ assert.Equal(2, flakyTest.AmountFlakyFailures)
+ for _, r := range flakyTest.FlakyFailures {
+ assert.NotNil(r)
+ assert.Regexp("FlakyFailure-[1-2]", r.Message)
+ assert.Regexp("FlakyFailure-[1-2]-Stacktrace", r.Stacktrace)
+ assert.Regexp("FlakyFailure-[1-2]-SystemError", r.SystemError)
+ assert.Regexp("FlakyFailure-[1-2]-SystemOut", r.SystemOut)
+ }
+
+ assert.NotNil(flakyTest.FlakyErrors)
+ assert.Equal(2, flakyTest.AmountFlakyErrors)
+ for _, r := range flakyTest.FlakyErrors {
+ assert.NotNil(r)
+ assert.Regexp("FlakyError-[1-2]", r.Message)
+ assert.Regexp("FlakyError-[1-2]-Stacktrace", r.Stacktrace)
+ assert.Regexp("FlakyError-[1-2]-SystemError", r.SystemError)
+ assert.Regexp("FlakyError-[1-2]-SystemOut", r.SystemOut)
+ }
+}
+
+func TestAssignStaticLabels(t *testing.T) {
+ suites := []surefireTestsuite{
+ {
+ Name: "Success-Suite",
+ Time: 1.0,
+ Testcases: []surefireTestcase{
+ {
+ Name: "Test-3",
+ Time: 1.0,
+ },
+ },
+ },
+ }
+
+ assert := a.New(t)
+ testResult := NewJUnitReportsReaderBuilder().WithLabeler(assignStaticLabeler).Build().FromJUnitRepresentation(suites)
+
+ assert.NotNil(testResult)
+
+ assert.NotNil(suiteByName("Success-Suite", testResult.TestSuites()).Labels())
+ assert.Contains(suiteByName("Success-Suite", testResult.TestSuites()).Labels(), "myCategory")
+}
+
+func TestAssignMultipleLabelsByRegex(t *testing.T) {
+ suites := []surefireTestsuite{
+ {
+ Name: "Success-SuiteIT",
+ Time: 1.0,
+ Testcases: []surefireTestcase{
+ {
+ Name: "Test-3",
+ Time: 1.0,
+ },
+ },
+ },
+ }
+
+ assert := a.New(t)
+ testResult := NewJUnitReportsReaderBuilder().WithLabeler(regexLabeler).Build().FromJUnitRepresentation(suites)
+
+ assert.NotNil(testResult)
+
+ assert.NotNil(suiteByName("Success-SuiteIT", testResult.TestSuites()).Labels())
+ assert.Contains(suiteByName("Success-SuiteIT", testResult.TestSuites()).Labels(), "ATest")
+ assert.Contains(suiteByName("Success-SuiteIT", testResult.TestSuites()).Labels(), "ATest")
+ assert.Contains(suiteByName("Success-SuiteIT", testResult.TestSuites()).Labels(), "Integration-Test")
+}
+
+func regexLabeler(testcase TestSuite) []string {
+ cats := make([]string, 2)
+ r, _ := regexp.Compile(".+IT")
+
+ if r.MatchString(testcase.Name()) {
+ cats = append(cats, "Integration-Test")
+ }
+ cats = append(cats, "ATest")
+
+ return cats
+}
+
+func assignStaticLabeler(dummy TestSuite) []string {
+ cats := []string{"myCategory"}
+ return cats
+}
+
+func suiteByName(suitename string, suites []TestSuite) TestSuite {
+ for _, s := range suites {
+ if s.Name() == suitename {
+ return s
+ }
+ }
+ return nil
+}
+
+func caseByName(casename string, cases []TestCase) *TestCase {
+ for _, c := range cases {
+ if c.Name == casename {
+ return &c
+ }
+ }
+ return nil
+}
diff --git a/test-results-interface.go b/test-results-interface.go
new file mode 100644
index 0000000..8dbac25
--- /dev/null
+++ b/test-results-interface.go
@@ -0,0 +1,305 @@
+/*
+Copyright 2023 Adobe. All rights reserved.
+This file is licensed to you under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License. You may obtain a copy
+of the License at http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under
+the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
+OF ANY KIND, either express or implied. See the License for the specific language
+governing permissions and limitations under the License.
+*/
+
+package surefire
+
+// TestResults aggregates all TestSuites being read from the surefire reports and expose statistics
+type TestResults interface {
+ // All being read from the surefire reports. Except for those with an empty name attribute
+ TestSuites() []TestSuite
+
+ // The amount of a all tests
+ Tests() int
+
+ // The amount of tests that were successful
+ Successes() int
+
+ // The amount of failing tests
+ Failures() int
+
+ // The amount of tests in error
+ Errors() int
+
+ // The amount of skipped tests
+ Skipped() int
+
+ // The amount flaky tests
+ Flakes() int
+}
+
+// Implementation of TestResults
+type testResults struct {
+ tests int
+ successes int
+ failures int
+ errors int
+ skipped int
+ flakes int
+ suites []TestSuite
+}
+
+// TestSuite represents a set of TestCase and exposes statistics
+type TestSuite interface {
+ // Returns all test cases
+ TestCases() []TestCase
+
+ // Returns non successful test cases, either failing or in error
+ NonSuccessfulTestCases() []TestCase
+
+ // Returns successful test cases
+ SuccessfulTestCases() []TestCase
+
+ // Returns skipped test cases
+ SkippedTestCases() []TestCase
+
+ // Returns flaky test cases
+ FlakyTestCases() []TestCase
+
+ // The amount of successful tests in this suite
+ Success() int
+
+ // The amount of failing tests in this suite
+ Failure() int
+
+ // The amount of tests in this suite that are in error
+ Error() int
+
+ // The amount of skipped tests in this suite
+ Skipped() int
+
+ // Name of the suite
+ Name() string
+
+ // Filename from which the result was coming from
+ Filename() string
+
+ // The time this suite needs to run
+ Time() float64
+
+ // Labels the suite is assigned to
+ Labels() []string
+}
+
+// implementation of TestSuite
+type testSuite struct {
+ testcases []TestCase
+ name string
+ filename string
+ time float64
+ successes int
+ failures int
+ errors int
+ skipped int
+
+ // Labels the suite is assigned to
+ labels []string
+}
+
+// TestCase represents a single test run
+type TestCase struct {
+ // Name of the test case
+ Name string
+
+ // Backreference to the suite this test case belongs to
+ Suite TestSuite
+
+ // Status of this test case
+ Status Status
+
+ // The time this test case needs to run
+ Time float64
+
+ // Full qualified name of the test case
+ Fullname string
+
+ // Classname of this test case
+ Classname string
+
+ // Issue this test case has. If nil there was no issue with it
+ Issue *Issue
+
+ // The failures which appeared that leads to a re-run of this failing test
+ RerunFailures []RerunIssue
+
+ // The amount of failure which appeared that leads to a re-run of this test
+ AmountRerunFailures int
+
+ // The errors which appeared that leads to a re-run of this test in error
+ RerunErrors []RerunIssue
+
+ // The amount of errors which appeared that leads to a re-run of this test
+ AmountRerunErrors int
+
+ // The failures which appeared that leads to a re-run of this flaky test
+ FlakyFailures []RerunIssue
+
+ // The amount of failures which appeared that leads to a re-run of this flaky test
+ AmountFlakyFailures int
+
+ // The errors which appeared that leads to a re-run of this flaky test
+ FlakyErrors []RerunIssue
+
+ // The amount of errors which appeared that leads to a re-run of this flaky test
+ AmountFlakyErrors int
+
+ // Set for a skipped test, nil otherwise
+ Skipped *Skipped
+}
+
+// Issue encapsulates a failure or error
+type Issue struct {
+ // Message for that issue
+ Message string
+ // Details for that issue
+ Detail string
+}
+
+// RerunIssue encapsulates a rerun failure or error
+type RerunIssue struct {
+ // Message for that RerunIssue
+ Message string
+ // Stacktrace for that RerunIssue
+ Stacktrace string
+ // SystemOut for that RerunIssue
+ SystemOut string
+ // SystemError for that RerunIssue
+ SystemError string
+}
+
+// Issue encapsulates the message of a skipped test
+type Skipped struct {
+ Message string
+}
+
+type Labeler func(TestSuite) []string
+
+// Status represents the status of a test case
+type Status string
+
+const (
+ Success Status = "success"
+ Skip Status = "skipped"
+ Failure Status = "failure"
+ Error Status = "error"
+ Flaky Status = "flaky"
+)
+
+func (r *testResults) TestSuites() []TestSuite {
+ return r.suites
+}
+
+func (t *testSuite) NonSuccessfulTestCases() []TestCase {
+ return t.filterTestCases(func(testCase TestCase) bool {
+ return testCase.Issue != nil
+ })
+}
+
+func (t *testSuite) SuccessfulTestCases() []TestCase {
+ return t.filterTestCases(func(testCase TestCase) bool {
+ return testCase.Issue == nil && testCase.Skipped == nil
+ })
+}
+
+func (t *testSuite) SkippedTestCases() []TestCase {
+ return t.filterTestCases(func(testCase TestCase) bool {
+ return testCase.Skipped != nil
+ })
+}
+
+func (t *testSuite) FlakyTestCases() []TestCase {
+ return t.filterTestCases(func(testCase TestCase) bool {
+ return testCase.AmountFlakyErrors != 0 ||
+ testCase.AmountFlakyFailures != 0
+ })
+}
+
+func (t *testSuite) filterTestCases(predicate func(testCase TestCase) bool) []TestCase {
+ _cases := make([]TestCase, 0)
+
+ for _, testCase := range t.testcases {
+ if predicate(testCase) {
+ _cases = append(_cases, testCase)
+ }
+ }
+
+ return _cases
+}
+
+func (r *testSuite) TestCases() []TestCase {
+ return r.testcases
+}
+
+func (r *testSuite) Success() int {
+ return r.successes
+}
+
+func (r *testSuite) Failure() int {
+ return r.failures
+}
+
+func (r *testSuite) Error() int {
+ return r.errors
+}
+
+func (r *testSuite) Skipped() int {
+ return r.skipped
+}
+
+func (r *testSuite) Name() string {
+ return r.name
+}
+
+func (r *testSuite) Time() float64 {
+ return r.time
+}
+
+func (r *testSuite) Labels() []string {
+ return r.labels
+}
+
+func (r *testSuite) Filename() string {
+ return r.filename
+}
+
+func (r *testResults) Successes() int {
+ return r.successes
+}
+
+func (r *testResults) Failures() int {
+ return r.failures
+}
+
+func (r *testResults) Errors() int {
+ return r.errors
+}
+
+func (r *testResults) Skipped() int {
+ return r.skipped
+}
+
+func (r *testResults) Tests() int {
+ return r.tests
+}
+
+func (r *testResults) Flakes() int {
+ return r.flakes
+}
+
+func (r *testResults) append(suite *testSuite) {
+ r.tests += len(suite.TestCases())
+ r.successes += suite.Success()
+ r.errors += suite.Error()
+ r.failures += suite.Failure()
+ r.skipped += suite.Skipped()
+ r.flakes += len(suite.FlakyTestCases())
+ r.suites = append(r.suites, suite)
+}