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

Timestamp and error message conversion #104

Closed
maximusmp opened this issue Jul 8, 2022 · 5 comments · Fixed by #108
Closed

Timestamp and error message conversion #104

maximusmp opened this issue Jul 8, 2022 · 5 comments · Fixed by #108

Comments

@maximusmp
Copy link

maximusmp commented Jul 8, 2022

Hello,

I am currently converting the attached "test.trx" file to the attached "test.xml" file.
test.zip

I have two requests:

  1. Would it be possible to convert the time zone of the timestamp? In the source file it's, e.g., 2022-07-08T11:59:02.3117362+02:00 but the converted one is 2022-07-08T11:59:03. The expected result could be 2022-07-08T09:59:03;
  2. You can see that the error message is repeated in the converted file:
<failure message="Assert.AreEqual failed. Expected:&lt;1&gt;. Actual:&lt;2&gt;. " type="not specified"><![CDATA[Assert.AreEqual failed. Expected:<1>. Actual:<2>. 
   at UnitTestProject1.UnitTest1.TestMethod1() in C:\Users\massimiliano.piatto\source\repos\UnitTestProject1\UnitTestProject1\UnitTest1.cs:line 12]]></failure>

Would it be possible to indicate only the entire CDATA string in the "message" attribute without providing other strings?

Thank you so much for your work!

Further technical details

trx2junit-version: v2.0.1
Operating system: Windows 11
Visual Studio version: v17.2.5

@gfoidl
Copy link
Owner

gfoidl commented Jul 8, 2022

ad point 1: created #105 to track this, makes sense 👍🏻

ad point 2: hm, this got requested in #100 (comment) to work for GitLab. TBH I don't know what's the ideal situation here...

@maximusmp
Copy link
Author

ad point 1: created #105 to track this, makes sense 👍🏻

Thanks!

ad point 2: hm, this got requested in #100 (comment) to work for GitLab. TBH I don't know what's the ideal situation here...

I see, and I have the opposite need because I'm importing the file in Polarion and it appends automatically the "message" attribute and the content of the node:
immagine

How about an input option to choose from, if repeating the "message" attribute in the content of the "failure" node or not? Or, alternatively, letting the message attribute empty and writing all in the content of the node.

@gfoidl
Copy link
Owner

gfoidl commented Jul 8, 2022

How about an input option to choose from, if repeating the "message" attribute in the content of the "failure" node or not?

Sounds good. Will add something like this.
Leaving the message-attribuet may break other use-cases, so I fear that's not a good option.

@maximusmp
Copy link
Author

Wonderful, thank you!

@gfoidl
Copy link
Owner

gfoidl commented Jul 8, 2022

PR #108 is ready 😄
Will create a new release once CI is finished (Edit: it's live v2.0.2).

Thanks for reporting these issues!

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

Successfully merging a pull request may close this issue.

2 participants