Developair's unique approach to automatic test generation

Automated software testing workflow

In the development of critical software, ensuring the highest standards of reliability and robustness is paramount. Unit testing plays a crucial role in validating that each component of the software performs as expected. However, the manual creation of unit tests is often labor-intensive and prone to human error. Developair addresses these challenges through an innovative approach that leverages symbolic AI to automate the generation of unit test sequences. This article explores Developair's innovative methodology and its substantial benefits for developers of critical software, demonstrating how it revolutionizes the testing process for critical software development.

The Process of Automatic Test Generation

  1. Define Software Architecture: The first step in Developair's process is defining the architecture of the software, which includes specifying inputs, outputs, and custom data types. This foundation is essential for understanding the system's behavior and interactions.
  2. Define Requirements: Next, the software requirements are defined. These requirements serve as the criteria against which the software will be tested. Precise and well-defined requirements are crucial for accurate verification and validation.
  3. Automatic Verification of Requirements: Developair's tool automatically verifies the requirements to detect errors and inconsistencies early in the development cycle. This step ensures that any contradictions or ambiguities are identified and resolved promptly, preventing issues from propagating.
  4. Model Generation: Based on the requirements and architecture, Developair automatically generates a comprehensive model of the system. This model captures the expected behavior and serves as a blueprint for generating relevant test cases.
  5. Select Target Metrics: Various metrics are available to guide the test generation process. Developair supports a range of metrics, including Statement (Execution), Decision, Decision Condition, Boundary, and Modified Condition/Decision Coverage (MC/DC). These metrics ensure thorough testing across different aspects of the software's logic. Developair identifies all relevant test cases based on the system model and selected metrics. This step ensures comprehensive coverage.
  6. Automatic Generation of Test Cases: The tool automatically generates the identified test cases, leveraging its core technologies to ensure precision and efficiency.
  7. Export to Target Testing Tools: The generated test cases are then exported to the target testing tools. Developair seamlessly integrates with popular testing frameworks such as Simulink Test, VectorCast, Google Test or CXXtest, facilitating smooth adoption into existing workflows. New connectors are available on request, even for in-house tools.
  8. Export Test Specification Documents: In addition to the test cases, Developair generates detailed test specification documents. These documents provide a clear and structured overview of the tests, enhancing transparency and traceability.

Click here to watch a short demo video of the whole process.

Core Technology

Built in Formality

At the heart of Developair's approach is the use of formal methods, a branch of symbolic AI, and specifically Satisfiability Modulo Theories (SMT) solvers. This technologie enables the precise modeling and analysis of software behavior, ensuring comprehensive and reliable unit test generation.

Formal methods provide a rigorous mathematical foundation for specifying and verifying software properties. This approach is characterized by:

  • Precision and Rigor: By using formal methods, Developair ensures high precision and rigor in the specification and verification of software systems. This mathematical foundation minimizes errors and enhances the reliability of the tests.
  • Transparency and Interpretability: The reasoning process within formal methods is highly transparent, making it easy to understand how conclusions are reached. This transparency is crucial for applications where explainability is important, such as in critical software development.

SMT solvers, a key component of formal methods, play a crucial role in Developair's tool. These solvers determine the satisfiability of logical formulas, which is essential for verifying the requirements and generating test cases that satisfy the defined metrics. By leveraging SMT solvers, Developair can efficiently handle the complexity of modern software systems, ensuring thorough and reliable test coverage.

SMT solvers provide the backbone for Developair's unique and powerful approach to automatic unit test generation. The use of SMT solvers ensures that the generated tests are mathematically sound, comprehensive, and reliable, significantly enhancing the quality and robustness of critical software systems.

Formal methods for human beings

The Developair tool allows harnessing the full potential of formal methods without having to deal with complex and unintuitive languages when defining requirements.

Developair uses predefined natural language patterns and modular building blocks to help users write clear, unambiguous, and consistent requirements from which the formal model is generated. The natural language patterns ensure structured expression of requirements, while the modular building blocks allow for the easy construction of detailed and precise requirements by encapsulating common elements like conditions, actions, and constraints.

Available Metrics

Developair supports a wide range of coverage metrics to ensure thorough testing:

  • Statement (Execution) Coverage: Ensures every statement in the code is executed at least once.
  • Decision Coverage: Ensures every decision point (e.g., if-else conditions) is tested for both true and false outcomes.
  • Decision Condition Coverage: Extends decision coverage by considering the conditions within decision points.
  • Boundary Coverage: Focuses on the boundaries of input ranges to catch off-by-one errors.
  • MC/DC: Ensures each condition within a decision has been tested independently to affect the decision's outcome.

Additionally, Developair is working on incorporating new metrics like division by zero testing to further enhance its capabilities.

Key Benefits

  • Determinism: One of the standout benefits of Developair's approach is its determinism. By leveraging formal methods, the tool ensures that the test generation process is predictable and repeatable. This consistency is crucial for maintaining high-quality software.
  • Reliability: Developair's automatic test generation enhances the reliability of the testing process. By systematically covering all relevant scenarios, the tool minimizes the risk of undetected bugs and ensures that the software performs as expected under various conditions.
  • Detection of Errors and Contradictions: Developair excels in detecting errors and contradictions early in the development cycle. The automatic verification of requirements identifies inconsistencies, preventing them from propagating through the development process. This early detection provides developers with concrete instances where the specification fails, thus facilitating targeted debugging and refinement. With messages such as "there is a conflict between requirements 7 and 25".
  • Feedback with Counterexamples: A unique feature of Developair's tool is its ability to provide feedback with counterexamples. When there is an issue with a requirement, the system generates specific counterexamples that illustrate the failure. This targeted feedback helps developers quickly understand and resolve issues, leading to more robust and reliable software.
  • Test Generation with One Click: Simplifying the testing process, Developair offers one-click test generation. This feature streamlines the workflow, allowing developers to focus on other critical tasks while the tool handles the intricacies of test creation. The ease of use and automation significantly reduce the time and effort required for comprehensive testing.
  • Seamless Integration with Testing Tools: Developair's tool seamlessly integrates with widely-used testing tools through connectors. This integration ensures that the generated test cases can be easily incorporated into existing testing frameworks, enhancing the overall efficiency and effectiveness of the testing process.
  • Fast and Efficient Test Generation: A common limitation of solutions based on formal methods is the exponential increase in execution time with the complexity of the system. Developair addresses this challenge through optimized algorithms that significantly reduce execution time. For simple components, test cases can be generated in a few seconds. For industrially complex systems with hundreds of inputs and outputs, the generation process takes approximately one hour, producing thousands of test cases. This optimization ensures that Developair's tool is both powerful and practical for real-world applications.

Conclusion

Developair's unique approach to the automatic generation of unit test sequences represents a significant advancement in software testing, particularly for developers of critical software.

By leveraging symbolic AI, the tool ensures comprehensive coverage, determinism, and reliability. The ability to detect errors and contradictions early, coupled with feedback through counterexamples, enhances the overall quality of software. With one-click test generation and seamless integration with popular testing tools, Developair simplifies and accelerates the testing process, making it an invaluable tool for modern software development.

Transform your software testing with Developair's automated test generation. Contact us today to learn how we can enhance your testing efficiency and reliability. Let's discuss how Developair can meet your critical software needs!