Ranorex integration with SVN and draco

Experiences, small talk, and other automation gossip.
bheemuabhigna
Posts: 49
Joined: Thu Feb 03, 2011 3:15 pm

Ranorex integration with SVN and draco

Post by bheemuabhigna » Mon Feb 28, 2011 8:41 am

Hi,

We have already some automated test cases. Now we are planning to use the version control and we have decided to use SVN and we are in intial stage of implementing this.
Our problem is --
We will be having new builds regularly.our developers normally use SVN and Draco.once all changes are done they will upload build into draco.net.
When the build is uploaded some of the test cases that we have saved in version control should get executed automatically. Bases on the pass percentage build will be rejected.
So, once the build is up loaded completely in draco net some of the test cases should get executed.

Any suggestions on this will be very helpful.
Please do provide any information or ideas.

Thanks
Abhigna

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Ranorex integration with SVN and draco

Post by Support Team » Tue Mar 01, 2011 9:30 am

FYI the following forum threads cover similar topics:
http://www.ranorex.com/forum/running-ra ... t1678.html
http://www.ranorex.com/forum/how-to-int ... -t529.html

Regards,
Alex
Ranorex Team

bheemuabhigna
Posts: 49
Joined: Thu Feb 03, 2011 3:15 pm

Re: Ranorex integration with SVN and draco

Post by bheemuabhigna » Tue Mar 01, 2011 12:27 pm

Hi Alex,

Thanks for the information provided.
The workflow I prepared was following
Once the build is generated drao will send an auto generated mail to our email id.
We will write a script to check whether a mail with particular subject is received to particular mail id.
If mail is received scripts will executed and result will be sent to mail ids again
the script will be scheduled to run on particular time daily

I have found a workflow defined by you in one of this post as below

CruiseControl on build server is triggered at certain time in the night
Unit tests are run and a new setup is created
CruiseControl on listening VMs are triggered
Each VM gets the new setup from the build server and installs it
Ranorex test source code is compiled with newly installed setup
Ranorex tests are invoked both by command line and via NUnit, results reported to CruiseContr

This is very interesting and seems much better than my approach. Detailed explanation will be really very helpful like
Is NUnit interface between build tool(Draco.net) and testing tool(Ranorex)
How cruisecontrol or draco.net is going to trigger the NUnit (Do we need to write some code draco.net build file)
Do we need to configure our scripts in Nunit first?

I downloaded NUnit and I tried to execute our scripts from NUnit. I added exe file Nunit and clicked run button. But, I didnt found anything getting executed.what might be the problem

Thanks
Abhigna

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Ranorex integration with SVN and draco

Post by Support Team » Tue Mar 01, 2011 9:29 pm

Hello Abhigna,

NUnit needs classes and class methods with special attributes, only then the NUnit test driver will find the class and its methods. Have a look at:
http://www.ranorex.com/blog/using-nunit ... -execution

Regarding CruiseControl and NUnit you can find info in the internet, like
http://dotnet.sys-con.com/node/143301

You'll find information about how to execute an executable, like a Ranorex test executable, in the CruiseControl documentation:
http://cruisecontrol.sourceforge.net/ma ... igxml.html

Regards,
Roland
Ranorex Support Team

bheemuabhigna
Posts: 49
Joined: Thu Feb 03, 2011 3:15 pm

Re: Ranorex integration with SVN and draco

Post by bheemuabhigna » Thu Mar 03, 2011 11:46 am

Hi Ronald,

Thanks. The information was really very helpful.
We have upgraded to Ranrex3.0 and I didnt find NUnit.Framework in references here.
We have decided to use Nant instead of Nunit as it will be more comfortable to integrate with Draco.

I found some information regarding .net scripts in below URL
http://www.codeproject.com/KB/dotnet/Au ... nFile.aspx

I worked on this but found difficult to implement this process for Ranorex.
Can we save the ranorex scripts as build project so that we can call this directly from Nant. Or else if there any other method please let me know

Thanks
Abhigna

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Ranorex integration with SVN and draco

Post by Support Team » Thu Mar 03, 2011 12:16 pm

Hello Abhigna,

the Ranorex Project is a Visual Studio 2008 project. You can use MSBuild to build it.
I've found this among other
http://stackoverflow.com/questions/4261 ... and-vs2008
on how to build a VS project with Nant.

Regards,
Roland
Ranorex Support Team

bheemuabhigna
Posts: 49
Joined: Thu Feb 03, 2011 3:15 pm

Re: Ranorex integration with SVN and draco

Post by bheemuabhigna » Thu Mar 24, 2011 12:33 pm

Hi,

First I have started executing Ranorex scripts from Nant. I have installed Nant and prepared an xml file with help of examples available in installation as below


<?xml version="1.0"?>
<project name="Ezprints" default="build" basedir=".">
<description>The Hello World of build files.</description>
<property name="debug" value="true" overwrite="false" />
<target name="Ezprintsmain" description="remove all generated files">
<delete file="Ezprints.exe" failonerror="false" />
<delete file="Ezprints.pdb" failonerror="false" />
</target>
<target name="C:\EZPrints_VL_Demo\EZPrints\EZPrintsMain\bin\Debug" description="compiles the source code">
<csc target="exe" output="ezprints.exe" debug="${debug}">
<sources>
<includes name="EZPrintsMain.exe" />
</sources>
</csc>
</target>
</project>

Rnorex project is avalable in "C:\EZPrints_VL_Demo\EZPrints\EZPrintsMain\bin\Debug" folder.

when i execute this from command prompt I am getting error.
Have any worked on this please let me know.
Any info will be helpful.

Thanks,
Abhigna

bheemuabhigna
Posts: 49
Joined: Thu Feb 03, 2011 3:15 pm

Re: Ranorex integration with SVN and draco

Post by bheemuabhigna » Fri Apr 01, 2011 8:48 am

Hi,

Atlast, I was able to figure it out. Its very simple and I struggled a lot it find out this simple approch.
I am giving detailes steps below to create Nant build. Hope it will be useful to someone else.

1.Downlad Nant from the site
2.Go to my computer propertie -> Advanced -> Environment variables
3.you will be having systemvariables select path variable and click on edit. Now add ";C:\Program Files\nant-0.91-alpha2\bin" to exiting variablevalue and save the settings.
(Remember "nant-0.91-alpha2" will be based on your downloaded version)

The above scripts are for configuring nant

1. Create a build file in C:\Documents and setting\user\Ranorexscripts.build
2.Now edit Ranorexscripts.build with following data
<project name = "build">
<exec program= " This will exe file pah from bin folder to execute our scripts (c:\\....bin\...exe)">
< arg value =""> (if u ned any arguments to script else dont add this tag)
</exec>
</program>

thats it
now go to commandprompt and enter nant and press enter
you find your application running

Thanks,
Abhigna