Click here to Skip to main content
15,878,959 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Currently in our company we are executing tests from CCNet (in Automation VM) by specifying different build arguments, however I feel it is now best to migrate to better automation server which is Jenkins

I am new to Jenkins world however I started installing the jenkins (though had issue in starting the Jenkins Service, later found it was due to JDK version issue)

But now I have installed all the needed plugins(GIT - for gitlab repository, MSBuild and MStest)

But I do not know how do I specify build arguments in Jenkins the way we do it in CCNet.config files

Here is the CCNet Config File that we use to Force the build

What I have tried:

<project name="AutoTests - Payments" queue="Q13">
<triggers>
    <!--<scheduleTrigger time="03:30" buildCondition="ForceBuild" name="Scheduled" />-->
 </triggers>
  <workingDirectory>D:\GIT-TA</workingDirectory>
 <artifactDirectory>D:\DEV\deploy\AutomatedTest\BuildLogs\BasicTests.Payments</artifactDirectory>
 <category>AutomatedTest</category>
 <modificationDelaySeconds>60</modificationDelaySeconds>
 <labeller type="defaultlabeller">
    <prefix>0.1.</prefix>
    <incrementOnFailure>true</incrementOnFailure>
    <labelFormat>000</labelFormat>
 </labeller>
 <tasks>
    <exec>
       <executable>D:\MSTestExtended\Runner.exe</executable>
       <buildArgs>run-tests /project:payments /retriesCount:1</buildArgs>
       <buildTimeoutSeconds>6800</buildTimeoutSeconds>
       <successExitCodes>0</successExitCodes>
    </exec>
 </tasks>
 <publishers>
    <merge>
       <files>
          <file>D:\DEV\deploy\AutomatedTest\Results\TestPublish\BasicTests.Payments_Rerun.trx</file>
       </files>
    </merge>
    <xmllogger />
 </publishers>


Likewise we have many projects and then we do the build for that, but now in Jenkins I feel little lost - how do I configure it to with my according

Note: IN CCNet - it used to pick the branch whichever is checkout in VM, but I see in Jenkins we also need to manually setup the branch name; so in that case also Is there a way to specify the branch during build time?

And if I can add the selection for run-tests /project:payments /retriesCount:1 - when we initiate the jenkins build, it will aske to select the arguments

Can someone help me in that to understand the Jenkins way of doing this?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900