Closed MNie closed 5 years ago
For the last error, you gave the stack trace but not the error.
it looks like it tired to launch chrome but could not.
You need both chrome installed on the machine that is running it + chrome driver.
I have never used Azure Devops, but I can give you some high level guidance for using canopy alone.
Canopy's test runner is really simple. It just loops over the tests and run them, increment the failed/passed test counters.
I always run from a console app, and my return code
is the number of failed tests:
https://github.com/lefthandedgoat/canopyStarterKit/blob/master/canopyStarterKit/Program.fs#L28
If you want to use another testing framework to run the tests, like nUnit or expecto, that is fine too, but you will lose some of the nice things that the canopy runner has.
If you have chromedriver + chrome + the ability to run a console application in AzureDevops then it should work. One other consideration would be desktop resolution. I don't know how AzureDevops is setup, but a typical windows service only allows a resolution of 1028x768, and your website may not render well in that resolution. Linux allows you to create fake desktops with higher resolution and can be a better solution if this is a problem for you.
@lefthandedgoat it seems that I have to use Ubuntu agent and headless mode and everything works just fine. Thanks!
Awesome! @MNie
I have a couple of tests and I want to run them on Azure DevOps. I run them locally by the following command:
on Azure DevOps I tried to configure them the same way, so I have the following steps:
But Azure DevOps fails with following error:
I also tried running:
But it fails with the same error.
I tried to run it with
--project
argument like that:but tests hangs up with the following exception:
Is there some information on how it should be configured to run on Azure DevOps? Or maybe I should use some test framework/library to run canopy like Expecto or something else?