Using RawText on different execution pcs

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
anja
Posts: 67
Joined: Fri Nov 26, 2010 3:39 pm

Using RawText on different execution pcs

Post by anja » Wed Dec 07, 2011 11:13 am

Hi,

I've got a little Question about how to execute a solution on different pcs. We are using the testuite and the repository from Ranorex 3.1.2. One element could only be recognized via Raw Text Plugin. Now we've got the problem, that on an other PC the test fails because there the plugin is not correctly configured.

I found following code within this forum:

Code: Select all

using Ranorex.Plugin;
//To add the process name to the config
RawTextFlavor.Instance.ProcessNames.Add(new Regex("processname pattern"));
//To add the class name to the config 
RawTextFlavor.Instance.ClassNames.Add(new Regex("classname pattern"));
But it was not described, where this code should be added. Is there a possibility to make an own codemodule for this, which will be executed every time a test of the testsuite is executed?

Thank you

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

Re: Using RawText on different execution pcs

Post by Support Team » Wed Dec 07, 2011 3:13 pm

Hi,

as the Raw Text Plug-In configuration is part of the general Ranorex configuration you can simply copy the file Ranorex3.config from one machine to the other to ensure that you have the same configuration on both machines.

The file Ranorex3.config can be found in your AppData folder: "%appdata%\RanorexConfig3.xml"

Regards,
Tobias
Ranorex Support Team
.
Image

anja
Posts: 67
Joined: Fri Nov 26, 2010 3:39 pm

Re: Using RawText on different execution pcs

Post by anja » Wed Dec 07, 2011 4:12 pm

Hi,

this is exactly what we do not want to do... if someone changes something in the config file (add new element to GDI Capture List) the file has to be updated on every other machine.
Our tests should be executed in multiple Virtual Machines sot this would be a very great effort....

I hope that there is another possibility...

Thank you in advance

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

Re: Using RawText on different execution pcs

Post by Support Team » Thu Dec 08, 2011 12:54 pm

Hi,

To easy copy the files to all machines you could use the XCOPY deployment.
http://en.wikipedia.org/wiki/XCOPY_deployment

Regards,
Peter
Ranorex Team
.
Image

anja
Posts: 67
Joined: Fri Nov 26, 2010 3:39 pm

Re: Using RawText on different execution pcs

Post by anja » Wed Dec 14, 2011 11:11 am

Hi,

is no other possibility than using XCopy?

On the execution PCs (VmWare) we want execute the tests without installing Ranorex first, like it is described in following Forum-Post
http://www.ranorex.com/forum/feature-re ... t1969.html

Within this approach we do not have the Ranorex-Folders...

I really need a simple solution, based on C#Code how to set this property. I think the code snipped I posted within my fist post would do this... but I do not know where I have to put it exactly...

Thank you very much....
Anja

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

Re: Using RawText on different execution pcs

Post by Support Team » Wed Dec 14, 2011 2:04 pm

Hi

If you have the dll files on your target machine, write the lines of code into the Program.cs main method (in a line before the TestSuiteRunner.Run(....)).

Hope this will solve your problem

Regards,
Martin
Ranorex Support Team
.
Image

anja
Posts: 67
Joined: Fri Nov 26, 2010 3:39 pm

Re: Using RawText on different execution pcs

Post by anja » Fri Dec 16, 2011 1:22 pm

Hi,

thank you... I solved this problem with your help.... It works writing these lines of code within the program.cs....

I retried it to write these lines of code directly in the code-module where I access the rawtext element and this works now, too. I think within my previous try, there was an error in the regular expression...

Thanks....

Anja

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

Re: Using RawText on different execution pcs

Post by Support Team » Fri Dec 16, 2011 2:08 pm

Hi,

You're welcome!

Regards
Martin
Ranorex Support Team
.
Image