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

Junit report - add required fields #4

Merged
merged 3 commits into from
Jul 23, 2019
Merged

Junit report - add required fields #4

merged 3 commits into from
Jul 23, 2019

Conversation

slawekjaranowski
Copy link
Member

No description provided.

Signed-off-by: Slawomir Jaranowski <s.jaranowski@gmail.com>
Signed-off-by: Slawomir Jaranowski <s.jaranowski@gmail.com>
Copy link

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

@@ -1874,8 +1874,15 @@ private void writeJunitReport( BuildJob buildJob, String safeFileName, Execution
{
File reportFile = new File( reportsDirectory, "TEST-" + safeFileName + ".xml" );
Xpp3Dom testsuite = new Xpp3Dom( "testsuite" );
testsuite.setAttribute( "tests", "1" );
testsuite.setAttribute("name", junitPackageName + "." + safeFileName);
Copy link

Choose a reason for hiding this comment

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

pls follow the checkstyle as it is everywhere: spaces, thx
Most probably you did not run the build (mvn -P run-its verify) on this project, check for errors, thx.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@Tibor17
Copy link

Tibor17 commented Jul 21, 2019

@eolivelli
I don't know if invoker's TEST-project.xml has the attributes errors, skipped, failures. I have never seen it before. So I cannot fully evaluate the fix.

@@ -1874,8 +1874,15 @@ private void writeJunitReport( BuildJob buildJob, String safeFileName, Execution
{
File reportFile = new File( reportsDirectory, "TEST-" + safeFileName + ".xml" );
Xpp3Dom testsuite = new Xpp3Dom( "testsuite" );
testsuite.setAttribute( "tests", "1" );
Copy link
Member

Choose a reason for hiding this comment

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

Sounds correct... why removing tests number?

Copy link
Member Author

Choose a reason for hiding this comment

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

it was moved, together with other attributes - see line 1881

Copy link
Member

Choose a reason for hiding this comment

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

ooops sorry I didn't catch that

@@ -1874,8 +1874,15 @@ private void writeJunitReport( BuildJob buildJob, String safeFileName, Execution
{
File reportFile = new File( reportsDirectory, "TEST-" + safeFileName + ".xml" );
Xpp3Dom testsuite = new Xpp3Dom( "testsuite" );
testsuite.setAttribute( "tests", "1" );
testsuite.setAttribute("name", junitPackageName + "." + safeFileName);
Copy link
Member

Choose a reason for hiding this comment

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

testcase has the test name. This one should be only the package name as it's a suite?

Copy link
Member Author

Choose a reason for hiding this comment

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

it is like in maven-surefire plugin, it is result after test with sonarqube - this is required to be set to something

Signed-off-by: Slawomir Jaranowski <s.jaranowski@gmail.com>
@slawekjaranowski
Copy link
Member Author

@olamy olamy merged commit 79a84b7 into apache:master Jul 23, 2019
@slawekjaranowski slawekjaranowski deleted the junit-report branch February 16, 2020 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants