- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 jenkins-pipeline 发布测试结果,
使用这个管道脚本,我设法完成构建并生成“xml”输出:
node {
stage 'Checkout'
checkout scm
stage 'Build'
bat "\"C:/Program Files/dotnet/dotnet.exe\" restore \"${workspace}/MyProg.sln\""
bat "\"C:/Program Files/dotnet/dotnet.exe\" build \"${workspace}/MyProg.sln\""
stage 'UnitTests'
bat returnStatus: true, script: "\"C:/Program Files/dotnet/dotnet.exe\" test \"${workspace}/MyProg.sln\" --logger \"trx;LogFileName=unit_tests.xml\" --no-build"
nunit testResultsPattern: 'Tests\\*Test*\\TestResults\\unit_tests.xml'
}
" Publish NUnit test result report Could not read the XSL XML file. Please report this issue to the plugin author "
<?xml version="1.0" encoding="UTF-8"?>
<TestRun id="201fdc5c-9a47-461b-a56c-1aec8778053d" name="golano1@VM-CCT-BUILD3 2018-03-28 17:36:50" runUser="CORP\golano1" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Times creation="2018-03-28T17:36:50.5380380+03:00" queuing="2018-03-28T17:36:50.5380497+03:00" start="2018-03-28T17:36:38.1418862+03:00" finish="2018-03-28T17:36:55.6498820+03:00" />
<TestSettings name="default" id="3e9b0993-3888-4428-bd08-e217e3b54831">
<Deployment runDeploymentRoot="golano1_VM-CCT-BUILD3 2018-03-28 17_36_50" />
</TestSettings>
<Results>
<UnitTestResult executionId="77a19978-2bbb-4bcb-afaa-d5be4384e0d1" testId="a08b2ec5-a68d-434b-a35f-6c65159eee8f" testName="TestSentinalOneBigFile_Failed" computerName="VM-CCT-BUILD3" duration="00:00:05.0340000" startTime="2018-03-28T17:36:45.0000000+03:00" endTime="2018-03-28T17:36:50.0000000+03:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="77a19978-2bbb-4bcb-afaa-d5be4384e0d1" />
<UnitTestResult executionId="49fb4bd0-d650-4ed4-b0f2-40241b138f40" testId="15590544-6d25-4b07-9736-91fc3089eb1d" testName="TestSentinalOneFullScanOfSingleFile_Success" computerName="VM-CCT-BUILD3" duration="00:00:05.0130000" startTime="2018-03-28T17:36:50.0000000+03:00" endTime="2018-03-28T17:36:55.0000000+03:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="49fb4bd0-d650-4ed4-b0f2-40241b138f40" />
</Results>
<TestDefinitions>
<UnitTest name="TestSentinalOneBigFile_Failed" storage="c:\jenkins\workspace\testfolder\pg_branchbuild\tests\sentinalonetests\bin\debug\netcoreapp2.0\sentinalonetests.dll" id="a08b2ec5-a68d-434b-a35f-6c65159eee8f">
<Execution id="77a19978-2bbb-4bcb-afaa-d5be4384e0d1" />
<TestMethod codeBase="C:\Jenkins\workspace\TestFolder\PG_BranchBuild\Tests\SentinaloneTests\bin\Debug\netcoreapp2.0\SentinaloneTests.dll" executorUriOfAdapter="executor://nunit3testexecutor/" className="SentinaloneTests.SentinaloneEngineConnectorTest" name="TestSentinalOneBigFile_Failed" />
</UnitTest>
<UnitTest name="TestSentinalOneFullScanOfSingleFile_Success" storage="c:\jenkins\workspace\testfolder\pg_branchbuild\tests\sentinalonetests\bin\debug\netcoreapp2.0\sentinalonetests.dll" id="15590544-6d25-4b07-9736-91fc3089eb1d">
<Execution id="49fb4bd0-d650-4ed4-b0f2-40241b138f40" />
<TestMethod codeBase="C:\Jenkins\workspace\TestFolder\PG_BranchBuild\Tests\SentinaloneTests\bin\Debug\netcoreapp2.0\SentinaloneTests.dll" executorUriOfAdapter="executor://nunit3testexecutor/" className="SentinaloneTests.SentinaloneEngineConnectorTest" name="TestSentinalOneFullScanOfSingleFile_Success" />
</UnitTest>
</TestDefinitions>
<TestEntries>
<TestEntry testId="a08b2ec5-a68d-434b-a35f-6c65159eee8f" executionId="77a19978-2bbb-4bcb-afaa-d5be4384e0d1" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="15590544-6d25-4b07-9736-91fc3089eb1d" executionId="49fb4bd0-d650-4ed4-b0f2-40241b138f40" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
</TestEntries>
<TestLists>
<TestList name="Results Not in a List" id="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestList name="All Loaded Results" id="19431567-8539-422a-85d7-44ee4e166bda" />
</TestLists>
<ResultSummary outcome="Completed">
<Counters total="2" executed="2" passed="2" failed="0" error="0" timeout="0" aborted="0" inconclusive="0" passedButRunAborted="0" notRunnable="0" notExecuted="0" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" />
<Output>
<StdOut>NUnit Adapter 3.8.0.0: Test execution startedRunning all tests in C:\Jenkins\workspace\TestFolder\PG_BranchBuild\Tests\SentinaloneTests\bin\Debug\netcoreapp2.0\SentinaloneTests.dllNUnit3TestExecutor converted 2 of 2 NUnit test casesNUnit Adapter 3.8.0.0: Test execution complete</StdOut>
</Output>
</ResultSummary>
</TestRun>
step([$class: 'NUnitPublisher', testResultsPattern: 'Tests\\FilesScannerTests\\TestResults\\unit_tests.xml', debug: false, keepJUnitReports: true, skipJUnitArchiver:false, failIfNoResults: true])
最佳答案
我设法使用“ MSTestPublisher ”类做到了这一点,
所以最终的管道是:
node {
stage 'Checkout'
checkout scm
stage 'Build'
bat "\"C:/Program Files/dotnet/dotnet.exe\" restore \"${workspace}/MyProg.sln\""
bat "\"C:/Program Files/dotnet/dotnet.exe\" build \"${workspace}/MyProg.sln\""
stage 'UnitTests'
bat returnStatus: true, script: "\"C:/Program Files/dotnet/dotnet.exe\" test \"${workspace}/MyProg.sln\" --logger \"trx;LogFileName=unit_tests.xml\" --no-build"
step([$class: 'MSTestPublisher', testResultsFile:"**/unit_tests.xml", failOnError: true, keepLongStdio: true])
}
关于.net - 如何使用 jenkins 管道发布 dotnet 核心测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49541087/
我想创建一个 Jenkins 工作来启动其他 Jenkins 工作。这很容易,因为 Jenkins 模板项目插件允许我们创建“使用另一个项目的构建器”类型的构建步骤。然而,让我的情况更难的是我必须在其
我有一个简单的Windows批处理命令(robocopy),该命令返回零错误,但在Jenkins中始终被标记为失败。我想知道为什么? D:\ Jenkins \ jobs \ Jenkins Conf
我有两个 Jenkins 工作 - Jenkins Job1 和 Jenkins Job2。 我有多个应用程序并使用相同的 Jenkins 来构建应用程序。如果相同的应用程序在 Jenkins 中运行
我找不到这两者之间的区别。这些是相同的还是不同的。 最佳答案 第一个区别是支持(正如其他人所提到的)。 CloudBees 提供企业级支持以及经过全面审查和测试的 Jenkins 版本,该版本将在各种
是否可以指定在多次触发作业(A)的情况下,将先前的作业从队列中删除,并且如果有足够的可用插槽,则仅将最新的作业留在队列中或启动? 提前致谢! 最佳答案 您可以使用通过Groovy Script Plu
我有2位Jenkins主持人,并且希望First Jenkins在第一个结果的基础上基于“SUCCESS”触发远程Jenkins上的工作。 我看过各种插件,但它们似乎都表明一个Jenkins主机,可以
我的 jenkinsfile 有几个参数,每次我更新参数(例如删除或添加新输入)并将更改提交到我的 SCM 时,我没有在 jenkins 中看到相应更新的作业输入屏幕,我必须运行执行,取消它,然后查看
有没有办法在构建完成后触发相同的工作。我有一项工作需要运行,直到我手动中止它。有没有办法做到这一点? 最佳答案 最简单的方法是添加一个构建相同项目的后期构建步骤。将“构建后操作”-“构建其他项目”-“
我在 Linux 家中的特定用户下有工作/.jenkins 文件夹。我想与另一个用户一起启动 Jenkins,但重新使用另一个用户的 .jenkins 文件夹。我怎样才能做到这一点? Jenkins
我是 Jenkins 的新手,我不确定这是否可行,但我想设置一个 Web 界面,人们可以在其中单击“开始作业”,这将告诉 Jenkins 开始特定的构建作业。 Jenkins 是否有允许此类操作的网络
如何获取 Jenkins 凭证变量,即“mysqlpassword”,可供 Jenkins 声明性管道的所有阶段访问? 下面的代码片段工作正常并打印我的凭据。 node { stage('Gett
如何获取 Jenkins 凭证变量,即“mysqlpassword”,可供 Jenkins 声明性管道的所有阶段访问? 下面的代码片段工作正常并打印我的凭据。 node { stage('Gett
如何将构建参数从一个项目传递到另一个项目? 我们在 Jenkins 用户界面中是否有任何配置,可以在完成一个构建项目后将构建参数传递给另一个项目? 我能够触发另一个项目,但无法传递构建参数。我们是否有
我正在 Jenkins 中构建一个项目,并希望在它之后立即启动测试,请稍候 直到测试完成,然后运行另一个作业来分析结果。测试系统是一个封闭的系统(我不能修改它)所以为了检查测试是否完成我需要每 X 秒
我创建了一个测试 jenkins 作业管道。此作业具有字符串参数 - 'testVar' Jenkins文件代码: println("env.TESTVAR=" + env.TESTVAR) prin
我的 Jenkins 工作“构建”配置有 3 执行 shell - 构建任务 2 构建后操作 有没有办法获取每个构建任务和构建后操作的运行时间? 最佳答案 不直接,这就是为什么: 我使用 a Jenk
是否有任何适用于 Jenkins 的插件可以为 Jenkins 提供键值存储选项?功能接近的插件是凭据插件。目标是拥有一个存储全局配置参数的插件,并且此参数可用于 Jenkins 作业。 最佳答案 转
默认情况下,Jenkins 是否会保留每个构建中生成的所有构建和工件。或者它会在一段时间后删除它们。我知道我可以配置“丢弃旧版本”选项,但我想知道 Jenkins 的默认行为。 最佳答案 默认是保留所
Jenkins 构建中的每个文件参数“帮助文本”, Accepts a file submission from a browser as a build parameter. The uploade
情况:我在我的虚拟服务器上安装了 Jenkins 并设置了一个“自由式管道”。我通过 webhook push 将它连接到我的 github,它可以工作(当我推送到存储库时,在 jenkins 中启动
我是一名优秀的程序员,十分优秀!