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.xml generate by JUnitReporter does not compatible with the jenkins "xUnit" plugin #486

Closed
cynepco3hahue opened this issue Jun 13, 2018 · 4 comments
Assignees

Comments

@cynepco3hahue
Copy link
Contributor

cynepco3hahue commented Jun 13, 2018

junit.xml that generated by JUnitReported

<?xml version="1.0" encoding="UTF-8"?>
  <testsuite tests="6" failures="0" time="502.436823874">
      <testcase name="CloudInit UserData A new VirtualMachineInstance with cloudInitNoCloud userDataBase64 source should have cloud-init data" classname="Tests Suite" time="0">
          <skipped></skipped>
      </testcase>
      <testcase name="CloudInit UserData A new VirtualMachineInstance with cloudInitNoCloud userDataBase64 source with injected ssh-key should have ssh-key under authorized keys" classname="Tests Suite" time="0">
          <skipped></skipped>
      </testcase>
      <testcase name="CloudInit UserData A new VirtualMachineInstance with cloudInitNoCloud userData source should process provided cloud-init data" classname="Tests Suite" time="0">
          <skipped></skipped>
      </testcase>
      <testcase name="Windows VirtualMachineInstance should succeed to start a vmi" classname="Tests Suite" time="19.49894934"></testcase>
      <testcase name="Windows VirtualMachineInstance should succeed to stop a running vmi" classname="Tests Suite" time="17.266661977"></testcase>
      <testcase name="Windows VirtualMachineInstance with winrm connection should have correct UUID" classname="Tests Suite" time="220.181473962"></testcase>
      <testcase name="Windows VirtualMachineInstance with winrm connection should have pod IP" classname="Tests Suite" time="185.52644888"></testcase>
      <testcase name="Windows VirtualMachineInstance with kubectl command should succeed to start a vmi" classname="Tests Suite" time="20.747579842"></testcase>
      <testcase name="Windows VirtualMachineInstance with kubectl command should succeed to stop a vmi" classname="Tests Suite" time="27.790455973"></testcase>
  </testsuite>

errors that I receive when xUnit plugin tries to parse it

WARNING: The file '.../junit.xml' is an invalid file.
WARNING: At line 2 of file:.../junit.xml:cvc-pattern-valid: Value '502.436823874' is not facet-valid with respect to pattern '(([0-9]{0,3},)*[0-9]{3}|[0-9]{0,3})*(\.[0-9]{0,3})?' for type '#AnonType_timetestsuite'.
WARNING: At line 2 of file:.../junit.xml:cvc-attribute.3: The value '502.436823874' of attribute 'time' on element 'testsuite' is not valid with respect to its type, 'null'.
WARNING: At line 2 of file:.../junit.xml:cvc-complex-type.4: Attribute 'name' must appear on element 'testsuite'.
WARNING: At line 2 of file:.../junit.xml:cvc-complex-type.4: Attribute 'errors' must appear on element 'testsuite'.
ERROR: The result file '.../junit.xml' for the metric 'JUnit' is not valid. The result file has been skipped.
@nodo
Copy link
Collaborator

nodo commented Jun 14, 2018

Thanks for reporting @cynepco3hahue , are you interested in sending a PR?

@cynepco3hahue
Copy link
Contributor Author

cynepco3hahue commented Jun 14, 2018

@nodo I think yes 😄 I already worked a little with reporters, so assign it to me

@nodo
Copy link
Collaborator

nodo commented Jun 14, 2018

Amazing! I'm happy to help in case you need!

@cynepco3hahue
Copy link
Contributor Author

I just will add some investigation notes:

  • WARNING: At line 2 of file:.../junit.xml:cvc-pattern-valid: Value '502.436823874' is not facet-valid with respect to pattern '(([0-9]{0,3},)*[0-9]{3}|[0-9]{0,3})*(\.[0-9]{0,3})?' for type '#AnonType_timetestsuite'. - currently xUnit plugin supports only 3 symbols after the dot under testsuite timestamp.
  • WARNING: At line 2 of file:.../junit.xml:cvc-complex-type.4: Attribute 'name' must appear on element 'testsuite'. - we need to upgrade our ginkgo to 1.5
  • WARNING: At line 2 of file:.../junit.xml:cvc-complex-type.4: Attribute 'errors' must appear on element 'testsuite'. - testsuite must have errors field

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