>

Blog

Automating C test cases for Embedded System

Automating C test cases for Embedded System Verification
What are Embedded Machines?

Embedded systems are electronically controlled machines that are closely integrated with software and hardware. A variety of computing devices can contain embedded systems. These are PCs for the control of application-specific functions embedded into other devices. Typically, the end user is not even aware of their presence.


No alt text provided for this image


When traditional desktop software is written for computers, embedded software is integrated into non-computer hardware to control its functions. The hardware is represented by various monitoring devices, machines, sensors, wearables and virtually every piece of modern electronics. Embedded technology, together with networks and information technologies, constitutes the Internet of Things systems and is widely used in the medical, manufacturing, appliances, automotive, transport and aviation sectors. The embedded system is a combination of a hardware module and a software module.

Components

The following basic components are needed to assemble hardware:

  • A supply of electricity
  • SoM (System-on-a-Module)/SoC (System-on-a-Chip)—a combination of microprocessors, peripherals, memory, IO on a single board.
The following basic components are needed to create software:
  • Operational systems (Windows CE, Yocto Linux, ThreadX, Nucleus RTOS)
  • Language (C, C++, Python, JavaScript, etc.)

An embedded device can be represented schematically in the figure below:

Embedded Testing

Embedded Testing is a testing process for checking the functional and non-functional attributes of both software and hardware in an embedded system, ensuring that the final product is free of defects. The main purpose of Embedded Testing is to verify and validate whether or not the final product of embedded hardware and software meets the customer's requirements.

It is used to:
  • Find bugs in software
  • Reduce the risk for both users and the company
  • Reduce development and maintenance costs
  • Improve performance
  • Improving UI (User Interface)
Automatically generating C tests

Automatically generated C tests will make the use of engineering resources more efficient. Generated C test cases can exercise more of the SoC's functionality than handwritten tests and will look for difficult-to-imagine complex corner cases. Multi-threaded, multi-processor test cases can use all parallel paths within the design to verify concurrence.

Automated Testing Process

The following steps will be followed in the Automation Process.

  1. Selection of test tools
  2. Set the scope of automation
  3. Planning, Design and Development
  4. Execution of tests
  5. Maintenance service
Automation Testing Tools

Embedded systems often have unique characteristics which should be reflected in the test plan. These differences tend to give embedded systems a distinctive taste of their own.

Below is the list of top embedded software testing tools:

Tessy

Tessy by Hitex Development Tools is a major player in the market for embedded software testing for development tools. Tessy is able to test the code written in C and C++ in the built-in environment. It is often used for multi-standard version verification. Tessy is used by test engineers to configure and run automated tests and to generate test reports easily. Tessy includes the Tree Classification Method used for the specification of the test.


No alt text provided for this image



No alt text provided for this image


TestPlant

TestPlant is designed to work with non-standard software, e.g. embedded software, that cannot be installed on the test system. TestPlant covers a wide range of tasks, including functional testing and performance testing. Test Plant tools work perfectly on the stack with other tools, which is very useful when trying to adapt it to teams that already have a set of tools. Test Plant is also useful for running tests in the system with no code being installed on the server.


No alt text provided for this image


Parasoft

Parasoft's DTP is a great automation tool for teams that use a continuous development strategy in an IDE or an integrated software test target. The tool integrates into any embedded testing environment and provides automatic reporting at the component level for statistical and historical purposes. Parasoft DTP includes tools for static analysis, code review, code coverage analysis and even traceability. The tool captures results from open-source testing frameworks – Google Test, CppUTest, etc.


No alt text provided for this image


KlocWork

KlocWork Insight offers popular static testing tools for the development of embedded software. It automatically identifies bugs in the security systems code and holes. Security issues in applications leave many holes left untouched for attacks that could lead to terrible consequences, from a minor overload of the application to a complete shutdown. This tool helps to integrate and test the application at the component level. Klocwork Insight includes integrated systems for the following standards: CFE, CFE/SANS Top 25, CERT, OWASP, DISA STIG and MISRA.


No alt text provided for this image


Vector Software

Vector Software provides built-in software test tools specifically designed for unit testing and integration testing. The "toolchain" method is used in the Vector software. It promotes a global cross-development environment that includes:

  • Cross-compiler
  • Target Board
  • Real-Time OS
  • Debug Emulator


No alt text provided for this image


Conclusion

Just as constrained-random test benches eliminated manual block verification work, synthesized test content for embedded processor-based SoCs has been shown to reduce system-level verification effort. In addition, this solution is now being used for block and post-silicon validation. In this example, the automated C test cases apply the "automatic adage whenever possible," dramatically improving coverage while shortening verification schedules. At Encoding Enhancers, the QA team utilizes the power of such a tool and performs verification and validation on embedded systems.


Ready to discuss your project? Let's Talk Contact Us