-
Notifications
You must be signed in to change notification settings - Fork 115
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
Mark tests to always run even when others are WIP #195
Comments
Are you using wip so it goes slow and helps debug? And you want to have something like &&&&& that runs in both normal runs and wip runs, but does not run slow? |
Yes. It's not so much the speed, but making it so I can run just my WIP plus a few others when working with WIP. I have somewhere around 35-40 tests right now. I use WIP so it won't run all of them when I'm working on a particular (new in most cases) test. I just don't want to have to remember to go mark/unmark my login/logout tests as WIP each time when I'm switching between running just one test and running all the tests. |
Are all 35-40 tests all related? Like all for the same page or functionality? I ask because its usually a good idea to break out tests into separate files if they are testing separate functionality. You would have file that was explicitly testing login and log out functionality, that bad passwords were rejected, and that log out redirected you to the login page etc. Then for other tests that you need to be logged in to do, you just make a common login function and call it with your Tonight I will improve the example to be more thorough and reflect how I do stuff now which lends nicely to 'tests under dev' and 'all done tests' which may suite your development workflow. If that doesn't help with your needs then we can come up with something that will or implement the feature you are asking for. |
I have my tests split in multiple files already. I am writing these tests against a long in the tooth web application that has many "modules". I'm creating a separate This is really just a feature request/wishlist item for me. No big rush and it's not stopping me from getting things done. |
Now available Use If you prefer some other infix operator you can alias
Enjoy! |
That was quick, thanks. I think there is an issue with it. If I have a Program.fs with calls in it to various test files and if the files only have a I can create a demo project for this if you need me to. |
Ok I will look into it |
This works for me, and I tried different combinations
|
Wait I think I know what it is. You have 2 files, one full of And only the file with wip is running? If so , its because of this https://github.com/lefthandedgoat/canopy/blob/master/src/canopy/runner.fs#L119 Sorry I was only thinking in the context of a single file. |
Yes, that is correct. If one file has no wip items, it is just skipped altogether, but ones with both always and wip run both types of tests. |
Ok, sorry about that. I will have to get you another build tonight when I get home. |
This should fix it. https://www.nuget.org/packages/canopy/0.9.24 |
I'd like the ability to mark certain tests to always run even if other tests are marked as WIP. I realize I can do a "once" at the start, but I'd rather not in this case.
I have a test for logging into the system that happens before any others and one for logging out at the end. When I have a test marked as WIP, those are skipped unless I also mark them as WIP. I'd just like some way to mark those two tests to always be run.
Right now I just have those tests marked as WIP as well. This is just a low priority feature request. There is a way to do a named test(&&&), wip(&&&&) and a skip(&&!), just would like a way to do an always test.
The text was updated successfully, but these errors were encountered: