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
Set name in xml element testsuite #2034
Conversation
Please add a test for this so we avoid regressions. |
src/functions/TestResults.ps1
Outdated
$suiteInfo = Get-TestSuiteInfo -TestSuite $Result -Path "Pester" | ||
$suiteInfo.name = $RunResult.Configuration.TestResult.TestSuiteName.Value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can merge this if you want. -Path
is used for name and description IIRC.
@nohwnd |
There are tests for In that file you add a test, they use i, b and t functions, i is for invoke, b is for block (like Describe in Pester) and t is for test (like It in Pester). You can focus a single test by using dt instead of t to make development easier. Hopefully reading few other tests in the file will make it clear what is happening. You run a Pester run, and then compare the resulting XML to ensure it was produced correctly. |
@nohwnd, |
Thanks @Marc013 . I made a few adjustments to clean up the "RunResult"-parameters + simplified the test. Also, didn't want to scare any DC-fans from contributing 😄 |
PR Summary
Fixes #2033
Pester configuration 'TestResult.TestSuiteName' sets name in element 'test-results' instead of name in first element 'test-suite'