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

Feature: Assert object should have pass/fail return value #3647

Closed
BluejacketScott opened this issue Dec 27, 2017 · 7 comments
Closed

Feature: Assert object should have pass/fail return value #3647

BluejacketScott opened this issue Dec 27, 2017 · 7 comments
Labels
enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-unit-testing status-declined This will not be implemented.

Comments

@BluejacketScott
Copy link

This would allow for logging a test run (to a text file or some such) with the name of the test and a pass/fail flag instead of returning void. This would really help with integrating into an issue tracking system or allow devs to trace what's failing and perhaps watch for regressions.

@Vogel612
Copy link
Member

The test-explorer already supports copying the results of a test-run. It's not really useful to add these return values when Rubberduck can already export what you're looking for into XML, html, csv and Rich Text

@Vogel612 Vogel612 added enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-unit-testing status-declined This will not be implemented. labels Dec 27, 2017
@BluejacketScott
Copy link
Author

It doesn't work though.

@Vogel612
Copy link
Member

The solution is to fix the bug, not implement a new feature that works around the bug :)

@BluejacketScott
Copy link
Author

Agreed. Thanks.

@BluejacketScott
Copy link
Author

I know you closed this ticket and for good reason, but I would like to see if you'd be willing to reconsider giving us programmatic access to a return value on the Assert object. I am struggling to trace a failure and I think it's because I have interdependent tests so looking at a run log would be very helpful to track it down. It would also permit devs to run automated scripts against the log. Having to copy/paste the results is a manual task that should be automate-able.

@retailcoder
Copy link
Member

I hear you. In the .net world a failing Assert throws an exception, so you get a stack trace. We could make them throw a trappable run-time error (on top of the current behavior, i.e. handling the error wouldn't affect the test outcome).. but returning a value and executing conditional logic based on that seems like a wide-open door for abuse IMO. There must be a reason no testing framework implemented asserts that way...

@BluejacketScott
Copy link
Author

Oh, an exception would work beautifully!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-unit-testing status-declined This will not be implemented.
Projects
None yet
Development

No branches or pull requests

3 participants