Skip to content
This repository was archived by the owner on Jun 12, 2018. It is now read-only.

include context information in pester test logs#9

Merged
JamesWTruher merged 1 commit intodevelopfrom
jameswtruher/PesterContextLog
Jun 13, 2017
Merged

include context information in pester test logs#9
JamesWTruher merged 1 commit intodevelopfrom
jameswtruher/PesterContextLog

Conversation

@JamesWTruher
Copy link
Copy Markdown
Contributor

Pester logs do not include context information which makes it difficult to achieve unique names for tests. This PR extends the pester log to include the context information.

$xmlTestCase = $xmlResult.'test-results'.'test-suite'.'results'.'test-suite'.'results'.'test-case'
$xmlTestCase.name | Should Be "Mocked Describe.Successful testcase"
# no Context for this test, so ".."
$xmlTestCase.name | Should Be "Mocked Describe..Successful testcase"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we add a test case which has a context, since that is the code change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure - changed the current tests to include a context (rather than checking for .. it will check for the mocked context

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants