简体   繁体   English

具有堆栈的项目的 Azure DevOps 管道任务:selenium、c#、Nunit、边缘浏览器

[英]Azure devops pipeline tasks for a project with stack: selenium, c#, Nunit, edge browser

I usually work on infra side and I'm new to application side.我通常在基础设施方面工作,而我是应用方面的新手。 I got a request to build azure devops pipeline to run scripts in repository, which consists of stack: Selenium, c#, Nunit, edge browser.我收到了构建 azure devops 管道以在存储库中运行脚本的请求,它由堆栈组成:Selenium、c#、Nunit、边缘浏览器。 I was confused on what tasks to be used to build this pipeline.我对用于构建此管道的任务感到困惑。

Any suggestions and help is much appreciated.非常感谢任何建议和帮助。

Thanks in advance提前致谢

Using Visual Studio, you can create your selenium test project with Nunit or any tests and deploy in Azure devops pipelines .使用 Visual Studio,可以使用 Nunit 或任何测试创建 selenium 测试项目,并在Azure devops 管道中进行部署。 Please follow below Steps:请按照以下步骤操作:

For Selenium Test project creation:对于 Selenium 测试项目创建:

  1. Visual Studio - File > New Unit test project names as MySeleniumTests Visual Studio - 文件 > 新单元测试项目名称为MySeleniumTests
  2. Add these nuget packages添加这些 nuget 包
  • Selenium.WebDriver, Selenium.Firefox.WebDriver, Selenium.WebDriver.ChromeDriver, Selenium.WebDriver.IEDriver
  1. Use this demo code for testing locally using test explorer.使用此演示代码使用测试资源管理器进行本地测试。

Define your build pipeline定义构建管道

You'll need a continuous integration (CI) build pipeline that builds your Selenium tests.您将需要一个持续集成 (CI) 构建管道来构建您的 Selenium 测试。 For more details, refer Build your .NET desktop app for Windows .有关更多详细信息,请参阅构建适用于 Windows 的 .NET 桌面应用程序

Create your web app创建您的网络应用程序

You'll need a web app to test.您需要一个 Web 应用程序进行测试。 You can use an existing app, or deploy one in your continuous deployment (CD) release pipeline.您可以使用现有应用程序,也可以在持续部署 (CD) 发布管道中部署一个应用程序。 For details of how to set up your own release pipeline to deploy a web app, refer Deploy to Azure Web Apps .有关如何设置自己的发布管道以部署 Web 应用的详细信息,请参阅部署到 Azure Web 应用

在此处输入图片说明

For more information how to run selenium tests using nunit, check Selenium Scripts using Nunit and this , SO Thread .欲了解更多信息,如何使用NUnit运行Selenium测试,检查硒脚本使用NUnitSO线程

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

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