简体   繁体   English

在Bamboo中运行NUnit webdriver测试

[英]Run NUnit webdriver tests in Bamboo

I'm trying to setup a job in Bamboo to run some function tests written in Visual Studio 2015 with C# and Webdriver and I can[t find any specific documentation on how to run this tests in Bamboo. 我正在尝试在Bamboo中设置一个工作来运行使用C#和Webdriver在Visual Studio 2015中编写的一些函数测试,我无法找到有关如何在Bamboo中运行此测试的任何特定文档。 I have the sln file I build it on my machine and a playlist is generated with all the tests, how can I do this steps in Atlassian Bamboo? 我有我在机器上构建它的sln文件,并且所有测试都生成了一个播放列表,如何在Atlassian Bamboo中执行此步骤? Does anyone have one information / tips I can use? 有没有人有我可以使用的信息/提示?

You should have three steps to configure what you are asking for: 您应该有三个步骤来配置您要求的内容:

  • Use Selenium Grid . 使用Selenium Grid The goal is to have a hub (and at least one node). 目标是拥有一个集线器(至少一个节点)。 You can find the documentation on seleniumhq.github.io : Suppose you are using Selenium Grid on http://abcd:4444/ ; 您可以在seleniumhq.github.io上找到文档:假设您在http:// abcd:4444 /上使用Selenium Grid ;

    • You can run the selenium's hub: 你可以运行selenium的中心:

       java -jar selenium-server-standalone.jar -role hub 
    • You can run the selenium's node (connected to the hub). 您可以运行selenium的节点(连接到集线器)。 For example, if you want to use the IEDriver , you can run your node using 例如,如果要使用IED驱动程序 ,则可以使用运行节点

       java -Dwebdriver.ie.driver=IEDriverServer.exe -jar selenium-server-standalone-2.53.1.jar -port 5555 -role node -hub http://abcd:4444/grid/register -browser "browserName=internet explorer,version=11,platform=WINDOWS,maxInstances=10" 
  • You need to have NUnit tests using a remote web driver. 您需要使用远程Web驱动程序进行NUnit测试。 For example: 例如:

     DesiredCapabilities capability = DesiredCapabilities.InternetExplorer(); var driver = new RemoteWebDriver(new Uri("http://abcd:4444/wd/hub"), capability); driver.Navigate().GoToUrl("http://www.google.ch"); 
  • In your Bamboo task's configuration, you need to have a NUnit Runner configuration (as well as a NUnit parser if you want to get the results). 在Bamboo任务的配置中,您需要具有NUnit Runner配置(如果您想获得结果,还需要NUnit解析器)。

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

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