Let's say I have the following simple Canopy test program:
open System
open canopy.runner.classic
open canopy.configuration
open canopy.classic
canopy.configuration.chromeDir <- System.AppContext.BaseDirectory
start chrome
"test 1" &&& fun _ ->
...
"test 2" &&& fun _ ->
...
"test 3" &&& fun _ ->
...
[<EntryPoint>]
let main args =
run()
quit()
0
When I run this program:
dotnet run
All three tests are run.
Let's say that by default, I want to run test 1 and test 2. But sometimes, I'd like to only run test 3.
What's the recommended way to set this up in Canopy?
Something like passing command line options would be fine:
dotnet run # Run the default tests
dotnet run -- test-3 # Run test 3
Alternatively, I guess I could have test 3 be in a whole separate project. But that seems like alot of overhead just to have a separate test.
Thanks for any suggestions!
I don't think there's any built-in way to do this, but it seems pretty easy to manage manually:
The trick is to make sure that only the tests you want to run actually get defined at run-time.