并行测试执行Jenkins
问题描述:
我有一些使用Jenkins运行的自动化测试。并行测试执行Jenkins
我已经连接到我的GitSwarm从我的分支拉代码,然后exectutes它詹金斯。
我已经为Jenkins安装了“Parallel Test Job Execution Plugin”。
在插件我指定的测试,分3批
还有什么我应该指定运行?因为我连接到GitSwarm来运行代码,所以我不认为我必须这样做。控制台输出似乎另有说明!
建设工作区C:\詹金斯\工作\ GIT_DVT \ workspace下
git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
git.exe config remote.origin.url https://.../VMAX_UNISPHERE/stoage_mgmt.git # timeout=10
Fetching upstream changes from https://.../VMAX_UNISPHERE/stoage_mgmt.git
git.exe --version # timeout=10
using .gitcredentials to set credentials
git.exe config --local credential.username reganc3 # timeout=10
git.exe config --local credential.helper store --file=\"C:\Users\ADMINI~1\AppData\Local\Temp\2\git5891789764540509525.credentials\" # timeout=10
git.exe -c core.askpass=true fetch --tags --progress https://.../VMAX_UNISPHERE/stoage_mgmt.git +refs/heads/*:refs/remotes/origin/*
git.exe config --local --remove-section credential # timeout=10
git.exe rev-parse "origin/Uni_360_1.0^{commit}" # timeout=10
Checking out Revision 08df9a379e14d8a634e4533d962f5919f755ae67 (origin/Uni_360_1.0)
git.exe config core.sparsecheckout # timeout=10
git.exe checkout -f 08df9a379e14d8a634e4533d962f5919f755ae67
git.exe rev-list 08df9a379e14d8a634e4533d962f5919f755ae67 # timeout=10
No record available, so executing everything in one place
[parameterized-trigger] Current build has no parameters.
ERROR: Build aborted. No projects to trigger. Check your configuration!
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: C:\jenkins\jobs\GIT_DVT\workspace\unisphere360\target\surefire-reports\
Did not find any matching files.
Finished: FAILURE
任何帮助将不胜感激,它似乎是一个简单的方法有,所以希望并行运行的只是一个小错误测试。
答
我想你误会了插件:
该插件添加新的构建,可以让你轻松地执行在平行独立的任务定义测试。这是通过Jenkins查看最后一次运行的测试执行时间,将测试拆分为大小相等的多个单元,然后并行执行它们来实现的。
你已经定义了一个新的工作来运行这个插件所调用的测试。 (source)
但我想...
您可以在不同的方式实现这一目标:
- 使用TestNG的
的parallel keyword可以定义测试套件,并说他们如何应该执行。 - 创建一个新的工作,这需要测试运行的参数,并通过插件调用它(你需要一个新的工作,并有詹金斯的开销)
- 使用Job DSL Plugin或Pipeline Plugin的平行关键字(你必须重新创建作业定义)