Automated Unit Testing Framework for Domain Specific Languages

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing unit and regression testing methods are inefficient, particularly for domain-specific languages, as they lack automation, integration with development environments, and reusability, leading to cumbersome debugging and poor code coverage.

Innovation Solution

A system and method for automated unit and regression testing that includes a repository, modeling unit, code generating module, executing module, and comparing module, using a XML-based assert mechanism to compare expected and actual outputs, enabling versioning and integration with development environments, and employing an Eclipse plug-in for code generation and testing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If manual test case creation is used, then flexibility in test design is maintained, but time consumption and effort increase significantly

Engineering Contradiction:
Improveflexibility in test designVSAvoidtime consumption
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by automatically generating test cases from domain models before execution. The modeling unit creates test case templates in advance, and the code generating module produces executable test code, eliminating the need for manual test case creation while maintaining adaptability through model-driven generation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The testing system serves itself by automatically generating test cases, executing them, and producing results without manual intervention. The framework self-manages the entire testing workflow from test case generation to execution and reporting, reducing both time consumption and manual effort while preserving flexibility through configurable domain models.

Inventive Principle:
Principle #25Self-service

2Device complexity

If integration testing is preferred over unit testing, then repetitive test case creation is avoided, but debugging becomes cumbersome at unit level

Engineering Contradiction:
Improvetest case management complexityVSAvoiddebugging ease
Core Design Contradiction:
Device complexityVSEase of operation

Solution Approach 1:

The system segments testing into distinct unit-level tests generated from domain models. Each test case is independently generated and executable, allowing focused unit testing while maintaining manageable complexity through automated generation. The segmentation enables precise debugging at unit level without the overhead of manual test case creation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The domain model acts as an intermediary between test design and execution. Instead of directly managing complex test cases, developers work with simplified domain models that automatically generate unit tests. This intermediary layer reduces test case management complexity while enabling easy debugging through model-based traceability.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Ease of operation

If TDD approach is adopted, then flexibility and integrated development environment are improved, but automated test case generation with reusability is lacking

Engineering Contradiction:
Improveintegrated development environmentVSAvoidautomated test case generation
Core Design Contradiction:
Ease of operationVSExtent of automation

Solution Approach 1:

The domain model serves multiple functions: it defines business logic, generates unit tests, and creates executable test cases. This universal approach enables automated test case generation with reusability while maintaining the integrated development environment benefits of TDD. The same model can be reused across different testing scenarios and projects.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The system creates copies of test cases from domain model templates. Once a domain model is defined, it automatically generates reusable test case copies that can be executed multiple times with different inputs. This copying mechanism provides automated test case generation while maintaining the flexibility and integration benefits of TDD.

Inventive Principle:
Principle #26Copying

4Ease of manufacture

If code first approach is used, then development simplicity is maintained, but testing framework integration and automation are compromised

Engineering Contradiction:
Improvedevelopment simplicityVSAvoidtesting framework integration
Core Design Contradiction:
Ease of manufactureVSExtent of automation

Solution Approach 1:

The system inverts the traditional code-first approach by using model-first development. Instead of writing code then creating tests, developers define domain models that automatically generate both the code structure and test cases. This inversion maintains development simplicity through model-driven design while enabling full testing framework integration and automation.

Inventive Principle:
Principle #13The other way round (Inversion)

Data Source

PatentUS9032361B2Agile unit and regression testing framework for domain specific languages
Publication Date: 2015.05.12 TATA CONSULTANCY SERVICES LTD
  • US9032361B2 patent drawing
  • US9032361B2 patent drawing
  • US9032361B2 patent drawing

AI summary

According to one aspect of the invention, a system and method for unit and regression testing has been developed. The system is capable to automate unit/regression test case preparation, remote execution, provide XML based assert mechanism to evaluate test results, maintenance and versioning. The present system enables model driven testing of domain specific languages and provides a user friendly mechanism to perform Unit and Regression Testing.