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

Include the file the test came from in the Test Output #229

Closed
wants to merge 1 commit into from
Closed

Include the file the test came from in the Test Output #229

wants to merge 1 commit into from

Conversation

ghostsquad
Copy link
Contributor

No description provided.

@dlwyatt
Copy link
Member

dlwyatt commented Nov 18, 2014

I like this idea, but is it necessary to write the file before every Describe? Or could we do something like this?

File: FileName
  Describing Describe1
    # etc
  Describing Describe2
    # etc

I'd also like to add the file information to the test result objects, so it's available for -PassThru users. (Could possibly be added to NUnit output as well, if we're not doing that already.)

@dlwyatt
Copy link
Member

dlwyatt commented Nov 18, 2014

Also, the current code assumes that the Describe command is called directly from a test script, but Describe can be nested inside InModuleScope as well. The changes I mentioned in my last comment would address this, since we'd be adding something along the lines of $pester.CurrentFile, which would be set by Invoke-Pester as it loops through the test files before invoking them. (I don't think we need to be concerned with test scripts that are executed directly instead of with Invoke-Pester, since the user already knows the file in that case.)

@ghostsquad
Copy link
Contributor Author

The AddTestResult method on the PesterState is going to be a headache for making modifications. Really, this method should accept a TestResult object as input, updating information on that object if applicable.

@nohwnd nohwnd changed the title resolves #227 Include the file the test came from in the Test Output Dec 5, 2014
@dlwyatt
Copy link
Member

dlwyatt commented Feb 6, 2016

This will be addressed in v4

@dlwyatt dlwyatt closed this Feb 6, 2016
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.

2 participants