Unit Testing of Azure Sphere Applications

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.

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. 




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. 

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.