1.5.2.5 Step 5. Add MPLAB ICE 4 in CI/CD Pipeline

From the CI/CD Wizard you should now be ready to enable the MPLAB ICE 4 hardware testing as part of the Jenkins build pipeline generation.

Select the build configuration you want to test.

Fill in the IP address that you noted when configuring the MPLAB ICE 4 on Ethernet.

Enable MPLAB Code Coverage if you want coverage data. But note that this requires that your project is set up to instrument your build with code coverage. To do this you need to open project properties and configure the Code Coverage instrumentation in the Analysis section (see figure below).

Enable Scan Output for Unity Test Results which will parse the output from your serial port and generate a test report in the Jenkins build job.

Figure 1-9. Enable Code Coverage

When everything is configured, the generated Jenkins build job will do the following when run:

  • Build your project using the selected build configuration
  • Communicate with the MPLAB ICE 4 and capture serial output
  • Run your test application using a generated MDB script
  • When done, parse the serial output and display test results
  • Publish coverage data