Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

New xml results file created for every test when running with Orchestrator #60

Open
joehoag opened this issue Oct 23, 2024 · 7 comments

Comments

@joehoag
Copy link

joehoag commented Oct 23, 2024

Hello. I am attempting to use xray-junit-extensions for an Android project. When we enable Orchestrator, I think that each test is interpreted as an individual test plan, and so we get a separate XML results file for each test / test case. So if we ran 1000 tests, we would get 1000 xml results files.

When we disable Orchestrator, we get the expected result: a single XML results file that contains all test cases.

We need to have Orchestrator enabled. Can you give me any advice as to how to overcome the one-results-file-per-test-case problem?

@bitcoder
Copy link
Collaborator

What is Orchestrator? I'm not aware of it

@joehoag
Copy link
Author

joehoag commented Oct 23, 2024

https://developer.android.com/training/testing/instrumented-tests/androidx-test-libraries/runner#use-android

Orchestrator clears out all app state before each test, and runs each test in its own instrumentation "sandbox". It is used to make sure that each test is run "fresh" and is not affected by leftover state from previous tests.

@bitcoder
Copy link
Collaborator

One thing that you could do is to merge the Junit XML reports together.
I remember the junit-merge tool but I haven't tested in a while. There are other though. Maybe that addresses your goal.
I have no experience with Orchestractor.

@joehoag
Copy link
Author

joehoag commented Oct 23, 2024

Thanks. We would pursue a merging solution as a last resort. Right now I'm working on finding some sort of hook that tells me when all of my tests have completed running. With that, I could tweak EnhancedLegacyXmlReportGeneratingListener.java to only produce the results file once all tests have completed.

@bitcoder
Copy link
Collaborator

@joehoag if you find it, that would be great if it could generalized and eventually included on this project. Can you get a sample and simple project that showcases the current behaviour so I can eventually try to replicate it?

@bitcoder
Copy link
Collaborator

any feedback on this @joehoag ?

@joehoag
Copy link
Author

joehoag commented Dec 28, 2024 via email

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

No branches or pull requests

2 participants