Python 我可以在Jenkins使用并行测试执行器进行鼻测试吗?
我试图弄清楚,在Jenkins中使用插件进行鼻测试是否可行。我正在使用Jenkins管道,在演示之后,我正在运行以下程序:Python 我可以在Jenkins使用并行测试执行器进行鼻测试吗?,python,jenkins,jenkins-pipeline,nose,Python,Jenkins,Jenkins Pipeline,Nose,我试图弄清楚,在Jenkins中使用插件进行鼻测试是否可行。我正在使用Jenkins管道,在演示之后,我正在运行以下程序: def splits = splitTests parallelism: [$class: 'CountDrivenParallelism', size: 2], generateInclusions: true def branches = [:] for (int i = 0; i < splits.size(); i++) { def num = i
def splits = splitTests parallelism: [$class: 'CountDrivenParallelism', size: 2], generateInclusions: true
def branches = [:]
for (int i = 0; i < splits.size(); i++) {
def num = i
def split = splits[num]
branches["split${num}"] = {
stage("Test Section #${num + 1}") {
node() {
stage('Preparation') {
writeFile file: "parallel-test-includes-${i}.txt", text: split.list.join("\n")
}
}
}
}
}
parallel branches
def splits=splitTests并行性:[$class:'CountDrivenParallelism',大小:2],generateInclusions:true
def分支=[:]
对于(int i=0;i
生成的文件包含如下所示的测试:
path/to/file(without .py)/<class name>.java
path/to/file(without .py)/<class name>.class
path/to/file(不带.py)/.java
path/to/file(不带.py)/.class
是否可以使用此输出在测试中包括/排除测试?我在nose测试中没有看到任何选项可以这样做——帮助你可以使用nose排除插件并将文件传递给nose
您还需要
split.collect{it.replaceAll(/(.*)\/(.*)。(java | class)/,'$1.$2')}
并使用一个集合来避免重复。您可以使用nose exclude插件并将文件传递给nose
您还需要split.collect{it.replaceAll(/(.*)\/(.*)。(java | class)/,'$1.$2')}
并使用一个集合来避免重复