Not sure if this is happening to anyone else, so I thought I should ask. This is the second time this has happened. The first time I removed and re-added the Automation Helpers and it resolved the issue. That hasn't worked this time.
The tests pass without issue and a PDF report is created, but the junit report is corrupt. I have attached the reports, but here is the gist of the junit report:
<testcase
name="Recipe_Functions"
time="16"
classname="BuildValidation">
<system-out><![CDATA[---[Success] Attribute 'Text' of element for item 'P38Repository.ApplicationUnderTest.Recipe_Name_Field' does match the specified value.---
[type] repoitem
[path] /form[@processname='DrillApp']/?/?/text[@accessiblerole='Text']
[itempath] ?/?/text[@accessiblerole='Text']
[fullname] P38Repository.ApplicationUnderTest.Recipe_Name_Field
[id] a81d27325e374f6a98d6279557e76564
[timeout] 60000
[codefile] c:\Work\P38V&V\P38\Modules\Recipe Functions\BrowseNewRecipe.cs
[itemindex] 8
-------------------------------------------------------------------------------------------------------------------------------------------
---[Success] Attribute 'Text' of element for item 'P38Repository.ApplicationUnderTest.Tool_Set_Field' does match the specified value.---
[type] repoitem
[path] /form[@processname='DrillApp']/text[@controlname='ToolSetTextBox']/text[@accessiblerole='Text']
[itempath] text[@controlname='ToolSetTextBox']/text[@accessiblerole='Text']
[fullname] P38Repository.ApplicationUnderTest.Tool_Set_Field
[id] ab1fa32ac50d4b7bb1bacb3eabed9e82
[timeout] 60000
[codefile] c:\Work\P38V&V\P38\Modules\Recipe Functions\BrowseNewRecipe.cs
[itemindex] 9
----------------------------------------------------------------------------------------------------------------------------------------
---[Success] Attribute 'Text' of element for item 'P38Repository.ApplicationUnderTest.Alignment_Field' does match the specified value.---
[type] repoitem
[path] /form[@processname='DrillApp']/text[@controlname='AlignmentTextBox']/text[@accessiblerole='Text']
[itempath] text[@controlname='AlignmentTextBox']/text[@accessiblerole='Text']
[fullname] P38Repository.ApplicationUnderTest.Alignment_Field
[id] 65662d3889c047de9d2a7c01bca1a2cd
[timeout] 60000
[codefile] c:\Work\P38V&V\P38\Modules\Recipe Functions\BrowseNewRecipe.cs
[itemindex] 10
-----------------------------------------------------------------------------------------------------------------------------------------
]]></system-out>
</testcase>
Junit test report is corrupt.
-
- Posts: 169
- Joined: Fri Nov 08, 2019 3:23 pm
Junit test report is corrupt.
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Junit test report is corrupt.
Hello,
This issue is being handled via a support ticket, the resolution will be posted here for reference.
-Sean
Regards,
This issue is being handled via a support ticket, the resolution will be posted here for reference.
-Sean
Regards,
-
- Posts: 169
- Joined: Fri Nov 08, 2019 3:23 pm
Re: Junit test report is corrupt.
Thanks again for the help on this, Sean. It seems the report is correct and is reporting back to TFS correctly.
Deleting the old reports from the agent seems to have corrected the issue. I would be interested in knowing what caused it. But at least I have an idea of how to resolve it should it happen again.
Deleting the old reports from the agent seems to have corrected the issue. I would be interested in knowing what caused it. But at least I have an idea of how to resolve it should it happen again.
-
- Posts: 169
- Joined: Fri Nov 08, 2019 3:23 pm
Re: Junit test report is corrupt.
So here we are again. I am finding I have to clear the Uploads folder out on the Agent every so often or this report is corrupt again.
One issue seems to be file rights as I need admin to delete, so a cleanup routine won't work. But why does it get corrupt in the first place?
One issue seems to be file rights as I need admin to delete, so a cleanup routine won't work. But why does it get corrupt in the first place?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Junit test report is corrupt.
Hello dmconsulting1,
I recommend creating a support query or replying to the previous case regarding this issue as it appears to be intermittent and will require additional research.
Regards,
Sean
I recommend creating a support query or replying to the previous case regarding this issue as it appears to be intermittent and will require additional research.
Regards,
Sean
-
- Posts: 169
- Joined: Fri Nov 08, 2019 3:23 pm
Re: Junit test report is corrupt.
Haha, I feel like an idiot, but at least I know what it is now.
So I was calling the agent with the argument /junit /zr /zrf:Reports/BuildReport where BuildReport is the file name. It was reusing the same log file for each test run. If a test run failed, the log contained more information and therefor was longer in character length. If the next test that ran happened to be shorter than the previous (like a pass vs fail) only the new info was overwritten but the remaining text from the failure remained.
So TFS reported:
##[warning]Failed to read C:\agent2\_work\9\s\Reports\BuildReport.rxlog.junit.xml. Error : Data at the root level is invalid. Line 189, position 13.
Line 189 looks like this:
</testsuite>uite>
The first test was 5 characters longer.
So I was calling the agent with the argument /junit /zr /zrf:Reports/BuildReport where BuildReport is the file name. It was reusing the same log file for each test run. If a test run failed, the log contained more information and therefor was longer in character length. If the next test that ran happened to be shorter than the previous (like a pass vs fail) only the new info was overwritten but the remaining text from the failure remained.
So TFS reported:
##[warning]Failed to read C:\agent2\_work\9\s\Reports\BuildReport.rxlog.junit.xml. Error : Data at the root level is invalid. Line 189, position 13.
Line 189 looks like this:
</testsuite>uite>
The first test was 5 characters longer.