XCOPY deployment | Ranorex
Help CenterUser GuideXCOPY deployment

XCOPY deployment

The deployment of test cases and test projects without a Ranorex installation is possible, but not recommended. But in some cases, this method is necessary to overcome internal policies and restrictions inhibiting installations on runtime environments. This chapter describes how to deploy everything required for test execution in this way.

In this chapter


    The machine you want to deploy to must fulfill the ⇢ system requirements of the respective Ranorex version you’re using.

    However, in terms of software requirements, you only need to make sure your target system has the required .NET Framework installed.

    Note icon


    If you’re deploying a data-driven test with an Excel data connector and don’t have or want to use an Excel license on the target machine, refer to ⇢ Executing data-driven tests.

    Deploy Ranorex License Information

    In the runtime environment a valid license information needs to be available. Most likely the runtime machine will use a floating license, so the only information necessary can be provided by the license file (Ranorex3_Server.lic). This file can be copied easily from any machine having a floating license installed to the target machine and is located in the path of the environment variable %ALLUSERSPROFILE%. For more information please refer to chapter ⇢ Install Ranorex License in the section Silent Installation of Ranorex.


    Deploy Your Ranorex Test

    Ranorex generates the files needed to run automated tests in the “Output Folder” (by default binDebug) of a test suite project. To access this folder quickly, right-click your current project in Ranorex Studio and select Open output folder.
    Next to files needed for test execution, additional files are created in the output folder during test execution (e.g. Reports, Screenshots etc.). Those files do not have to be copied. It’s recommended to clear your output folder before and then trigger a new build (Build -> “Build Solution” or hot key F8).

    Required files for executing Ranorex test automation:

    • Executable file (*.exe)
    • Test Suite File (*.rxtst)

    Additionally required on the base of your project needs:

    • Ranorex Module Group (*.rxtmg), only necessary if modules groups are in use
    • Test Data (*.xlsx, *.xlsb, *.xls, *.csv, *), only necessary for data driven tests and if data source files were added to project
    • Module Libraries (*.dll), only necessary if module libraries are linked and embedded functionality is referenced in the Test Suite
    • Sub folder “RepositoryImages” including all files, if exists

    Finally copy the files needed to the target machine and place them in the folder where all Ranorex Libraries and Assemblies are already located (). Of course, by copying the whole output folder (“bindebug” by default), you will ensure you have everything possibly required for running your test.

    xcopy "bindebug*.*" 
    Note icon


    For executables being explicitly compiled against 64bit CPUs, place these files in the sub folder “x64” of the target folder.

    Deploy your test

    On your design-time machine, open the solution containing your test in Ranorex Studio.

    Go to Settings > General. There, check Copy runtime to output and click Include license information.

    Note icon


    Including the license information like this only works for floating licenses. If you’re using a node-locked license, refer to the instructions for installing licenses in ⇢ Silent installation.

    Close the Settings window and press F8 to build your solution.

    In the projects view, right-click the project containing your test and click Open output folder…

    Copy this entire folder to your target machine using the following commands:
    xcopy "bin\debug*.*"
    xcopy /a

    Note icon


    It’s easier to copy everything in the output folder, but some items are optional depending on your test:

    • Ranorex module group files (*.rxtmg), only necessary if modules groups are in use.
    • Test data (*.xlsx, *.xlsb, *.xls, *.csv, etc.), only necessary for data driven tests and if data source files were added to project.
    • Module libraries (*.dll), only necessary if module libraries are linked and embedded functionality is referenced in the test suite.