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

Suite task names broken: "Test class <name> is not enclosed by <suite>" and vintage suite names mangled #121

Closed
dji opened this issue Oct 25, 2024 · 1 comment

Comments

@dji
Copy link
Contributor

dji commented Oct 25, 2024

I'm seeing similar problems as #54 and #87, where TaskName is expecting the suite name to make up the first part of class names - likely as this code was first written for @Nested classes.

java.lang.RuntimeException: Test class path.to.my.TestClass is not enclosed by path.to.my.SuiteClass

#87 wasn't a complete fix as it only dealt with ClassSource test sources and not MethodSource ones.


Even with this fixed though, vintage test names were still being mangled. Where I would expect path.to.my.TestClass#testMethod with highlighting, I was seeing path.to.my.TestClasstestMethod(path.to.my.TestClass).

The problem is that when we chose a naming function based on engine that ran the test, we assume that a TestDescriptor has the Jupiter or Vintage engine in the first segment. In a suite though the Suite engine is actually the first segment, and Jupiter or Vintage is second.

dji added a commit to dji/sbt-jupiter-interface that referenced this issue Oct 25, 2024
… Vintage tests in Suites have their names properly formatted.
dji added a commit to dji/sbt-jupiter-interface that referenced this issue Oct 25, 2024
… Vintage tests in Suites have their names properly formatted.
@dji
Copy link
Contributor Author

dji commented Oct 25, 2024

#122 fixes both of these issues for me, although we aren't using a ton of suite features

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

1 participant