What is Embedded Testing in Software Testing?
โก Smart Summary
Embedded testing checks the functional and non-functional behaviour of software and hardware together, because in an embedded system the two are tightly coupled and neither can be validated properly on its own.
What are Embedded systems?
Embedded systems are electronically controlled devices where software and hardware are tightly coupled. Embedded systems may contain a variety of computing devices. These are PCs incorporated in other devices to operate application-specific functions. The end user usually is not even aware of their existence.
Embedded Testing
Embedded testing is a testing process for checking functional and non-functional attributes of both software and hardware in an embedded system, and ensuring that the final product is defect free. The main purpose of embedded testing is to verify and validate whether the final product of embedded hardware and software fulfills the requirements of the client or not.
Embedded software testing checks and ensures the concerned software is of good quality and complies with all the requirements it should meet. Embedded software testing is an excellent approach to guarantee security in critical applications like medical equipment, railways, aviation, vehicle industry, etc. Strict and careful testing is crucial to grant software certification.
How to perform Embedded Software Testing
In general, you test for four reasons:
- To find bugs in software
- Helps to reduce risk to both users and the company
- Cut down development and maintenance costs
- To improve performance
In embedded testing, the following activities are performed:
- The software is provided with some inputs.
- A piece of the software is executed.
- The software state is observed, and the outputs are checked for expected properties like whether the output matches the expected outcome, conformance to the requirements and absence of system crashes.
Embedded Software Testing Types
Fundamentally, there are five levels of testing that can be applied to embedded software.
Software Unit Testing
The unit module is either a function or a class. Unit testing is performed by the development team, primarily the developer, and is usually carried out in a peer-review model. Test cases are developed based on the specification of the module.
Integration Testing
Integration testing can be classified into two segments:
- Software integration testing
- Software/hardware integration testing
In the end, the interaction of the hardware domain and software components is tested. This can incorporate examining the interaction between built-in peripheral devices and software.
Embedded software development has a unique characteristic: the actual environment in which the software runs is generally created in parallel with the software. This causes inconvenience for testing, since comprehensive testing cannot be performed in a simulated condition.
System Unit Testing
Now the module to be tested is a full framework that consists of the complete software code plus all real-time operating system (RTOS) and platform-related pieces such as interrupts, tasking mechanisms, communications and so on. The Point of Control protocol is no longer a call to a function or a method invocation, but rather a message sent or received using the RTOS message queues.
System resources are observed to evaluate the system’s ability to support embedded system execution. For this aspect, grey box testing is the favored testing method. Depending on the organization, system unit testing is either the duty of the developer or of a dedicated system integration team.
System Integration Testing
The module to be tested begins from a set of components within a single node. The Points of Control and Observations (PCOs) are a mix of network related communication protocols and RTOS events, such as network messages. In addition to a component, a Virtual Tester can also play the role of a node.
System Validation Testing
The module to be tested is a subsystem with a complete implementation, or the complete embedded system. The objective of this final test is to meet external entity functional requirements. Note that an external entity can be a person, or a device in a telecom network, or both.
Difference: Embedded testing and Software Testing
The table below contrasts embedded testing with conventional software testing.
| Software Testing | Embedded Testing |
|---|---|
| Software testing is related to software only. | Embedded testing is related to both software as well as hardware. |
| On average 90% testing done in the world is purely manual black box testing. | Embedded testing is done on embedded systems or chips, and it can be black box or white box testing. |
| Primary areas of testing are GUI checks, functionality, validation and some level of database testing. | Primary areas of testing are the behavior of the hardware for the number of inputs given to it. |
| Software testing is majorly performed on client-server, web and mobile based applications. | Embedded testing is generally performed on the hardware. |
| e.g., Google Mail, Yahoo Mail, Android applications. | e.g., machines of the healthcare domain, microcontrollers used in computers. |
Challenges: Embedded Software Testing
Some of the challenges that one can face during embedded software testing:
Hardware Dependency
Hardware dependency is among the main difficulties faced during embedded software testing, because of limited access to hardware. However, emulators and simulators may not precisely represent the behavior of the actual device, and could give a wrong sense of system performance and application usability.
Open Source Software
The majority of the embedded software components are open source in nature, are not created in-house, and have no complete test suite available for them. There is a wide range of test combinations and resulting scenarios.
Software vs. Hardware Defects
Another aspect is when software is being developed for freshly created hardware. During this process a high ratio of hardware defects can be identified. The defect found is just not limited to software. It may be related to hardware also.
Reproducible Defects
Defects are harder to reproduce or recreate in the case of an embedded system. That forces the embedded testing procedure to value every defect occurrence substantially higher than in a standard case, and to gather as much data as could reasonably be required to find the root cause of the defect.
Continuous Software Updates
Embedded systems require regular software updates like kernel upgrades, security fixes, different device drivers, etc. Constraints associated with software updates make bug identification difficult. Additionally, it increases the significance of the build and deployment procedure.
