【问题标题】:Parallel Test Execution Jenkins并行测试执行 Jenkins
【发布时间】:2016-05-31 08:28:15
【问题描述】:

我有一些使用 Jenkins 运行的自动化测试。

我已将 Jenkins 连接到我的 GitSwarm,它从我的分支中提取代码然后执行它。

我已经为 Jenkins 安装了“并行测试作业执行插件”。

在插件中,我指定了分 3 批运行的测试

我还有什么需要说明的吗?我认为我不必这样做,因为我连接到 GitSwarm 来运行代码。控制台输出似乎另有说明!

在工作区 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

任何帮助将不胜感激,这似乎是一种让测试并行运行的简单方法,因此希望它只是一个小错误。

【问题讨论】:

    标签: java testing jenkins parallel-processing automation


    【解决方案1】:

    我认为你误解了插件:

    这个插件添加了一个新的构建器,让您可以轻松地并行执行在单独的作业中定义的测试。这是通过让 Jenkins 查看上次运行的测试执行时间,将测试分成大小大致相等的多个单元,然后并行执行它们来实现的。

    你已经定义了一个新的工作来运行这个插件调用的测试。 (source)

    但我想...

    您可以通过不同的方式实现这一目标:

    • 使用TestNG的parallel keyword
      您可以定义测试套件并说明它们应该如何执行。
    • 创建一个新作业,它将测试作为参数运行并通过插件调用它(您需要一个新作业并且有 Jenkins 的开销)
    • 使用Job DSL PluginPipeline Plugin 的并行关键字(您必须重新创建作业定义)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-10-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多