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

Parameterized test method names are not visible in failure report #436

Open
TWiStErRob opened this issue Apr 6, 2023 · 3 comments
Open

Comments

@TWiStErRob
Copy link

It seems that the parameterized test method names are missing from the report. Here's an example:

	@ParameterizedTest(name = "{0}")
	@ValueSource(
		strings = [
			"net.twisterrob.gradle.plugin.root", // :plugin:base
			"net.twisterrob.gradle.plugin.java", // :plugin:languages
			"net.twisterrob.gradle.plugin.java-library", // :plugin:languages
			// Kotlin: "net.twisterrob.gradle.plugin.kotlin", // :plugin:languages
			"net.twisterrob.gradle.plugin.vcs", // :plugin:versioning
			"net.twisterrob.gradle.plugin.quality", // :quality
			"net.twisterrob.gradle.plugin.pmd", // :pmd
			"net.twisterrob.gradle.plugin.checkstyle", // :checkstyle
			// Android: "net.twisterrob.gradle.plugin.gradle.test", // :test
		]
	)
	fun `android library project doesn't create tasks when using plugin`(pluginId: String) {

In the below screenshot you can see that it's in the net.twisterrob.gradle.PluginIntegrationTest class, and that the parameter was net.twisterrob.gradle.plugin.root, but you can't see the actual method name. In the real code I have multiple @ParameterizedTest methods, which have the same-ish parameter lists so distinguishing between them is important.

image

In the IDE it looks like this (clean hierarchy):
image

Actions link: https://github.com/TWiStErRob/net.twisterrob.gradle/pull/452/checks?check_run_id=12572964034

Here's the relevant artifacts that are used in publishing the report:
AGP 7.2.x on Gradle 7.3+ (7.2.2 on 7.3.3) Test Results HTML.zip
AGP 7.2.x on Gradle 7.3+ (7.2.2 on 7.3.3) Test Results XMLs.zip

It seems that the XML doesn't have this information, but the HTML does... 🤨.

@EnricoMi
Copy link
Owner

EnricoMi commented Apr 7, 2023

Well, if it is not in the XML, I can't do anything about it.

Maybe worth reporting to the project of the code that writes the XML.

@TWiStErRob
Copy link
Author

Would you accept contribution for a binary parser?

@EnricoMi
Copy link
Owner

EnricoMi commented Apr 8, 2023

A parser for which binary format?

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