简体   繁体   English

在Azure Devops中运行机盖

[英]Running Canopy in Azure Devops

I have a couple of automated tests written in Canopy. 我有一些用Canopy编写的自动化测试。 I run them locally by running the following command: 我通过运行以下命令在本地运行它们:

dotnet run Project.AutomatedTests.fsproj

on Azure DevOps I tried to configure them the same way, so I have the following steps: 在Azure DevOps上,我尝试以相同的方式对其进行配置,因此我需要执行以下步骤:

1. 1。

dotnet restore Project.sln

2. 2。

dotnet build Project.sln

3. 3。

dotnet run Project.AutomatedTests.dll

But Azure DevOps fails with following error: 但是Azure DevOps失败并出现以下错误:

2019-01-19T11:11:42.5195371Z ##[error]Error: /usr/bin/dotnet failed with return code: 1
2019-01-19T11:11:42.5219579Z ##[error]Dotnet command failed with non-zero exit code on the following projects : /home/vsts/work/1/s/backend/tests/Project.AutomatedTests/bin/Release/netcoreapp2.1/Project.AutomatedTests.dll,/home/vsts/work/1/s/backend/tests/Project.AutomatedTests/bin/Release/netcoreapp2.1/publish/Project.AutomatedTests.dll,/home/vsts/work/1/s/backend/tests/Project.AutomatedTests/obj/Release/netcoreapp2.1/Project.AutomatedTests.dll

I also tried running: 我也尝试运行:

dotnet run Project.AutomatedTests.fsproj

But it fails with the same error. 但是它失败并显示相同的错误。

I tried to run it with --project argument like that: 我试图用--project参数运行它,如下所示:

-v d --project /home/vsts/work/1/s/backend/tests/Project.AutomatedTests/Project.AutomatedTests.fsproj

but tests hangs up with the following exception: 但测试因以下异常而挂断:

 at Start.main(String[] _arg1) in /home/vsts/work/1/s/backend/tests/Project.AutomatedTests/Program.fs:line 17
   at canopy.classic.start(BrowserStartMode b) in C:\projects\canopy\src\canopy\canopy.fs:line 250
   at canopy.parallell.functions.start(BrowserStartMode b) in C:\projects\canopy\src\canopy\canopy.parallell.functions.fs:line 835
   at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout)
   at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)

Maybe someone has an idea what I did wrong? 也许有人知道我做错了什么?

The solution to my problem was: 我的问题的解决方案是:

start ChromeHeadless

instead of: 代替:

start chrome

and after that everything works just fine. 之后一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM