2016-05-31 157 views
1

我有一些使用Jenkins運行的自動化測試。並行測試執行Jenkins

我已經連接到我的GitSwarm從我的分支拉代碼,然後exectutes它詹金斯。

我已經爲Jenkins安裝了「Parallel Test Job Execution Plugin」。

在插件我指定的測試,分3批

screenshot

還有什麼我應該指定運行?因爲我連接到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 

任何幫助將不勝感激,它似乎是一個簡單的方法有,所以希望並行運行的只是一個小錯誤測試。

回答

2

我想你誤會了插件:

該插件添加新的構建,可以讓你輕鬆地執行在平行獨立的任務定義測試。這是通過Jenkins查看最後一次運行的測試執行時間,將測試拆分爲大小相等的多個單元,然後並行執行它們來實現的。

你已經定義了一個新的工作來運行這個插件所調用的測試。 (source

但我想...

您可以在不同的方式實現這一目標:

  • 使用TestNG的
    parallel keyword可以定義測試套件,並說他們如何應該執行。
  • 創建一個新的工作,這需要測試運行的參數,並通過插件調用它(你需要一個新的工作,並有詹金斯的開銷)
  • 使用Job DSL PluginPipeline Plugin的平行關鍵字(你必須重新創建作業定義)