如何确保哈德森一次只能执行某一类工作? [英] How do I ensure that only one of a certain category of job runs at once in Hudson?

查看:68
本文介绍了如何确保哈德森一次只能执行某一类工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Hudson使大型重要产品的测试自动化.我希望我的测试主机能够运行理论上将支持的并发构建,而excel-tests例外,后者只能在每台计算机上一次运行.可以同时运行任意数量的非Excel测试,但是每台机器一次最多只能运行一个Excel测试.

I use Hudson to automate the testing of a very large important product. I want to have my testing-hosts able to run as many concurrent builds as they will theoretically support with the exception of excel-tests which must only run one per machine at any time. Any number of non-excel tests can run concurrently, however at most one excel test at a time must run per machine.

背景:

我的大多数测试都是普通的单元测试-这种事情我可以很容易地并行运行.不幸的是,我的单元测试计划中大量且耗时的部分包括已经在Excel中实现的测试.

Most of my tests are normal unit-tests - the sort of thing that I can easily run in parallel. Unfortunately a substantial and time consuming part of my unit-testing plan consists of tests which have been implemented in Excel.

您可能会认为在Excel中实施测试很疯狂-实际上有一个重要原因:我们的大多数用户都通过Excel访问我们的系统. Excel具有自己独特的数据处理方式,因此,确保我们的产品适用于Excel用户的唯一方法是从字面上实现我们的应用程序Excel的正则测试.

You might think it crazy to implement a test in Excel - actually there's an important reason: Most of our users access our system via a Excel. Excel has it's own quirky ways of handling data so the only way to guarantee that our stuff works for Excel users is to literally implement our reg-test our application Excel.

我编写了一个测试运行工具,使我可以轻松触发一组excel测试:每个测试都是一个.xls文件.每个组都是一个充满excel文件的文件夹.我大约有30个小组需要进行端到端测试.我的工具将每个测试的结果转换为Hudson能够理解的JUnit样式XML.测试使用pywin32com库自动执行excel.当自己运行时,它们是可靠的.

I've written a test-runner tool which allows me to easily fire off a group of excel tests: Each test is a single .xls file. Each group is a folder full of excel files. I've got about 30 groups which need to be run for an end-to-end test. My tool converts the result of each of the tests into JUnit style XML which Hudson is able to understand. The tests use the pywin32com library to automate excel. When run on their own they are reliable.

我有一组专门用于运行测试的计算机.每台机器都是四核的,理论上可以一次运行很多东西.不幸的是,我发现COM不能一次安全地控制每台计算机超过1个excel.

I've got a group of computers which are dedicated to running tests. Each machine is quad-core and can theoretically run quite a lot of stuff at once. Unfortunately I've found that COM cannot be used to safely control more than 1 excel per machine at a time.

这就是说,如果尝试通过COM与Excel进行通讯的第二个构建星标可能会干扰已经在运行的那个,并导致两个测试均失败.

That is to say if a 2nd build stars which tries to talk to Excel via COM it might interfere with the one which is already running and cause both tests to fail.

我可以运行机器允许的其他许多非excel进程,但是我需要找到一种方法,以使Hudson不会尝试在任何一台机器上同时启动需要excel的多个进程.

I can run as many other non-excel processes as the machine will allow but I need to find a way so that Hudson does not attempt to launch any more than 1 process which requires excel on any one machine concurrently.

推荐答案

诸如锁和闩锁"插件之类的声音可能会对您有所帮助.

Sounds like the Locks and Latches plugin might help you.

http://hudson.gotdns.com/wiki/display/HUDSON/Locks +和+ Latches + plugin

这篇关于如何确保哈德森一次只能执行某一类工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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