持续集成、Azure 云服务、Selenium 测试、回购 github

Continous Integration, Azure cloud service, Selenium Tests, repos on github

我是一名 Web 程序员初学者,我的公司让我研究 CI 最适合他们的。起初他们想使用 VS Team Services,因为它对少于 5 人免费。以下是我们的情况

我们喜欢遵循的工作流程如下

在 GitHub 与 dev 分支合并 -> 在 Team Services 上触发构建 -> 构建通过 -> 部署到 Azure 上的测试槽 -> 从 Github master 分支获取最新的 selenium 测试 ->针对 Azure 上的测试槽 URL 构建和 运行 selenium 测试 -> 测试通过 -> 请求部署到生产和其他槽(如演示)的许可。

如果任何构建或测试失败,CI 停止并向开发人员发送电子邮件。

目前我所知道的:

我四处搜索并设法在与分支合并时触发 Team Services 上的自动构建。但正如我所说,主要的网络代码和硒测试在两个不同的回购协议中,我的老板希望保持这种状态。 我还了解到,运行 selenium firefox 无法在托管的团队服务构建代理上进行测试,因此我们计划使用一些本地 PC 来构建和测试(尽管我们最初希望一切都在团队服务上进行)

问题 #1:测试和主应用程序位于两个不同的存储库中,所以我不知道 Team Services 是否支持链接构建(主应用程序构建传递 -> selenium 构建和 运行 -> ...)。 问题 #2:在 selenium 测试通过后,我如何在代码打开时将 VS Team Services 部署到 Azure 云服务 github

如果您认为这在 Team Services 中做起来太复杂,请建议适合 Team Services 的其他工作流程(但在 github 上保留 repos)或其他 CI 服务可以完成我们的工作想要但更容易使用。

提前感谢您尝试回答我的问题

I also learned that it is impossible to run selenium firefox tests on hosted Team Services build agent so we are planning on using some local PC to build and test

根据我的经验,我已成功使用 TeamCity. It's designed to work with .Net. Our infra was entirely Azure based, we've used dedicated Selenium Server VM (with configured Grid),因为 TeamCity 代理太弱而无法执行并行 UI 测试。基本思想是您的 TC 代理 运行 测试(在我的例子中是 NUnit),但浏览器在 Selenium VM 上 created/executed。

But as I said the main web code and selenium tests are in two different repos and my boss wants to keep them that way.

不管你用什么版本控制(甚至是混合模式),TC 都支持。但郑重声明 - 我也使用了 Git。您需要的是根据您的工作流程链接构建步骤。