Create an executable build

On this page, you’ll find out how to create an executable build, and how to include the Ranorex Studio runtime library, license information, and external files in the build.

An executable build is simply a build of your test that you can execute like a program.

In this chapter

    Create an executable build

    Ranorex Studio automatically creates an executable build of your test whenever you do one of the following:

    Click RUN to start a test run.

    Click Build all projects in the solution.

    Click Build the current project.

    When Ranorex Studio builds a test, it automatically copies all the basic required files to the folder binDebug in the respective project’s folder, as shown below. This is called the output folder. You can change the output folder directory in the >Settings.

    Default output folder directory for the executable build of a project.

    Executable of the test, named after the project. In our case, this is Introduction.

    Configuration files.

    Module group and test suite files.

    Required libraries and the settings of the project.

    Optional external files that were manually included in the output folder.
    In this case, the Ranorex Studio Demo Application is the AUT. Without it, the test would not run correctly. It is small enough to be included with the project. Large AUTs should be preinstalled on the specific runtime environment and not included in the executable build.

    Note icon

    Note

    The executable build shown in the above image allows you to run the test on machines that have a full version of Ranorex Studio installed. However, we want to execute tests in runtime environments, i.e. machines without a Ranorex Studio installation. This is why we need to include the Ranorex Studio runtime library and licensing information.

    Include Ranorex Studio runtime library

    To execute a test in a runtime environment, you need to include the Ranorex Studio runtime library with the executable build. You do so by activating the option Copy runtime to output in the settings. By default, it is deactivated.

    In Ranorex Studio, open the settings.

    Ensure the General tab is displayed.

    Check Copy runtime to output and click OK.

    Now when you create an executable build, Ranorex Studio automatically includes the runtime library under Runtime in the output folder.

    Include license information

    To execute a test in a runtime environment, you need to include license information in the executable build. 

    Note icon

    Note

    Executing a test in a runtime environment requires at least a Ranorex Runtime Floating License. You can still execute your test if you don’t include license information, but only as part of the Ranorex Studio trial. You can’t execute a test in a runtime environment with the license information of a Node-locked License. 

    For more information about Ranorex licenses, contact our Sales Team.

    By default, license information is not included in the executable build. To include it:

    In Ranorex Studio, open the settings.
    Ensure the General tab is displayed.
    Click Include license information and click OK.

    Now when you create an executable build, Ranorex Studio automatically includes the license information file in the executable build.

    Include external files

    Sometimes you may want to include external files with your executable build. To do so, you need to first include them in your project and then configure them to be included in builds.

    Note icon

    Note

    Examples of external files you may want to include:

    • The AUT or required libraries.
    • Images or HTML/CSS/XSL files for custom reports.
    • Data sources for data-driven tests.
    For our explanation, we want to include the Ranorex Studio Demo Application in the executable build. To do so, we first include it in the project:

    Copy the file to the project folder. In our case, this is the file RxDemoApp.exe.

    In the projects view, click the Refresh and the Show all files buttons to display the added file.
    Right-click the file.

    Click Include in project.

    Note icon

    Note

    After including the file, its icon will switch from transparent to fully outlined and when right-clicking it, the option Exclude from project will be listed.

    You’ve included the file in your project. Now you need to configure it to be included in the output folder when creating an executable build.

    In the projects view, click the file and press F4 to open the file’s properties.

    Set Copy to output directory to Always or PreserveNewest.

    Never: The file won’t be included.

    Always: The file will be copied each time you create an executable build.

    PreserveNewest: The file will only be copied if it changed since the last build.