在 TeamCity 持续集成服务器上自动化 Selenium 测试 [英] Automate Selenium tests on TeamCity Continuous Integration server

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

问题描述

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

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

(我已经有一个由版本控制签入(Mercurial)触发的编译构建)

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

但我想要一个单独的(每晚)构建配置来运行 Selenium 测试,最好是在 MSTest 下.

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

我假设我需要 Selenium Server 来做这个?如果是这样,在运行测试之前启动它的最佳方法是什么?我应该从 MSBuild 脚本 执行此操作,还是使用 Team City 本身的 Build Step?我是否需要首先启动 CassiniWebDev.WebServer 以便运行以下命令:

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 CassiniWebDev.WebServer first of all so the following can run:

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

?

我有一个安装了 TeamCity 6.5.1 的构建服务器.我已经安装了 VS2010.

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.

推荐答案

我正要在我们的 TeamCity Server 中设置 Selenium 测试,我还在谷歌上搜索.这些是我发现有趣的页面(除了您的 StackOverflow 问题):

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):

使用 TeamCity、Selenium 对任何 Web 应用程序进行回归测试, 和 JUnit

来自 TeamCity 的 Selenium 浏览器单元测试

因此,有一种解决方案可以将使用 Selenium IDE 记录的 html 文件转换为 Java,以便在 TeamCity 中使用 JUnit 运行,另一种方法是在 C# 中创建测试脚本.

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#.

还有这个主题,"通过 Teamcity 运行 Selenium 测试,可以完成了吗?" 描述了将构建代理作为服务运行时出现的问题...我希望我可以继续将代理作为服务运行.

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 持续集成服务器上自动化 Selenium 测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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