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

Handle illegal xml characters in test data #37

Merged
merged 52 commits into from
Apr 18, 2023

Conversation

Siphonophora
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Mar 11, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (10d5368) 100.00% compared to head (ef3bfac) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #37   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        24    +1     
  Lines          608       698   +90     
=========================================
+ Hits           608       698   +90     
Impacted Files Coverage Δ
src/TestLogger/Utilities/StringExtensions.cs 100.00% <ø> (ø)
src/TestLogger/Core/InputSanitizerXml.cs 100.00% <100.00%> (ø)
src/TestLogger/Core/TestMessageInfo.cs 100.00% <100.00%> (ø)
src/TestLogger/Core/TestResultInfo.cs 100.00% <100.00%> (ø)
src/TestLogger/Core/TestRunCompleteWorkflow.cs 100.00% <100.00%> (ø)
src/TestLogger/Core/TestRunMessageWorkflow.cs 100.00% <100.00%> (ø)
src/TestLogger/Core/TestRunResultWorkflow.cs 100.00% <100.00%> (ø)
src/TestLogger/Extensions/MSTestAdapter.cs 100.00% <100.00%> (ø)
src/TestLogger/Extensions/NUnitTestAdapter.cs 100.00% <100.00%> (ø)
src/TestLogger/Extensions/XunitTestAdapter.cs 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Siphonophora
Copy link
Contributor Author

@codito Could you take a look at the couple open questions I have here?

@@ -40,13 +40,13 @@ public class XunitTestAdapter : ITestAdapter

foreach (var result in results)
{
if (skippedTestNamesWithReason.TryGetValue(result.Result.TestCase.DisplayName, out var skipReason))
if (skippedTestNamesWithReason.TryGetValue(result.DisplayName, out var skipReason))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adapter specific implementation - we should validate if Xunit is copying Displayname to TestResult and using it for skip reason instead of TestCase.Displayname.

In case of Theory test case, a single test case can have multiple TestResult and accordingly the DisplayName may change too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now have TestResultDisplayName and TestCaseDisplayName on the result info. So the string being used here won't have changed.

I made those properties internal so the downstream loggers would be forced to use Method. Currently Xunit and Nunit loggers are using new XAttribute("name", result.TestCaseDisplayName), So, I guess those loggers weren't getting the benefit of the ITestAdapters. Not sure how much of an impact it might make on results we output.

@Siphonophora
Copy link
Contributor Author

@codito Quick update before i stop for the week. I think this is pretty close to done.

@codito
Copy link
Contributor

codito commented Mar 19, 2023

@Siphonophora thank you for the contribution. PR is looking great to me.

@Siphonophora
Copy link
Contributor Author

@codito Let me know what you think. I think this may be done

@codito codito merged commit ea8357f into spekt:master Apr 18, 2023
3 checks passed
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 this pull request may close these issues.

None yet

3 participants