miniHIL command line interface for test automation
Interface: Command Line
The miniHIL is uncompromisingly designed for end-to-end automation of hardware in the loop tests. All functions required for this can be executed via the command line interface. This allows easy integration into Continuous Integration, test management tools and scripts to automate the test processes.
Use cases for the command line
The miniHIL Tool Chain functions can be executed not only through the Eclipse IDE and graphical user interface, but also through the command line.
Typical use cases for the command line:
- Integration in Continuous Integration and Continuous Delivery systems (e.g. Jenkins).
- Integration in Test Management Systems
- Integration in test scripts (e.g. Python)
- The following functions can be executed for this purpose: Test Execution
- Building the test and simulation project from the models (generate, compile, link)
- Update of the simulation processor (flashing)
- Start of the tests on the miniHIL
- Reporting and test documentation
- Logging of test execution and results via standard output (stdout)
- Logging of XUnit (XML) standard test reports for easy integration into test reports of other tools and methods like Continuous Integration
- Logging of sequence diagrams for detailed analysis of test sequences and as documentation of test execution
- Generation of feature and requirement traceability reports
- Building of textual and graphical project documentation
Gradle as automation tool
- The Gradle tool is used for build and test automation. The individual command line tasks are implemented as Gradle tasks (e.g. generate, compile, link, test execution, …).
- The Gradle calls can be easily integrated and extended into other tools and languages via command line.
Example of execution of tests via the command line
Building, launching and logging tests.
In the following example, the following steps are performed via a Gradle call:
- Generate the test models as C code.
- Compile, link, flash the project on the miniHIL
- Start the tests
- Logging of the execution and the results
- Generating the feature report and the sequence diagrams
Command line call
Using the return values of the Gradle call, scripts or Continuous Integration servers (e.g. Jenkins) can evaluate the success of the miniHIL test run:
In case of success, the value 0 is returned.
In case of failure, the value 1 is returned.
Standard output with simple messages in plain text (standard IO).
Simple logging in plain text in the console allows observation of the running test, quick initial analysis by humans. In addition, the logging information can be easily logged by the caller (e.g. Continuous Integration).
XUnit Logging for easy integration of reports in Test Management and Continuous Integration.
Many test tools generate or process test logs in XUnit (XML) format. For example, XUnit test reports can be integrated directly from the Continuous Integration servers Jenkins or Bamboo into the test reports.
Generated sequence diagrams for detailed analysis and report.
During test execution, detailed traces are logged, stored in files and transformed into sequence diagrams. This enables very detailed, retrospective analysis of the test runs (e.g. in case of errors). In addition, the sequence diagrams are an easily understandable form of documentation of the test execution.
Generated Feature and Requirement Traceability Report
A feature or requirement coverage report is generated from the XUnit test reports and the traceability information. This brings the requirements or features in connection with the required or executed test cases and thus creates an overview of the current status of the implementation or quality of the project.
Integration with Yakindu Traceability
Integration with Yakindu Traceability can also be done on the command line. This allows e.g. in case of failed tests the automatic execution of impact analyses, generation of traceability reports and afterwards the navigation to the affected requirements, architecture diagrams or the test cases and test reports of the miniHIL test run.
End-to-end test automation for hardware in the loop tests with the miniHIL.
The command line interface allows you to easily connect the miniHIL tests to Continuous Integration, test management systems and scripts. The various standardized or specialized reports and logs allow integrated, automatic evaluation of the test results or enable detailed analysis and documentation of the test execution.
What are your requirements for HIL test automation?