In this guide, you will learn how to increase your unit testing throughput, by running more tests in less time. This efficiency improvement comes from using virtual platforms, instead of physical hardware, as a development platform. This guide will be useful for anyone developing or running unit tests for embedded software.

Accurate and efficient tests are essential when developing software for embedded systems, particularly for continuous integration and functional safety flows. Quick pass or fail results from a comprehensive regression test suite enable teams to develop quality software without wasting engineering resources waiting for tests to finish running. Unit tests are a key component of regression test suites. This is because unit tests ensure that the small code snippets, which are the building blocks of the product, are working as expected.

Streamlining unit testing is important. This is because unit testing can become a speed bottleneck with hundreds or even thousands of individual tests running to verify that each code snippet is working as expected. If running a regression test suite is too time-consuming:

  • Engineering resources are unused while they wait for tests to finish
  • Code quality decreases because code is tested less frequently
  • Time-to-market increases

This guide describes a testing methodology that uses virtual platforms. Virtual platforms allow you to run unit tests faster and more efficiently than traditional approach. We run a suite of unit tests on virtual platforms, and then on physical hardware second. Then we will analyze the results.

Before you begin

We assume that you have a basic knowledge of embedded software development on Arm.

We also assume that you have a basic understanding of the following topics. If you are not familiar with these topics, we have provided some resources to help:

To replicate the example in the guide, you will need:

  • A Windows or Linux machine, or a Virtual Machine of Windows or Linux OS
  • The Arch Pro hardware development board, available from online retailers
  • From Arm, you will need:
    • MPS2+ Fixed Virtual Platforms (FVPs) – Arm Fast Model will give you access to the MPS2+ FVPs. For a free 30-day trial of Arm Fast Model, email license.support@arm.com and specify that you would like to trial the Cortex-M3 Fast Model.
    • Arm Compiler – Arm Development Studio will give you access to Arm Compiler. For a free 30-day trial of Arm Development Studio, you will need an Arm account access the download page.