Closed kikkoi closed 5 years ago
I do not have any examples using the parallel testing in interactive.
You should be able to, but only if you are able to run unit tests in parallel in interactive. canopy 1.x used a global mutable instance of a browser which inhibited having multiple browsers and tests going at the same time. Two new apis are introduced in 2.0 which fix this. Running tests in parallel has not been added to the runner, you will need to use a test runner like Expecto or nUnit for that.
I appreciate your reply.
I did tried instanced version in F# Interactive and got this trouble with
sandbox2.fsx(15,1): error FS0074: The type referenced through 'OpenQA.Selenium.ISearchContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'WebDriver'.
My script:
#I @"C:\Users\kikko\.dotnet\x64\sdk\NuGetFallbackFolder\netstandard.library\2.0.1\build\netstandard2.0\ref\"
#I @"C:\Users\kikko\.nuget\packages\selenium.webdriver\3.11.0\lib\netstandard2.0\"
#I @"C:\Users\kikko\.nuget\packages\canopy\2.0.0\lib\"
#r "netstandard.dll"
#r "WebDriver.dll"
#r "canopy.dll"
open canopy.parallell.instanced
canopy.configuration.chromeDir <- "C:\chrome"
canopy.screen.screenWidth <- 1600
canopy.screen.screenHeight <- 768
let x = new Instance()
x.start canopy.types.Chrome
x.url "http://localhost:5000/"
Everything has already been referenced. Did I miss something or it's a bug?
I will look into this tonight. I never use interactive with testing, so I am very rusty.
@kikkoi You can use https://github.com/haf/canopy/blob/parallel/tests/ParallelUsage/Explore.fsx as an example, if you want an fsx example that works. I haven't released a separate nuget with these changes yet though.
I am interested to canopy 2.0. Can use surely the with parallel testing F# Interactive? Can give simple example of parallel testing with F# Interactive?