Click here to Skip to main content
11,496,146 members (713 online)
Click here to Skip to main content

Tagged as

CruiseControl.Net driving Selenium Tests

, 4 Oct 2010 CPOL 7.8K 1
This is how you can quickly get CruiseControl.Net running and driving your selenium test – in 6 steps: Donwload & Install CruiseControl.Net Start “CruiseControl.NET Server“ Windows Service Download SeleniumTest sample project and extract it on a folder C:\Projects\ Edit CruiseControl.NET configu
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.

This is how you can quickly get CruiseControl.Net running and driving your selenium test – in 6 steps:

  1. Donwload & Install CruiseControl.Net
  2. Start “CruiseControl.NET Server“ Windows Service
  3. Download SeleniumTest sample project and extract it on a folder C:\Projects\
  4. Edit CruiseControl.NET configuration file (C:\Program Files (x86)\CruiseControl.NET\server\ccnet.config) and replace it with the information in C:\Projects\SeleniumTest\CruiseControl.Net\ccnet.config. Modify it with proper locations of MSBuild.exe, MsBuild.dll and MSTest.exe 
  5. Start selenium server by running C:\Projects\SeleniumTest\SeleniumServerPort4441.bat
  6. Open http://localhost/ccnet and you will se the project SeleniumSearchTest1 click on Force. It should build the project and start the tests.

This is how the ccnet.config file looks

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
  <project>
    <name>SeleniumSearchTest1</name>
    <triggers>
      <scheduleTrigger time="23:30" buildCondition="ForceBuild">
        <weekDays>
            <weekDay>Monday</weekDay>
            <weekDay>Tuesday</weekDay>
            <weekDay>Wednesday</weekDay>
            <weekDay>Thursday</weekDay>
            <weekDay>Friday</weekDay>
        </weekDays>
      </scheduleTrigger>
    </triggers>
    <workingDirectory>C:\Projects\SeleniumTest</workingDirectory>
    <tasks>
      <msbuild>
        <executable>C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
        <workingDirectory>C:\Projects\SeleniumTest</workingDirectory>
        <projectFile>SeleniumTest.sln</projectFile>
        <buildArgs>/noconsolelogger /p:Configuration=Debug /v:diag</buildArgs>
        <targets>Build</targets>
        <timeout>900</timeout>
        <logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
      </msbuild>
      <exec>
        <executable>DelResults.bat</executable>
        <baseDirectory>.\</baseDirectory>
      </exec>     
      <exec>
        <executable>C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe</executable>        
        <baseDirectory>.\</baseDirectory>
        <buildArgs> /testcontainer:SeleniumSearch\bin\Debug\SeleniumSearch.dll /resultsfile:Results\results1.xml</buildArgs>
      </exec>     
    </tasks>
    <publishers>
      <merge>
        <files>
          <file>.\Results\results1.xml</file>
        </files>
      </merge>
    </publishers>
  </project>
</cruisecontrol>

This example applies for VS 2008 Professional, ccnet 1.5.7256.1 and Selenium RC 1.0.3

Links

License

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

Share

About the Author

mariangemarcano

Denmark Denmark
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150520.1 | Last Updated 4 Oct 2010
Article Copyright 2010 by mariangemarcano
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid