自动化TeamCity Continuous Integration服务器上的Selenium测试 [英] Automate Selenium tests on TeamCity Continuous Integration server

查看:334
本文介绍了自动化TeamCity Continuous Integration服务器上的Selenium测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Visual Studio解决方案,其中包括一个测试项目有Selenium测试。



(我已经有一个编译版本触发的版本控制检查/ p>

但我想有一个单独的(每夜)构建配置,运行Selenium测试,理想情况下在MSTest下。



我认为我需要Selenium服务器为此?如果是这样,在运行测试之前启动它的最好方法是什么?我应该从 MSBuild脚本或使用Team City本身的构建步骤执行此操作吗?我需要启动Cassini \WebDev.WebServer首先,所以以下可以运行:

  selenium = new DefaultSelenium localhost,4444,* firefox,http:// localhost:49192 /); 



安装TeamCity 6.5.1。
我安装了VS2010。



当然有人这样做了!绝望的一些帮助这里家伙。

解决方案

我只是想在我们的TeamCity中设置Selenium测试服务器和我仍然Googling。
这些是我发现有趣的页面(除了StackOverflow问题):



对具有TeamCity,Selenium和JUnit的任何Web应用程序进行回归测试



a href =http://kristjansson.us/?p=947> Selenium浏览器UnitTesting from TeamCity



因此,有一个解决方案可以将使用Selenium IDE记录的HTML文件与TeamCity中的JUnit一起运行,另一种方法是使用C#创建测试脚本。



而这个主题通过Teamcity运行Selenium测试,可以做吗?描述了运行构建代理时的问题a service ...我希望我可以继续作为服务运行代理。


I have a Visual Studio solution which includes a Test project having Selenium Tests.

(I already have a compilation build triggered by version control checkin (Mercurial))

But I want to have a separate (nightly) Build Configuration which runs the Selenium tests, ideally under MSTest.

I assume I need Selenium Server for this? If so, what's the best way to fire it up before running the tests? Should I do this from the MSBuild script or use a Build Step from Team City itself? Do I need to fire up Cassini\WebDev.WebServer first of all so the following can run:

selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://localhost:49192/");

?

I have a Build Server with TeamCity 6.5.1 installed. I have a VS2010 installed.

Surely someone has done this! Desperate for some help here guys. If any one could offer any examples, that would be appreciated.

解决方案

I am just about to set up Selenium tests in our TeamCity Server and am still Googling. These are the pages that I found interesting (apart from your StackOverflow question):

Regression testing for any web application with TeamCity, Selenium, and JUnit

Selenium browser UnitTesting from TeamCity

So there is one solution that converts the html files recorded with Selenium IDE to Java to be ran with JUnit in TeamCity and the other approach is creating your test scripts in C#.

And this topic, "Running Selenium Tests through Teamcity, can it be done?" describes a problem while running the Build Agent as a service... I hope that I can continue running the agent as a service.

这篇关于自动化TeamCity Continuous Integration服务器上的Selenium测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆