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

Wrong classname for Parameterized Tests on jenkins #1630

Closed
jukzi opened this issue Dec 4, 2023 · 11 comments · Fixed by #1631
Closed

Wrong classname for Parameterized Tests on jenkins #1630

jukzi opened this issue Dec 4, 2023 · 11 comments · Fixed by #1631
Labels
bug Something isn't working

Comments

@jukzi
Copy link
Contributor

jukzi commented Dec 4, 2023

for example org.eclipse.equinox.common.tests.text.StringMatcherFindTest
results in junit result XMLs like

<testcase classname="[line 50: NOK pattern=a*bc*d, text=.abeced[0,7]]" name="testFind[line 50: NOK pattern=a*bc*d, text=.abeced[0,7]]" time="0.0" />
which jenkins shows like

https://ci.eclipse.org/releng/job/AutomatedTests/job/ep431I-unit-win32-java17/lastSuccessfulBuild/testReport/[line%20103_%20OK%20pattern=*a*b*g*n*t,%20text=abcd_abcdefg_abcdefghijk_abcdefghijklmnop/txt]/testStringMatchCaseInsensitive_line_103__OK_pattern__a_b_g_n_t__text_abcd_abcdefg_abcdefghijk_abcdefghijklmnop_txt_/

the "classname" in the xml is wrong.

https://openclover.org/doc/manual/4.2.0/maven--surefire-and-junit4-parameterized-tests.html
say we have to add JUnitTestRunnerInterceptor to maven-surefire-plugin

@jukzi jukzi added the bug Something isn't working label Dec 4, 2023
jukzi pushed a commit to jukzi/eclipse.platform.releng.aggregator that referenced this issue Dec 4, 2023
jukzi pushed a commit to jukzi/eclipse.platform.releng.aggregator that referenced this issue Dec 4, 2023
jukzi pushed a commit to jukzi/eclipse.platform.releng.aggregator that referenced this issue Dec 4, 2023
akurtakov pushed a commit to jukzi/eclipse.platform.releng.aggregator that referenced this issue Dec 4, 2023
akurtakov pushed a commit to jukzi/eclipse.platform.releng.aggregator that referenced this issue Dec 5, 2023
@jukzi
Copy link
Contributor Author

jukzi commented Dec 6, 2023

Causes SWT builds to fail :-(
Idea anybody how to solve, or revert?

@akurtakov
Copy link
Member

@jukzi
Copy link
Contributor Author

jukzi commented Dec 6, 2023

How to "dependency to this one being added in the surefire configuration (dependency tag) " ? Can we try to?

@akurtakov
Copy link
Member

Please test with swt locally whether your change works.

@jukzi
Copy link
Contributor Author

jukzi commented Dec 6, 2023

Please test with swt locally whether your change works.

I have no clue how todo so, i never build locally. please instruct

@akurtakov
Copy link
Member

mvn clean verify in eclipse.platform.swt repo with eclipse.platform.swt.binaries being next to it.

@laeubi
Copy link
Contributor

laeubi commented Dec 6, 2023

Please test with swt locally whether your change works.

I have no clue how todo so, i never build locally. please instruct

The Jenkinsfile gives you a hint how to execute this on your machine.

Beside that I have no clue what "clover" is and where we use it but wanted to mention that the tests are not executed with standard maven-surefire-plugin, for verification builds it uses tycho-surefire-plugin and the I-Builds use something totally different, so any documentation that assumes standard testing setups might not apply here!

@akurtakov
Copy link
Member

For the record - SWT uses maven-surefire as the tests there are better run as plain old java https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/tests/org.eclipse.swt.tests/pom.xml

@iloveeclipse
Copy link
Member

Please test with swt locally whether your change works.

I have no clue how todo so, i never build locally. please instruct

@jukzi : in case you are not sure how to proceed, I would prefer to revert this PR and get SDK build running again.
I've created #1640 for tracking this issue.

@laeubi
Copy link
Contributor

laeubi commented Dec 6, 2023

https://github.com/openclover/clover-examples/blob/master/parameterized-junit4-example/pom.xml shows it needs

<dependency>
    <groupId>org.openclover</groupId>
    <artifactId>clover</artifactId>
    <version>4.4.1</version>
</dependency>

somehow to work ... I assume thats where the listener is located.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants