How To make use of Ranorex 3 features in a 2.3.9 Solution

Best practices, code snippets for common functionality, examples, and guidelines.
bkruse
Posts: 38
Joined: Tue Jul 20, 2010 12:19 pm

How To make use of Ranorex 3 features in a 2.3.9 Solution

Post by bkruse » Thu Jul 19, 2012 1:15 pm

Hi all,

I recently upgraded from 2.3.9 to 3.3.1.
Opening the (old) Solution succeeded and with just a very few minor corrections it worked out of the box.
It mostly consists of self-coded classes, rather than recordings.
There are some handful of projects in my solution, which

The new (3.x) features - variables in RxPaths, DataBinding, Global Variables, etc. - look very promising.
I also read through the new User Guide and through Working with 2.X Projects in 3.X Test Suites, but that doesn't answer my below questions.

I didn't get a feeling for what to do to make TestSuites working in my imported Solution.
Because I cannot create TestSuite files (rxtst), just ModuleGroups (rxtmg) can be created.
I already tried with a new Solution (then there's one TestSuite in the default project), but further importing my old Projects doesn't make a difference to the "import Solution" case.

So I digged in a bit and it seems that my old classes need to extend ITestModule. Basically I use
void ITestModule.Run() {
	Start();
}
which just calls the old Start(); method.
That way I can add my old classes to Module Groups, ok so far.

My questions:
  • is that way (create rxtmg files manually, let my old classes extend ITestModule, add them to ModuleGroups) the correct way?
  • how to create TestSuites (rxtmg) for my old projects properly?
  • do variables in RxPath and DataBindings work in "from Ranorex 2.3.x imported" repos/files (I suppose yes, if I manage to get ModuleGroups and TestSuites working)?
  • any caveats in the above approach?
Any guidance is appreciated!

thanks and best,
Björn

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How To make use of Ranorex 3 features in a 2.3.9 Solution

Post by Support Team » Fri Jul 20, 2012 1:12 pm

Hi,
is that way (create rxtmg files manually, let my old classes extend ITestModule, add them to ModuleGroups) the correct way?
Yes, this is the right way to do.
how to create TestSuites (rxtmg) for my old projects properly?
You can create a new dummy-testsuite (this will have a *.rxtst). Then add your project via "add existing project...". This should work.
do variables in RxPath and DataBindings work in "from Ranorex 2.3.x imported" repos/files (I suppose yes, if I manage to get ModuleGroups and TestSuites working)?
Yes, thats right.

Regards,
Larissa
Ranorex Support Team
.
Image

bkruse
Posts: 38
Joined: Tue Jul 20, 2010 12:19 pm

Re: How To make use of Ranorex 3 features in a 2.3.9 Solution

Post by bkruse » Tue Jul 24, 2012 1:21 pm

Thanks for the information.
I'll try that. If you don't here again from me here, then it works fine ; )

regards, Björn

m.schrecker
Posts: 7
Joined: Fri Oct 19, 2012 8:14 am

Re: How To make use of Ranorex 3 features in a 2.3.9 Solution

Post by m.schrecker » Mon Oct 22, 2012 3:02 pm

I have the same situation. I have created a new Solution now, imported my old projects and added the records to the rxtst file. Now I have one file in each project which previously started the the sut application via RunApplication. This is not a recorded action but coded in the cs file. I allready implemented the ITestModuke in this class and tried to add the class to the rxtst. This doesn't work. Is there a different way to start the application without a recording but out of the rxtst ?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How To make use of Ranorex 3 features in a 2.3.9 Solution

Post by Support Team » Tue Oct 23, 2012 10:53 am

Hi,

If I got you correctly you just want to start your application, if so you could add a Recording or a UserCodeModule where you can add the "Run Application" action or the code to start the application:
Host.Local.RunApplication("yourapp", "", "", false);
it is not possible to start the application "out of the rxtst" file, you always need a module.
You can for instance use the code from your class in a new UserCodeModule.
You normally should be able to add older classes to the test suite after you updated them, did you get a message or an error when you tried to add it to the test suite?

Regards,
Markus
Ranorex Support Team
.
Image