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

end-to-end test for JUnit report #210

Merged
merged 6 commits into from May 17, 2018
Merged

end-to-end test for JUnit report #210

merged 6 commits into from May 17, 2018

Conversation

vincentml
Copy link
Collaborator

This pull request adds end-to-end tests for JUnit report output from XSpec.

This is step 2 of the plan as suggested by @AirQuick

@vincentml vincentml requested a review from AirQuick May 9, 2018 00:14
@vincentml vincentml added the test label May 9, 2018
</html>
Copy link
Member

Choose a reason for hiding this comment

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

Probably 75048a9 is an accidental commit and should be reverted?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've reverted this change. When I rebased the branch I had been trying a new text editor and it had an unexpected default setting to automatically reformat whitespace.

xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- output serialization parameters should be in line with XSPEC_HOME/src/reporter/junit-report.xsl -->
<xsl:output name="junit" method="xml" omit-xml-declaration="yes" indent="yes"/>
Copy link
Member

@AirQuick AirQuick May 12, 2018

Choose a reason for hiding this comment

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

I think this xsl:output should be just <xsl:output name="junit"/>.
XSPEC_HOME/src/reporter/junit-report.xsl has xsl:output with @indent etc, but it has name="escaped" which is not referenced. The serialization parameter is thus effectively <xsl:output/>.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed, I've made this change.

The xsl:output declaration in junit-report.xsl could probably be removed or shortened to <xsl:output/>.

…ch had just added a new line at the end of a file

This reverts commit 75048a9.
…line with the effective output serialization parameters of XSPEC_HOME/src/reporter/junit-report.xsl
@AirQuick
Copy link
Member

Thanks, @vincentml , I tested as follows. Looks good to me.

On Windows:

  1. Remove all the files (except for .gitignore) in cases/expected/.
  2. Run generate-expected.cmd. Verify that Git detects no change.
  3. Compare *-junit.xml with *-result.html in cases/expected/. Verify that they are essentially the same. (Just briefly. Haven't verified in depth.)
  4. Compare *-junit.xml with *-junit-norm.xml in cases/expected/. Verify that they are essentially the same.
  5. Run run-e2e-tests.cmd. Verify that all the tests return OK.

On Linux:

  1. Remove all the files (except for .gitignore) in cases/expected/.
  2. Run generate-expected.sh. Verify that Git detects no change.
  3. Run run-e2e-tests.sh. Verify that all the tests return OK.

On Windows and Linux:

  1. Modify JUnit report by editing junit-report.xsl. Run run-e2e-tests.cmd (or sh). Verify that the test fails and exits with status = 1.
  2. Revert the changes made in the previous step.
  3. Modify HTML report by editing format-xspec-report.xsl. Run run-e2e-tests.cmd (or sh). Verify that the test fails and exits with status = 1.

@AirQuick
Copy link
Member

I'll merge this in a few days.
Then I'll fix #211 and submit it with a test utilizing this pull request.

@AirQuick AirQuick merged commit 68086d6 into master May 17, 2018
@AirQuick
Copy link
Member

@cirulls
Merged this.

@cirulls cirulls added this to the v1.1.0 milestone Jun 24, 2018
@AirQuick AirQuick deleted the test/e2e-junit branch August 8, 2018 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants