Unit Testing of Azure Sphere Applications
Published Dec 14 2023 11:54 AM 2,577 Views
Steel Contributor

We are excited to provide an initial preview of unit testing workflow of Azure Sphere applications using Visual Studio and VS Code.  Running unit tests before the applications are deployed allows developers to discover and fix bugs sooner, and it is a part of most teams’ daily workflows. Azure Sphere applications can be challenging to unit test. The limited amount of RAM on the MT3620 boards makes it difficult to include unit test libraries and run them on the device. Customers had to split their applications into two parts and test them separately to avoid exceeding the memory limits. 

 

CLO24-Azure-Retail-023.jpg

 

The new Azure Sphere Unit Test experience is possible thanks to the confluence of a few technologies: a native Linux Azure Sphere SDK designed specifically for testing, Docker, and Visual Studio and VS Code Unit Test improvements. The new workflow will build and run Azure Sphere applications inside a Docker container, opening the possibility to run a whole suite of tests. 

 

README instructions are available in the Azure Sphere - Native Blink gallery project. Clone the repository and install the necessary prerequisites listed in the README. After you install the prerequisites and open the gallery project, the IDE will use the `.devcontainer` directory to create a new container with the source code, SDK, and libraries needed to run and test the Azure Sphere application. 

 

Note that we’re still improving this experience and we want to hear from you! Share your feedback with us via email at azsppgsup@microsoft.com. 

Co-Authors
Version history
Last update:
‎Dec 14 2023 12:10 PM
Updated by: