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

Tagging captured images more clearly #224

Closed
galatrash opened this issue Nov 18, 2015 · 5 comments
Closed

Tagging captured images more clearly #224

galatrash opened this issue Nov 18, 2015 · 5 comments

Comments

@galatrash
Copy link

Hi Chris,

I'm having issues associating captured images to the failed tests when there are few failing ones. Is it possible to add some extra information to the captured images names? Maybe creating a random number and appending it to the time-stamp besides logging this in the reporter, or reporting the image file name in the log, or - even better - using the test name (after sanitizing) as the image file name.

@lefthandedgoat
Copy link
Owner

Let me see if I can think of a way to make it configurable so that people can adjust it to their liking.

I can make a configuration item that is a function that takes the all the information about a test, and returns a string. The resulting string of the function would be the filename and people can implement it to have whatever custom filename they like. It could default to current behavior.

Sound reasonable?

@galatrash
Copy link
Author

Yes, this is okay as long as it doesn't break the existing feature and existing code if no override is used - I mean if the override function not used or it returns empty string (or null/None), then canopy defaults back to current behaviour of a time stamp file name.

@lefthandedgoat
Copy link
Owner

You can download here:

https://www.nuget.org/packages/canopy/0.9.42

You can see an example of a more robust file naming function. It doesn't do a great job of cleaning the test names but is a reasonable enough example. https://github.com/lefthandedgoat/canopy/blob/master/tests/basictests/Program.fs#L17-L22

Hope this solves your problem!

@galatrash
Copy link
Author

It is working like charm :) Thanks for working so fast on it.

@lefthandedgoat
Copy link
Owner

Sure anytime!

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

2 participants