Page 2 of 2

Re: Using Ranorex With VS & TFS 2010

Posted: Thu May 05, 2011 6:53 pm
by Support Team
Hello Danie,

for the typeof() parameter you can use any type, not necessarily a repository. This type is used to identify the assembly. Then modules are searched in that assembly and in all referenced assemblies.

In your case if the EXE references all other DLLs then use a type of that EXE. You could make the Program class in Program.cs public and use that one.
int res = Ranorex.Core.Testing.TestSuiteRunner.Run(typeof(testCaseExecution.Program), "/testcase:TestCase", Resources.testSuiteResource);
Assert.AreEqual(res, 0);
When you make changes in a DLL, care must be taken that the local copies get update.
There are local copies in the output folder of the Ranorex EXE and then there are local copies in the output folder of your VS test project.

Regards,
Roland
Ranorex Support Team

Re: Using Ranorex With VS & TFS 2010

Posted: Mon May 09, 2011 1:01 pm
by DanieSpreeth
passing in typeof(exeassembly.program) also does not work!

Re: Using Ranorex With VS & TFS 2010

Posted: Mon May 09, 2011 6:22 pm
by Support Team
Hello Danie,

could you send us your Ranorex Solution and your Visual Studio test project to [email protected]?

Else we need to make a similar solution and VS test project. For that we would need a description
for the specific case that fails:
- common DLL has repository
- what other DLLs are involved
- what other Exes are there
- where is the test suite file
- where is the recordings, which links to the repository in the common DLL
- what references between the test project, the ranorex executable and the dlls are there

Regards,
Roland
Ranorex Support Team

Re: Using Ranorex With VS & TFS 2010

Posted: Tue May 10, 2011 7:28 am
by DanieSpreeth
Hi Roland,

At this stage we were able to execute the tests using the alternative method of calling them from within VS as I described in an earlier post (and as shown below).

Code: Select all


[TestMethod] // For Test Case ID 1878   
public void Test_SlideTransitions_1878()   
{   
    try
    {
	    AL3RuntimeEngineTestSuite.Common.StartUp.Launch.Start();
	    SlideTransitions_1878.Slide_Transitions_1664._Slide_Transitions.Start();
	    SlideTransitions_1878.Slide_Transitions_1664.Editing_XML_Slide_Transitions.Start();
	    SlideTransitions_1878.Slide_Transitions_1664.Slide_Transitions_Validating.Start();
	    AL3RuntimeEngineTestSuite.Common.Quit.Quit_Browser.Start();
	    AL3RuntimeEngineTestSuite.Common.Restore_Default_Settings.Restoring_Default_Settings.Start();
    }
    catch (Ranorex.ValidationException)
    {
            Assert.Fail();
    }
} 

The code above is automatically generated by a "converter" tool I wrote. It takes the rxtst file and gets the method and namespaces from that (as well as the order of execution), and by using reflection I build the code above.

Unless there is something seriously wrong with the way I am doing it now, I think we should keep it like this while its working. I will have to find out anyway and get permission before sending through any source code.

Thanks
Danie.