spot_img
HomeResearch & DevelopmentAutomating Software-Defined Vehicle Testing with Generative AI

Automating Software-Defined Vehicle Testing with Generative AI

TLDR: This paper introduces a GenAI-driven method using Large Language Models (LLMs) and Vision-Language Models (VLMs) to automate the creation and execution of test cases for software-defined vehicles (SDVs). It translates natural language requirements and system diagrams into structured Gherkin test cases and Python scripts, integrating Vehicle Signal Specification (VSS) for standardization. The approach was validated with a Child Presence Detection System (CPDS) use case, demonstrating significant reductions in manual test specification effort and rapid test execution, while also identifying areas requiring further automation and platform compatibility improvements.

The automotive industry is undergoing a significant transformation with the rise of software-defined vehicles (SDVs). This shift brings immense complexity, making systematic and consistent testing more challenging than ever. Traditional manual test planning often struggles to keep pace with evolving requirements, especially when these are expressed in natural language, leading to inconsistencies and difficulties in automation.

A recent research paper introduces a novel approach that leverages Generative AI (GenAI), specifically Large Language Models (LLMs) and Vision-Language Models (VLMs), to automate the generation and execution of test cases for SDVs. This methodology aims to bridge the gap between ambiguous natural language requirements and structured, executable test cases.

The GenAI-Driven Approach

The core of this methodology involves translating natural language requirements and system diagrams into structured Gherkin test cases. Gherkin is a business-readable, domain-specific language that allows for clear and concise test scenario descriptions. These Gherkin test cases are then further translated into Python-based test scripts, making them compatible with modern SDV testing environments.

A crucial element of this approach is the integration of the Vehicle Signal Specification (VSS). VSS is a standardized data schema widely adopted in the automotive industry, ensuring interoperability across diverse automotive subsystems and standardizing the definition of vehicle signals. This standardization is vital for improving compatibility and streamlining integration with third-party testing tools.

The entire testing pipeline is designed to integrate with the digital.auto playground, an open and vendor-neutral platform that provides digital-twin environments. This platform significantly accelerates the validation of SDV functionalities by allowing rapid execution of generated tests.

How It Works: The Methodology

The GenAI-driven test case generation follows a structured workflow:

  1. Signal Extraction: A VLM interprets system diagrams (like UML sequence and state diagrams) to identify potential vehicle signals and communication processes, guided by specific prompts.
  2. Signal Mapping: An LLM then maps these identified signals to the existing VSS format, categorizing them as branches, sensors, or actuators.
  3. Gherkin Test Case Generation: Visual inputs, such as flowcharts or state diagrams, are used by a multimodal-enabled LLM solution to generate Gherkin test cases.
  4. Python Test File Generation: Finally, using the refined VSS signals and the test logic from the Gherkin cases, the LLM generates an automated Python test file that simulates the test scenarios.

For implementation, the researchers utilized prompting strategies like Chain of Thought and Few-Shot Learning with the LLM GPT-4o for VSS signal mapping, code generation, and Gherkin test case extraction. The process involved iterative refinement and manual validation at each stage to ensure accuracy and realism.

Real-World Application: Child Presence Detection System

To evaluate their approach, the researchers applied it to a safety-critical use case: the Child Presence Detection System (CPDS). This system detects and responds to unattended children in parked vehicles, employing a complex array of direct and indirect sensors (cameras, UWB modules, microphones, seat pressure monitors) and actuators (HVAC, horns, lights, door locks). The event-driven complexity of CPDS makes it an ideal candidate for demonstrating structured, scenario-based test case generation.

The study focused on modeling and testing a specific intervention within the CPDS escalation logic: the HVAC adjustment step. Natural language requirements for this intervention were successfully translated into a Gherkin test case and subsequently into a Python test script, which was then executed within the digital.auto playground.

Also Read:

Outcomes and Future Directions

The evaluation demonstrated significant efficiency gains, substantially reducing the manual effort required for test specification and enabling rapid execution of generated tests. However, the research also highlighted current limitations. Ensuring generated Python scripts fully match the functional capabilities and constraints of the digital.auto platform still required manual adjustments and verification. Additionally, some domain-specific signals not yet covered by standard VSS necessitated manual mapping.

Despite these challenges, the GenAI-driven approach shows substantial potential for streamlining and automating testing processes in SDV development. Future work aims to enhance prompt engineering strategies to further minimize manual intervention, expand the VSS catalog to cover more domain-specific signals, and overcome compatibility constraints within the digital.auto playground. These advancements will pave the way for more fully automated, reliable, and scalable test automation, accelerating the development and validation cycles of next-generation automotive software.

You can read the full research paper for more details: GenAI-based test case generation and execution in SDV platform.

Karthik Mehta
Karthik Mehtahttps://blogs.edgentiq.com
Karthik Mehta is a data journalist known for his data-rich, insightful coverage of AI news and developments. Armed with a degree in Data Science from IIT Bombay and years of newsroom experience, Karthik merges storytelling with metrics to surface deeper narratives in AI-related events. His writing cuts through hype, revealing the real-world impact of Generative AI on industries, policy, and society. You can reach him out at: [email protected]

- Advertisement -

spot_img

Gen AI News and Updates

spot_img

- Advertisement -