zoukankan      html  css  js  c++  java
  • How to Integrate .NET Projects with Jenkins

    https://www.swtestacademy.com/jenkins-dotnet-integration/

    8) Unit Tests and Test Coverage Settings

    Download and extract OpenCover under “C:Tools” folder.

    Also, generate latest OpenCovertoCoberturaConverter.exe under “C:ToolsCobertura”.

    Install latest version of NUnit.

    And finally, add an “Execute Windows batch command” step and write a command as follows according to your project. For targettargs, set your Unit Test’s dll file.

          Note: There is a problem to publish Nunit 3 test results with latest NUnit Jenkins plugin. Thus, I changed NUnit 3 format to NUnit 2 format by adding “format=nunit2” in below script.

    Below script, automatically run all of your unit tests and create TestResults.xml file under workspace also it runs test coverage and creates Coverage.xml under workspace folder.

          Script:

                   “C:ToolsopencoverOpenCover.Console.exe” -register:user -target:”C:Program Files (x86)NUnit.org unit-console unit3-console.exe” -targetargs:”C:JenkinsProjects{YOUR PROJECT         PATH}inDebugKariyerNet.Business.ECommerce.UnitTests.dll –result=TestResult.xml;format=nunit2″ -filter:+

                     [*]* -output:Coverage.xml

  • 相关阅读:
    1014. 福尔摩斯的约会
    1009. 说反话
    1002. 写出这个数
    1031. 查验身份证
    1021. 个位数统计
    1006. 换个格式输出整数
    1058. A+B in Hogwarts
    1027. Colors in Mars
    1019. General Palindromic Number
    Windows 新装进阶操作指南
  • 原文地址:https://www.cnblogs.com/chucklu/p/8565925.html
Copyright © 2011-2022 走看看