I2C SPI USB CAN eSPI Cable Testing View All Videos Quick Start Guides Software Downloads App Notes White Papers User Manuals Knowledge Base Sales Support About Us
Products Blog Sales Support Contact Search
Benchtop Testing for Embedded Systems Guide
Staff Writer

In the world of software development, new product realization follows a fairly predictable pathway from inception to release. First, software developers collect or produce requirements for the software, determining what features should be included and how the software will benefit users. Next, a software engineer will design the software with an appropriate architecture for its intended purpose and the code for the software will be written by programmers.

Before releasing the finished code, however, the software must undergo rigorous testing to remove any bugs and ensure that the product functions effectively for the end user. When initiated towards the end of a project, debugging can consume in excess of 50% of a project's resources. To avoid this significant expense, software developers often cut corners during product testing - knowing that if the product ships with major bugs, they can fix it later by releasing a patch.

With embedded systems, however, it is frequently difficult or impossible to deploy a patch once the product has been released. Unlike a software application that runs on a home computer, embedded systems are a hardware-software solution. This means that it may be impossible to deliver patches electronically, and a product recall could be required to fix any major bug affecting device performance.

Embedded computers in vehicles, home appliances, or home security applications are expected to deliver error-free performance throughout the entire product life cycle, so it's important that engineers test them exhaustively to validate their performance under a variety of test cases and conditions. To help you get started with benchtop testing for embedded systems, we've created this guide that outlines the basics.

When Should You Start Benchtop Testing?

The process of testing your embedded system should be started as early as possible to achieve the best results from the product development process. From the time that the initial requirements are received, an engineer should begin to develop test cases and determine whether the requirements themselves are well-formed, coherent, and aligned with the business objectives for the product.

A common practice for engineers coding embedded systems is to program and test the master device and slave devices separately before integrating them into a final product. This helps to ensure that individual components are functioning correctly and predictably on their own before the engineer incorporates them into the same environment where new errors may emerge that would obfuscate existing ones.

An embedded system powers the dishwasher in this modern kitchen. Embedded systems in home appliances must be exhaustively tested, as they are expected to function error-free throughout the entire product life.

The Benefits of Benchtop Testing for Embedded Systems

Before you start testing your latest embedded systems project, it's crucial that you develop some insight into what your testing will accomplish. You may not be as excited by the debugging process as you were during the initial product design, or while programming the system, but you should recognize the absolute necessity of benchtop testing based on the following benefits:

Benchtop Testing Finds Software Bugs

Without an intentional period of benchtop testing during which you actively search for bugs in the code and try to correct them, your software is going to be full of bugs. Finding bugs in the software improves the functioning of your system for the end user and ensures that they can use the product continuously without having it repaired or reset.

Benchtop Testing Reduces Organizational Risk

If you work for a company that is building a product with embedded systems, you should view benchtop testing as a means of reducing the risk associated with releasing the product. If you release a product that is full of bugs and performs poorly, your customers will want a refund or a replacement and you could face a costly product recall. It is much less expensive to uncover a software bug during benchtop testing with a prototype product than it is to release a malfunctioning product and have customers find the bug for which you're still liable.

Benchtop Testing Improves System Performance

The best reason to conduct benchtop testing is to improve the overall performance of your embedded system. With the right test tools, you'll be able to verify that your system is wired correctly, ensure that communication on each channel follows the intended patterns and protocols, and ensure correct timing in the system along while minimizing power consumption.

Benchtop testing is more than just finding bugs - it offers developers the chance to deeply analyze their work, identify opportunities to improve performance, and implement those changes to benefit the customer by building a better product.

Types of Benchtop Testing for Embedded Systems

We've mentioned that it's better to start benchtop testing early in your development process, but what exactly should you be testing for? In fact, there are several different kinds of testing that are commonly used for embedded systems, and each serves a slightly different purpose. Effective embedded engineers will need to use several, or even all of them, on a project to ensure that the final product can be shipped bug-free.

Unit Testing

The practice of testing individual parts of a system on their own before testing the integrated system is known as Unit Testing. Unit Testing allows developers to verify that components are functioning well on their own before being integrated into the embedded system. At this stage, developers might use basic test cases to see how devices respond to inputs and validate exceptions processing.

Regression Testing

A regression test is a set of automated test cases that can be applied to the system to ensure that it is working correctly. Experienced engineers understand that the entire code should be re-tested each time there is any modification to ensure that the system still works as intended. To do this, an engineer can write a regression test script - a series of functional tests that can be run automatically to verify that no new errors are present in the code's functioning after a change.

The goal of an embedded engineer is to choose tests that have a high probability of detecting the most errors and providing enough test coverage to adequately validate the software. Engineers use a combination of black-box testing - using test cases that verify whether the product conforms to requirements - and white-box testing - selecting test cases that are meant to execute certain portions of code.

What Tools are Used for Benchtop Testing Embedded Systems?

Your choice of tools for embedded systems benchtop testing and debugging will depend on the communication protocol you have used to develop your device. Embedded engineers rely on protocol analyzers to reduce costs and save time during benchtop testing. Protocol analyzers are hardware-and-software tools that capture data from the serial bus and display it in a human-readable form where it can be validated for performance and checked for errors.

When it comes to benchtop debugging, the Total Phase Beagle I2C/SPI Protocol Analyzer is a developer's best friend. Compatible with SPI, I2C, or MDIO-based products, the Beagle I2C/SPI analyzer connects the system-under-test to your PC via USB and facilitates high-speed monitoring of traffic on the serial bus. With the Beagle I2C/SPI analyzer, developers essentially have X-ray vision into their device - they can see exactly what information is traveling on each wire in the system, making it much easier to identify bugs.

Developers working with the USB communication protocol can take advantage of the high-speed capabilities of the Beagle USB 480 Protocol Analyzer, which captures and displays high-speed USB bus states and traffic in real time.

Setting up your benchtop for debugging is easy. The Beagle analyzer ports to your embedded system and connects to your analysis PC, allowing you to monitor the serial bus in real-time when running test cases. Protocol analyzers are small, inexpensive, and help you save time during benchtop testing.

Summary

Embedded systems are expected to function perfectly without interference for decades, so it's important that engineers conduct effective benchtop testing to deliver an error-free product. Benchtop testing is the best way to identify bugs and other opportunities to improve the system while reducing the risk for your company. Testing for embedded systems depends on the right tools, especially protocol analyzers that allow engineers to monitor traffic on the bus and quickly diagnose bugs.

Best practices for benchtop testing embedded systems including unit testing individual parts before integration and establishing a regression test to validate the system after each update, no matter how minor. Black-box testing and white-box testing represent competing methods for identifying good test cases that can be used to identify bugs.

If you have any questions or want more information about using a Total Phase protocol analyzer or other tools, you can email us a message or request a demo that is specific for your application.