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

Support for nested test suites #37

Merged
merged 5 commits into from
Jul 2, 2020
Merged

Conversation

ekharchenko-avito
Copy link
Contributor

  • merged William Petit changes to support suite-in-suite embedding
  • added suite Properties fulfillment from attributes (like it already was for testcase)
  • added test for that

Copy link
Owner

@joshdk joshdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your submission @ekharchenko-avito! This is another interesting edge-case.

PR looks generally fine to me, left a few simple comments.


One thought I had (and I don't really have enough data to have an opinion on this) was that instead of nesting suites the way they are contained in the XML:

suite-a
 `- test-a
 `- suite-b
     `- test-b
     `- test-b

Would it make any sense to flatten the structure into something like this:

suite-atest-a
suite-a.suite-b.test-b
suite-a.suite-b.test-b

This transform would be done only to benefit users of the library, but again, I don't have any data to know if that would be the case. Thoughts?

Thanks again, cheers!

ingest.go Show resolved Hide resolved
types.go Outdated Show resolved Hide resolved
types.go Show resolved Hide resolved
ingest_test.go Show resolved Hide resolved
Co-authored-by: Josh Komoroske <[email protected]>
@ekharchenko-avito
Copy link
Contributor Author

Would it make any sense to flatten the structure into something like this:

That don't make sense for my use case.
That will give /untitled/tests.SampleTest.SampleTest::testB in an example PHPUnit file which is a mess of original command line tests selector, class name, and test method name. Don't really want to parse-out those parts from the flattened name in production code.

Added test ingesting phpunit output
@joshdk
Copy link
Owner

joshdk commented Jul 2, 2020

Apologies for the delay @ekharchenko-avito. Thank you so much for your contribution! 🎉

@joshdk joshdk changed the title Support for proper parsing of phpunit junit.xml output Support for nested test suites Jul 2, 2020
@joshdk joshdk merged commit 6efcf40 into joshdk:master Jul 2, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants