Specflow
Configure Specflow for Freestyle
Note
Prerequisites:
MSBuild Plugin
VSTest Runnner Plugin
Visual Studio IDE setup or Visual Studio Build Tools setup on server
Perform the following steps to configure Specflow for Freestyle:
Check out the Source Code.
Add Script to update packages for msbuild using NuGet.exe file from checkout repository.
Configure msbuild executable in Manage Jenkins > Global Tool Configuration > MSTest.
Select a build step for MSBuild in the Build Section.
Perform the following steps:
Select MSBuild Version, which is configured in the Global Tool Configuration.
Specify the relative path for the solution file in MSBuild Build File.
Configure the vstest executable in Manage Jenkins > Global Tool Configuration > VSTest.
Select a build step for VSTest in the Build Section.
Perform the following steps:
Select VSTest Version which is configured in Global Tool Configuration.
Specify the relative path to your VSTest compiled assemblies in Test Files.
Clear the Enable Code Coverage checkbox.
Configure Specflow for Pipeline
Note
Prerequisites:
VSTest Runner Plugin
Visual Studio IDE setup or Visual Studio Build Tools setup on server
Perform the following steps to configure Specflow for Pipeline:
Check out the Source Code.
checkout([$class:'GitSCM', branches: [[name:'*/master']], doGenerateSubmoduleConfigurations:false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url:'https://github.com/lizamathew/Spec-Flow-Demo.git']]])Add a Script to update packages for MSBuild using NuGet.exe file from the checkout repository.
bat'C:/Users/liza.mathew/.jenkins/workspace/PipelineSpecflowProjectMaster/Specflow/.nuget/NuGet.exe update -self'Configuration for MSBuild.
bat"\"${tool 'MSBuild'}\" Specflow/SpecResults.sln"(MSBuild is a tool configuredforpath to MSBuild executable then specify relative pathforsolution file of project)Configuration of VSTest. VSTest is a tool configured for path to VSTest executable.
step([$class:'VsTestBuilder','vsTestName':'${tool VSTest}', enablecodecoverage :false,'testFiles':'Specflow/SpecResults.ApprovalTestSuite/bin/Release/SpecResults.ApprovalTestSuite.dll'])
vsTestName: path to VSTest executable
testFiles: specify relative path to your VSTest compiled assemblies