question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reporting xUnit tests results to AzDO Tests Explorer is broken on Linux x64

See original GitHub issue

Reporting xUnit tests results is broken on Linux x64: https://mc.dot.net/#/user/coreclr-ci/pr~2Fdotnet~2Fcoreclr~2Frefs~2Fpull~2F24554~2Fmerge/test~2Ffunctional~2Fcli~2F/20190513.718/workItem/PayloadGroup0/wilogs

2019-05-13T22:02:21Z
+ /home/helixbot/.vsts-env/bin/python /home/helixbot/work/2aacd476-35e3-4605-9309-088d644680c4/Payload/reporter/run.py https://dev.azure.com/dnceng/ public 4525536 eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Im9PdmN6NU1fN3AtSGpJS2xGWHo5M3VfVjBabyJ9.eyJuYW1laWQiOiJlNDI4NWM4Yy0zZmQ1LTQyNjctOWIxYy00MjE5NWM0N2E1NTMiLCJzY3AiOiJsb2NhdGlvbnNlcnZpY2UuY29ubmVjdCByZWFkYW5kcHVibGlzaHRlc3Q6OWVlNmQ0NzgtZDI4OC00N2Y3LWFhY2MtZjZlNmQwODJhZTZkIHJlYWRhbmR1cGRhdGVidWlsZGJ5dXJpOjllZTZkNDc4LWQyODgtNDdmNy1hYWNjLWY2ZTZkMDgyYWU2ZC9kb3RuZXQvY29yZWNsci8yMjg6YnVpbGQvYnVpbGQvMTg3NzY1IiwiYXVpIjoiNTlhZTI1N2MtYzY4My00ZDhlLWI4MTctZGU5YjkwMjZiYWYyIiwic2lkIjoiZTUyOThiYjQtYjU1OC00NzE0LWI1NDYtN2NhZjI1NjM3MmE5IiwiaXNzIjoiYXBwLnZzdG9rZW4udmlzdWFsc3R1ZGlvLmNvbSIsImF1ZCI6ImFwcC52c3Rva2VuLnZpc3VhbHN0dWRpby5jb218dnNvOmI1NWRlNGVkLTRiNWEtNDIxNS1hOGU0L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5jb218dnNvOmI1NWRlNGVkLTRiNWEtNDIxNS1hOGU0LTBhMGE1ZjcxZTdkOCIsIm5iZiI6MTU1Nzc4MTYyMywiZXhwIjoxNTU3Nzk3MjIzfQ.Egffj6Srw_6x9HBecHGrqasUhMUVvzSSc-X3s987NOU-uCrA8KUNW5XsbAk4skIOUnmDZ4xevSJ8I_VPbA9s7I4fsr4DW7UT3tSGUCM7M-MJ3_DiQmBYPzTNxaVkUr2r9J9CjjS3uAIxCL3wzBAmiJuxiOW5u2AswN2-OEt5T3MBFTT3Pn1_RpKsvkSxsJhGUOlLbHMXuqBpBnEsCknL4fvjN40CRSdat5O_exYE5FdRJ9J23t-zCQpmCcn3_qCeWnp_0ryCv2Kn6-wnwUy4oQTI3F47cCjCy0ma2MXxsjJmY0V6FUOqQrB4DVt1h8D89mXOztd36k_UN0u-C2gAqA
Main thread starting workers
Worker 0: starting...
Worker 1: starting...
Worker 2: starting...
Worker 3: starting...
Worker 4: starting...
Worker 5: starting...
Worker 6: starting...
Worker 7: starting...
Worker 8: starting...
Worker 9: starting...
Beginning reading of test results.
Uploading results in batches of size 1000
Searching '/home/helixbot/work/2aacd476-35e3-4605-9309-088d644680c4/Work/13f5408e-1bb3-4335-b55b-eaf068ba88d8/Exec/..' for log files
Found log '/home/helixbot/work/2aacd476-35e3-4605-9309-088d644680c4/Work/13f5408e-1bb3-4335-b55b-eaf068ba88d8/Exec/../console.5ccdf8cc.log'
Uri 'https://helixexternalresults.blob.core.windows.net/dotnet-coreclr-refs-pull-24554-merge-2aacd47635e3460593/PayloadGroup0/console.5ccdf8cc.log?sv=2017-07-29&sr=c&sig=yFjaDlTTu%2FIvJMOHcjc1qHnXGcB62Ih0VNA7Sb19ycA%3D&se=2019-05-23T21%3A38%3A41Z&sp=rl'
Generated log list: <ul><li><a href='https://helixexternalresults.blob.core.windows.net/dotnet-coreclr-refs-pull-24554-merge-2aacd47635e3460593/PayloadGroup0/console.5ccdf8cc.log?sv=2017-07-29&sr=c&sig=yFjaDlTTu%2FIvJMOHcjc1qHnXGcB62Ih0VNA7Sb19ycA%3D&se=2019-05-23T21%3A38%3A41Z&sp=rl' target='_blank'>console.5ccdf8cc.log</a></li></ul>
Searching '/home/helixbot/work/2aacd476-35e3-4605-9309-088d644680c4/Work/13f5408e-1bb3-4335-b55b-eaf068ba88d8/Exec' for test results files
Found results file /home/helixbot/work/2aacd476-35e3-4605-9309-088d644680c4/Work/13f5408e-1bb3-4335-b55b-eaf068ba88d8/Exec/testResults.xml with format xunit
Main thread finished queueing batches
Worker 0: got error: Traceback (most recent call last):
  File "/home/helixbot/work/2aacd476-35e3-4605-9309-088d644680c4/Payload/reporter/run.py", line 39, in run
    self.__process(item)
  File "/home/helixbot/work/2aacd476-35e3-4605-9309-088d644680c4/Payload/reporter/run.py", line 30, in __process
    self.publisher.upload_batch(batch)
  File "/home/helixbot/work/2aacd476-35e3-4605-9309-088d644680c4/Payload/reporter/azure_devops_result_publisher.py", line 36, in upload_batch
    self.publish_results(test_case_results, results_with_attachments)
  File "/home/helixbot/work/2aacd476-35e3-4605-9309-088d644680c4/Payload/reporter/azure_devops_result_publisher.py", line 57, in publish_results
    stream=base64.b64encode(text(attachment.text)),
  File "/home/helixbot/.vsts-env/lib/python3.6/base64.py", line 58, in b64encode
    encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not 'str'

Main thread exiting

@alexperovich @sandreenko

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
echesakovcommented, May 30, 2019
1reaction
MattGalcommented, May 29, 2019

I believe this was fixed in https://github.com/dotnet/arcade/pull/2878, I’ll figure out what version has this fixed and make a PR to try.

Read more comments on GitHub >

github_iconTop Results From Across the Web

xUnit tests fails when executed by Azure DevOps
The unit tests runs correctly on my local machine (tested with the visual studio runner and with dotnet test , but I cannot...
Read more >
How to resolve cases of Visual Studio “No tests appearing”
The Visual Studio Test Explorer can be a bit picky about showing tests. There are multiple reasons for why they don't always show...
Read more >
Missing xUnit core test result icons - Developer Community
In VS 2017 (15.1) create an xUnit Test Project (.NET Core). Run tests in class, test success and failure icons above test methods...
Read more >
VSTest task fails to execute tests in .NET Core 2.0 test project
The workaround from there of manually invoking a different vstest.console.exe and providing /Framework:FrameworkCore10 results in successfully ...
Read more >
Test tools for .NET and cross-platform apps - Visual Studio ...
Remote Testing​​ Run and debug tests on Linux containers, WSL, or over SSH connections!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found