Mercurial:在每次提交时自动运行远程回归测试
每次我做出一些我认为可能有效的更改时,我都会提交:在提交之前我不会进行大量测试。此外,我的提交很快就会自动推送到远程存储库。 (我是唯一的开发人员,我每天必须多次添加功能或重写部分代码。)
我想设置一台远程计算机,以便在我提交任何内容时自动运行回归测试;然后通过电子邮件将差异报告发回给我。
设置这个的最简单方法是什么?
我所有的代码都是Python 3。我自己的系统是Windows 7、ActiveState Python、TortoiseHG 和Wing IDE。我可以将远程计算机设置为 Linux 或 Windows。该应用程序都是命令行,具有文本输入和输出。
I commit every time I make some changes that I think might work: I don't do extensive testing before a commit. Also, my commits will soon be automatically pushed to a remote repository. (I'm the only developer, and I have to add features or rewrite parts of the code many times a day.)
I'd like to set up a remote computer to run regression tests automatically whenever I commit anything; and then email me back the differences report.
What's the easiest way to set this up?
All my code is in Python 3. My own system is Windows 7, ActiveState Python, TortoiseHG, and Wing IDE. I can set up the remote computer as either Linux or Windows. The application is all command-line, with text input and output.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用持续集成服务器,例如 Buildbot 或 Jenkins 并配置它来监视存储库。然后使用它运行测试。 Buildbot 是用 Python 编写的,因此您应该对它感到熟悉。
如果您觉得让 Buildbot 或 Jenkins 轮询存储库很浪费(即使在没有新变更集时
hg pull
使用很少的资源),那么您可以配置一个changegroup
存储库中的挂钩以触发 CI 服务器中的构建。Use a continious integration server such as Buildbot or Jenkins and configure it to monitor the repository. Then run the tests using that. Buildbot is written in Python so you should feel right at home with it.
If you feel it's wasteful to make Buildbot or Jenkins poll the repository (even though
hg pull
uses very few resources when there are no new changesets), then you can configure achangegroup
hook in the repository to trigger a build in the CI server.我建议设置 Buildbot。您可以让它监视远程存储库(支持 Mercurial)并在存储库更改时自动启动构建。在您的情况下,构建将只是运行您的测试套件。
它的瀑布显示允许您查看与存储库提交相关的哪些构建以及何时失败。当出现问题时,它甚至可以通过有问题的提交来通知您。
Jenkins 是另一种选择,支持大多数相同的功能。甚至还有云托管选项,例如 ShiningPanda 可以为您托管它,并且他们为开放提供免费许可 -源项目。
I would recommend setting up Buildbot. You can have it watch a remote repository (Mercurial is supported) and automatically kick off a build when the repository changes. In your case, a build would just be running your test suite.
Its waterfall display allows you to see which builds failed and when, in relation to commits from the repository. It can even notify you, with the offending commit, when something breaks.
Jenkins is another option, supporting most of the same features. There are even cloud hosting options, like ShiningPanda that can host it for you, and they offer free licensing for open-source projects.