问题描述
有没有人试过这个功能,并有一些反馈?或者有人知道一些有用的样本来查找?
Did anyone try that feature and has some feedback? Or Does anyone know some useful samples to look up?
推荐答案
我已经尝试过这个功能几个月前,使用它(只是因为我不需要它,而不是因为它不是一个好的功能)。
I have tried this feature some months ago, but I don't use it anymore (just because I don't need it, not because it is not a good feature).
基本上,你定义n轴,每个轴是一个属性有几个值。
Basically, you define n Axis, each axis is a property with several values.
让我们举个例子:定义AxisJDK,可能的值为1.4,1.5,1.6定义另一个属性数据库,其中可能的值是oracle,mysql。
Let's go with an example: you define the Axis "JDK", with possible value "1.4", "1.5", "1.6", and you define another property "database", where possible values are "oracle", "mysql".
因此,Hudson将启动你的构建6次:
Thus, Hudson will launch your build 6 times:
- 与JDK 1.4,属性database = oracle(即JVM使用-Ddatabase = oracle启动)
- JDK 1.5,带有JDK 1.6的属性database = oracle
- ,使用JDK 1.4的属性database = oracle
- mysql
- 与JDK 1.5,属性database = mysql
- 与JDK 1.6,属性database = mysql
- with JDK 1.4, with the property database=oracle (i.e. the JVM is launched with -Ddatabase=oracle)
- with JDK 1.5, with the property database=oracle
- with JDK 1.6, with the property database=oracle
- with JDK 1.4, with the property database=mysql
- with JDK 1.5, with the property database=mysql
- with JDK 1.6, with the property database=mysql
然后,一旦完成,您将可以看到每次迭代的结果。
Then, once everything is finished, you will be able to see the results for each iteration.
当您需要在多个环境(在我的示例中,使用不同版本的JDK或数据库)测试您的应用程序时,此功能可能非常有用。
This feature may be really usefull when you need to test your application in several environments (in my example, with different versions of JDK or database).
请注意, JDK轴,你必须自己管理由Hudson提供的属性。在我的示例中,应用程序必须考虑数据库属性本身。最终,一个好主意是使用这个属性来启用Maven2配置中的特定配置文件,如果你的项目是mavenized(参见
I hope my explanations are clear enough :)
这篇关于哈德森经验 - 建筑矩阵项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!