Parallel Test Execution Jenkins

旧时模样 提交于 2019-12-24 06:22:48

问题


I have some automated tests that I'm running using Jenkins.

I've Jenkins connected to my GitSwarm which pulls the code from my branch and then exectutes it.

I have installed the "Parallel Test Job Execution Plugin" for Jenkins.

In the plugin I have specified the tests to run in 3 batches

Is there anything else I should specify? I didn't think I would have to since I'm connecting to GitSwarm to run the code. The console output seems to state otherwise !

Building in workspace C:\Jenkins\jobs\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

Any help would be greatly appreciated, it does seem like an easy way to have tests running parallel so hopefully its only a small error.


回答1:


I think you have misunderstood the plugin:

This plugin adds a new builder that lets you easily execute tests defined in a separate job in parallel. This is achieved by having Jenkins look at the test execution time of the last run, split tests into multiple units of roughly equal size, then execute them in parallel.

You have do define a new job to run the tests which is called by this plugin. (source)

But I want to ...

You can achieve this on different ways:

  • Use the parallel keyword of TestNG
    You can define test suites and say how they should be executed.
  • Create a new job which takes the test to run as parameter and call it via the plugin (You need a new job and have the overhead of Jenkins)
  • Use the parallel keyword of the Job DSL Plugin or Pipeline Plugin (You have to recreate the job definition)


来源:https://stackoverflow.com/questions/37540591/parallel-test-execution-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!