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

NUnit/JUnit summary implies no colour in output messages #410

Open
cmeeren opened this issue Mar 12, 2021 · 5 comments
Open

NUnit/JUnit summary implies no colour in output messages #410

cmeeren opened this issue Mar 12, 2021 · 5 comments

Comments

@cmeeren
Copy link

cmeeren commented Mar 12, 2021

Repro solution in case you need it: ExpectoTest.zip

When running with --nunit-summary, the output contains an ESC character. This causes the Azure Pipelines "Publish Test Results" task to fail:

##[warning]Failed to read D:\a\1\a\TestResults.xml. Error : '�', hexadecimal value 0x1B, is an invalid character. Line 7, position 1.. 

Please see the attached test results file.

TestResults.zip

Here is how the file looks in Notepad++. You can see the invalid character on lines 7 and 8.

image


The same thing happens with --junit-summary:

##[warning]Failed to read D:\a\1\s\TestResults.xml. Error : '�', hexadecimal value 0x1B, is an invalid character. Line 6, position 293..

TestResults.zip

image

@haf
Copy link
Owner

haf commented Mar 12, 2021

Could you try --colours 0?

@cmeeren
Copy link
Author

cmeeren commented Mar 12, 2021

Yep, that solves it. I guess Expecto should always exclude colors from the test results file?

@haf
Copy link
Owner

haf commented Mar 12, 2021

Yes, exactly. PR? :)

@cmeeren
Copy link
Author

cmeeren commented Mar 12, 2021

Terribly sorry, I'm completely swamped and have no capacity to ramp up on a new codebase. (I have even just had to withdraw from some OSS projects I maintain.)

@haf haf changed the title Invalid character in NUnit/JUnit summary, Azure Pipelines can't process results file NUnit/JUnit summary implies no colour in output messages Mar 12, 2021
@cmeeren
Copy link
Author

cmeeren commented May 1, 2021

By the way, colors in the string is also an issue in the VS debugger (when debugging tests with F5):

image

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