Tool Server on Linux Tutorial¶
This tutorial demonstrates how to use Tool Server to connect to and control a tool on a (remote) Linux system.
Starting ecu.test¶
This tutorial uses the “RemoteCommandLinux” tool, which for security reasons can only be used with secure communication with Tool Server (see Secure connection to Tool Server).
Therefore a certificate (*.crt) with a corresponding private key (*.key) must be
created for authentication. The creation can be perfomed in the ecu.test settings dialog at
Local settings > Signing >
Secure communication with Tool Server.
Starting Tool Server¶
First, Tool Server must be started on the Linux system. This tutorial assumes that the Tool Server has already been installed and set up. Further details can be found in the Usage on Linux systems section.
In order to activate the secured communication the following Tool Server settings need to be configured (see General settings of Tool Server):
Set the option
SSL_ENABLEDto the value1Set the option
CertificateDirto the directory in which Tool Server searches for client certificates in order to verify them when establishing connectionsCopy the certificate file (
*.crt) previously created in ecu.test to this directory
Tool Server does not have a GUI on Linux systems, so it can only be started via console.
To do this, the command tool_server must be run in a console running on the Linux
system.
Tool Server has successfully started when the message “Listening on port 5017” appears in the console output.
The Tool Server port can be changed by adding an additional parameter at startup:
tool_server -p 5020
Not all tools supported by ecu.test can be used on a Linux system. A list of supported tools can be found in section Tools.
Creating a test bench configuration¶
In this step, a test bench configuration is created that connects to Tool Server. For a detailed guide on creating test bench configurations and connection to tools, see the How to access tools? section.
For this tutorial, a new test bench configuration is created and the Linux system is added as a new tool-host.
To do this, Remote (Tool Server) is selected and the host name of the Linux system is entered.
From the supported tools listed, the tool tracetronic: RemoteCommandLinux is used as an example. After adding the tool, no further settings are needed and the testbench configuration can be saved.
Creating a test case¶
In order to use the connection to the tool, a simple test case should be created that contains a file that is transferred to the Linux system and then checked whether the file exists on the target system.
In the ecu.test workspace in the packages folder, a new text file is created named “abc.txt”. This file is to be transferred to the Linux system.
A new package is created for this and the tooljob UploadFile is added to the test case from the Jobs tab. The localpath parameter is used with the relative path to the text file, i.e. “Packages/abc.txt”. The remotepath parameter needs to be filled with the absolute destination path on the Linux system, i.e. “/tmp/abc.txt”.
Afterwards the tooljob ListDir is added to the test case.
The directory parameter is filled with the absolute directory path on the Linux system,
e.g. “/tmp”. In addition the checkbox Evaluation is activated. In the now displayed
evaluation section, the mode Unspecific is selected and the expected value is filled
with the following expression: ('abc.txt', '.', False) in value. This setting checks
whether the return value of the ListDir tool job contains a file with the name abc.txt
and therefore the file exists.
The last step is to save the package.
The created package looks like this:
Executing the test case¶
The following steps are necessary to run the created test case:
Select and load the created test bench configuration (See How to access tools?)
Connect the tool “RemoteCommandLinux”
Run the created package.
The test case should run successfully and the tooljob ListDir should have a SUCCESS rating.
More Information¶
If you encounter connection or communication problems between ecu.test and
Tool Server, there may be helpful messages in the log files of Tool Server. The
log files tool_server_out.log and tool_server_err.log are in the following folder:
<home directory>/.cache/ecu.test 2026.3/