How to build Ranorex projects from the command line : How To …

How to build Ranorex projects from the command line

Best practices, code snippets for common functionality, examples, and guidelines.

How to build Ranorex projects from the command line

Postby Support Team » Fri Jan 07, 2011 11:26 am

A common task, e.g. when Ranorex is used with a Continuous Integration system, is that you need to compile your Ranorex tests from the test sources, i.e. the Ranorex projects. For example, when you have your Ranorex test sources checked into a source control system, you first update your test sources, compile the test projects to executables, and then run these test executables.

Ranorex Studio itself does not provide a command line interface, simply because the Ranorex project files are compatible with Visual Studio and MSBuild, which is installed as part of the .NET Framework. So you just have to use MSBuild and tell it to compile the Ranorex solution/project files:
Code: Select all
// solution
%WINDIR%\Microsoft.NET\Framework\v3.5\MSBuild.exe solution.sln
// C# project
%WINDIR%\Microsoft.NET\Framework\v3.5\MSBuild.exe project.csproj
// VBNet project
%WINDIR%\Microsoft.NET\Framework\v3.5\MSBuild.exe project.vbproj

You can also specify the configuration and platform to use by providing additional command line parameters. Please, see following page on MSDN for available command line parameters for MSBuild:
http://msdn.microsoft.com/library/ms164311.aspx

Just let me bring two facts to your attention that could cause problems:
  • All test source files need to be up-to-date when compiling test solutions/projects from the command line. For example, the source code for Ranorex recordings/repositories will not be updated!
  • MSBuild is confused by the "rxsln" ending of the solution file, that's why Ranorex Studio automatically saves the same file with a "sln" file ending as well. Please, always use the "sln" file or the individual project files when using MSBuild.
Regards,
Alex
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Return to How To …

Who is online

Users browsing this forum: No registered users and 0 guests