Skip to main content

The Basic Software (BSW) layer within the AUTOSAR architecture forms the bedrock of modern car electronics. It acts as a critical intermediary, facilitating communication between the numerous Electronic Control Units (ECUs) and managing essential functions like
communication protocols, diagnostics, and operating system services. As car complexity increases, with a growing network of interconnected systems and sensors, the BSW layer becomes ever more crucial.
Unit testing plays a vital role in ensuring the functionality and behavior of individual BSW modules, functions, and services. However, BSW component testing presents unique challenges due to their tight integration with sensor and actuator hardware. Isolating these components for testing necessitates emulating or simulating the hardware environment, which can be a complex endeavor to achieve with complete accuracy.

Problem Statement

To ensure compliance, dependability, and critical functionality in vehicles, the automotive industry requires effective testing of Basic Software (BSW) components within the AUTOSAR (Automotive Open System Architecture) framework. A recent customer inquiry highlighted the need for an automated, cross-platform and cost-effective testing solution to efficiently validate the BSW layer. Additionally, the client sought an independent testing team with expertise in conducting unit tests on BSW modules specific to AUTOSAR
version 4.4.0


A comprehensive solution was implemented to address the client s request for an automated, cross-platform and cost effective BSW layer unit testing solution within AUTOSAR. The development cycle followed the Agile Scrum methodology, which fostered iterative development and continuous improvement of both test suites and testing processes. Regular requirement review meetings ensured complete understanding and eliminated ambiguities through techniques like completeness and consistency checks.

Google Test (GTest) was chosen as the testing framework due to its open-source nature, cross-platform support, mocking capabilities, and seamless integration with Continuous Integration (CI) systems. GTest s utilization of C++ empowered the creation of robust and comprehensive test suites for precise code validation. Additionally, Python Jinja 3 templates were leveraged to dynamically generate configuration files, enhancing flexibility and streamlining the testing process.

Visual Studio Code, an open-source tool with debugging support for various programming languages, was selected as the development environment. GitLab, chosen for its CI capabilities, issue tracking integration and centralized storage of code, documentation, and test artifacts, served as the version control system.

The testing team employed established techniques like Equivalence Class Partitioning, Boundary Value Analysis, State transition testing and Decision table testing alongside advanced methods like vectors, assertions, and mock testing to ensure thorough validation. Furthermore, the solution was equipped to handle complex scenarios involving time-related requirements and infinite loop conditions. Finally, regular regression testing was conducted to safeguard against regressions or defects introduced by new code changes.


The BSW layer underwent rigorous testing, culminating in the delivery of a comprehensive set of artifacts. This included detailed coverage reports, traceability matrices, test results, test cases, defect reports, and summary reports. Additionally, a thorough overview of the entire unit testing process was provided. These deliverables demonstrate a firm commitment to quality assurance throughout the software development lifecycle, guaranteeing the robustness and reliability of the tested BSW components.

The project successfully executed unit tests for over 32 AUTOSAR BSW modules. This encompassed a wide range of components, including the Communication Stack (Com Stack), safety-critical components, the Memory Stack, and the Diagnostic Stack. This extensive testing effort involved meticulous analyses and validation procedures, ensuring the robustness, safety, and reliability of the BSW modules under test.

Leave a Reply