# Introduction

Reactis provides testing and validation of discrete-time
embedded-controller models in the Simulink / Stateflow notation developed
by MathWorks.[^footnote1] Reactis for C (a separate product) provides
similar testing and validation abilities for C code.

Jenkins is an automation server which is used to build and test software
systems. These systems may contain both models (e.g., as part of a
model-based development process) and code. A common task performed by
Jenkins is testing, which is where Reactis comes into play. During a
Jenkins test activity, a specified program which performs the tests is
executed and the test results are collected by Jenkins. The test results
typically include the pass/fail status of each test that was executed, and
coverage data which identifies the parts of the model/code that were
covered during testing.

Interactions between Jenkins and an external tool are typically controlled
by a *plugin*. There are hundreds of Jenkins plugins available. In this
paper, we will show how two plugins can be used to test a software system
with Reactis. These plugins are:

* *MATLAB*.[^footnote2] The MATLAB plugin is used to execute scripts written
  in the MATLAB `.m` language.

* *HTML Publisher*. The HTML Publisher plugin reads HTML files and imports
 them into Jenkins.

The approach presented in this paper uses a MATLAB script, which calls the
Reactis API to perform testing activities and generate an HTML test
execution report. The test execution report is then imported into Jenkins
and saved. While Jenkins does include a number of existing plugins which
handle test pass/fail statistics and coverage, the use of Reactis' native
test execution reports is preferred over existing Jenkins plugins because
Reactis provides more advanced coverage metrics (e.g., MC/DC) and superior
highlighting of target coverage. Hence the primary testing artifact will be
a Reactis test execution report in the form of an HTML file.

[^footnote1]: Stateflow and MathWorks are registered trademarks of The
MathWorks, Inc.

[^footnote2]: MATLAB is a registered trademark of The MathWorks, Inc.