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

Custom coverage profile filename not working #346

Closed
bt opened this issue Apr 24, 2017 · 3 comments
Closed

Custom coverage profile filename not working #346

bt opened this issue Apr 24, 2017 · 3 comments

Comments

@bt
Copy link

bt commented Apr 24, 2017

I noticed that there's a command-line option named -coverprofile which is supposed to take in a string and output a coverage profile to the provided string after the tests are completed.

  -coverprofile string
    	Write a coverage profile to the specified file after all tests have passed.

I can see this is mentioned here: https://github.com/onsi/ginkgo/blob/master/ginkgo/run_watch_and_build_command_flags.go#L133

However, when I run my tests like such:

$ ginkgo -r -coverprofile coverage.txt

I don't get the file at coverage.txt, I'll end up with multiple .coverprofile files.

I also noticed this isn't mentioned in the Ginkgo documentations, so is this just a feature that was never implemented?

@AlexeySoshin
Copy link
Contributor

I'm on it

AlexeySoshin pushed a commit to AlexeySoshin/ginkgo that referenced this issue May 29, 2017
@onsi
Copy link
Owner

onsi commented Jun 3, 2017

@AlexeySoshin I made a couple of comments on the PR - lemme know if you can take a look.

@AlexeySoshin
Copy link
Contributor

@onsi Implemented changed. Could you please review this again?

@onsi onsi closed this as completed in #355 Jul 21, 2017
onsi pushed a commit that referenced this issue Jul 21, 2017
* Handle -coverprofile flag

Fixes #346

* Add tool for easier contribution

* Cast byte[], otherwise failure will be displayed as array of bytes, not very useful

* Fix combine not finding files if coverProfile was set

* Add test for recursive coverage

* Fix test imports to point to correct subpackages

* Add test for cover profile in parallel mode
onsi pushed a commit that referenced this issue Jul 21, 2017
* Handle -coverprofile flag

Fixes #346

* Add tool for easier contribution

* Cast byte[], otherwise failure will be displayed as array of bytes, not very useful

* Fix combine not finding files if coverProfile was set

* Add test for recursive coverage

* Fix test imports to point to correct subpackages

* Refactor casts to be semantic functions

* Add test for cover profile in parallel mode

* Add failing test for outputdir case

* Implement outputdir

* Add test for moving files to output dir
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

3 participants