Open rodsantest1 opened 5 years ago
This may help you:
How does CanopyRepl work in canopy-lite? I tried fsi CanopyRepl.fsx but nothing happened. I was thinking it would somehow allow me to run a statement line by line like in old Visual Studio version where you can press Alt+Enter on a line to execute that line only.
I setup a script file using the paket generate_load_scripts
command. I can just load the generated fsx file in my script file like: #load "./../../../.paket/load/net472/UITests/uitests.group.fsx"
.
I can start up a browser, create a test and have the test run. However, the only problem is that if I repeat throwing the code to the REPL, the test will be activated twice (because it is again added). So, I would like to clear the list of tests to be run. I tried this:
#load "./../../../.paket/load/net472/UITests/uitests.group.fsx"
open System
open System.IO
open canopy
open canopy.runner.classic
open canopy.configuration
open canopy.classic
open canopy.types
let filepath = __SOURCE_DIRECTORY__
let driverpath =
@"./../../../packages/uitests/Selenium.WebDriver.ChromeDriver/driver/win32"
let chromepath = Path.Combine(filepath, driverpath)
chromeDir <- chromepath
suites <- [ new suite() ]
start chrome
"check if the app is loaded" &&& fun _ ->
// go to the url
url "http://localhost:8080/"
// check if the elmish-app div is displayed
displayed "#elmish-app"
run()
quit()
But trying to start with a fresh set of tests by suites <- [ new suite() ]
doesn't work.
@halcwb What you have seems reasonable.
Are you running this twice? #load "./../../../.paket/load/net472/UITests/uitests.group.fsx"
Or running it one time, and then pasting the contents of the fsx the second time?
I run the complete script once, then the lines including and following suites <- [ new suite() ]
. This will run one test but will report the result from the previous tests. If I run the complete script, the result is the same, however. So, the previous tests are still cached bij the fsi.
P.s. Besides this, it works like a charm! Great!!!
How do I setup imports and references to use .fsx script file?
I'm using VS 2017 FX 4.6.1
See image