Hardware-in-the-Loop and Ongoing Integration – how do they match jointly?

[Partner Content] By reducing the components-in-the-loop take a look at to the microcontroller with the complete computer software, a total automation of the take a look at set up can be reached. Thanks to the use of Constant Integration, the reaction periods for examination execution are in the vary of minutes alternatively of days, months or even months.

Any small change to an embedded system can have the most destructive outcomes. What’s more, if you discover and correct the difficulties way too late, the fix is extremely high-priced. As a result, it need to be attainable to check just about every modify to an embedded system within just minutes. This is the only way to make sure that you can detect and take care of the issues quickly.

For pure software package projects, entire automation of the assessments through Continual Integration (CI) helps. Listed here, each code adjust routinely triggers the make and check of the finish software package. This will allow a entire regression check to detect bugs in current and new code within just minutes. Can this also get the job done for embedded devices?&#13

Continual-Integration for examination automation

First, let’s appear at how Ongoing Integration is effective.
1. Each individual developer updates his software program changes by committing to a central resource code management procedure, e.g., GIT.
2. Each dedicate notifies the Continual Integration Server software (CI server).
3. The CI server checks out the adjust just manufactured and absolutely rebuilds the software undertaking, such as the assessments.
4. Now all tests are immediately executed for the new computer software version.
a. If a examination fails, only the developer who made the previous change is notified – e.g., by e mail.
b. If all exams run without difficulties, no one is notified. But the examination effects will be logged.
5. In many cases a complete release with documentation and release notes is constructed. This often makes certain that the venture is ready for automated supply at any time.
 

&#13
&#13

What is unique about embedded methods?

The purpose really should be to operate the checks as soon as attainable immediately after each and every software program adjust. For device assessments, which are generally pure application tests, this is uncomplicated. But how can this be attained for process or integration tests for embedded techniques?
 

Hardware-in-the-loop tests&#13
&#13

Hardware-in-the-loop tests (HIL checks) or manual method checks essential for this are often challenging to automate.

    &#13

  • Genuine hardware components in the examination setup stop automation and repeatability.
  • &#13

  • Usually only the “satisfied path” can be examined, but not failure conduct.
  • &#13

  • The take a look at bench is normally also highly-priced to be accessible for automation for every project at every single time.
  • &#13

The difficulty applying the illustration of an oil pump?

Let us seem at an case in point from a genuine task. It is a program examination for a security-suitable oil pump. The target of the examination set up: test the temperature shutdown for all applicable process states.
The former setup: The entire process runs in a big climate chamber. 

&#13
The down sides:

    &#13

  • Owing to the inertia of the climatic chamber, a complete test sequence would take about 30 days. This would make the check pretty much worthless for software program tests in early venture phases.
  • &#13

  • Owing to the sophisticated technique style and design, the checks can only be partially automatic.
  • &#13

  • Only the temperature error can be analyzed. For other fault predicaments, the motor, the pump or the hydraulic process ought to be manipulated manually.
  • &#13

  • The expensive useful resource climatic chamber is typically not out there for other vital and recurrent procedure assessments.
  • &#13

 

Hardware-in-the-loop tests&#13
&#13

The new setup: We test only the microcontroller, the drivers and the software software program and simulate the finish atmosphere. The check is finished as a black-box take a look at by using the signals on the pins of the microcontroller.

&#13
The rewards:

    &#13

  • You examination what improvements most generally: the software
  • &#13

  • A person can test not only the temperature shutdown, but also all other opportunity error circumstances.
  • &#13

  • Beside the excellent circumstance (Content Path) also all poor situations (Unsatisfied Route) can be examined by simulation and error injection.
  • &#13

  • The check execution can be fully automatic.
  • &#13

  • Entire regression tests are performed for each individual code adjust.
  • &#13

  • Execution takes only 50 minutes as a substitute of 30 times.
  • &#13

  • The components setup is substantially more cost-effective and scaled-down.
  • &#13

The components test setup

In its place of the total procedure, only the microcontroller with the entire unchanged application is analyzed. 
The pins and hence the essential signals of the system underneath examination (SUT, correct side) are related to the test program (remaining facet). On the test procedure runs the environment simulation (motor simulation, hydraulic simulation, temperature simulation, …) and the automated take a look at conditions.
 

hardware test setup&#13
&#13

Thanks to the full surroundings simulation, the SUT can be set to any required point out and so the assessments can be wholly automated. If you have a lot more than one particular venture, or if several developers are functioning on one job, it is proposed to set up the SUT in a 19 inch cupboard. The illustration exhibits 8 distinct jobs in a midsection-significant cabinet. These are linked to the CI server by using USB hub.
 

environment simulation&#13
&#13

The software package advancement ecosystem

To be capable to generate surroundings simulations and take a look at circumstances as successfully as feasible, we use a product-driven technique. The program composition of the check procedure and the setting simulations are designed making use of the Home language and the open up supply tool eTrice. The take a look at conditions are also designed model-pushed with the language CeGe (Situation Generator). C-code is produced from the designs, compiled, and transferred to the test system. The results logged throughout examination execution are reworked into several diagrams and common formats. This can make it less difficult for builders, task professionals and reviewers to interpret the final results, find out and start out the future iteration in the enhancement process.
 

software development environment&#13
&#13

Summary

By lowering the hardware-in-the-loop check to the microcontroller with the complete program, a complete automation of the exam set up can be accomplished. Thanks to the use of Constant Integration, the reaction times for check execution are in the vary of minutes in its place of times, months or even months. Developers can thus get rid of mistakes that arise very speedily and without having dependencies on other modifications. This is an significant prerequisite for rapidly, iterative task enhancement.

&#13
Inbound links: