White-box GUI Testing via EDT Adapter and Interaction Recorder

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current GUI testing tools primarily rely on black-box techniques, limiting the ability to perform thorough unit testing and custom logic implementation, and face challenges with data reliability, maintainability, and test coverage assessment.

Innovation Solution

The introduction of white-box GUI testing techniques, including an Event Dispatching Thread (EDT) adapter and interaction recorder, allows for programmatically writing and executing unit tests for GUI components, enabling comprehensive testing and integration with unit testing frameworks like JUnit, along with features like mocking and automated test environment reconstruction.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If black-box testing techniques are used for GUI testing, then ease of operation is improved, but testing thoroughness and ability to test internal logic deteriorates

Engineering Contradiction:
Improveease of operationVSAvoidtesting thoroughness
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent segments the testing approach into two distinct modes: black-box testing for ease of operation and white-box testing for thoroughness. The system allows testers to select between these modes, with black-box testing using recorded user interactions and white-box testing using programmatically generated test cases that access internal application logic and data structures.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary layer (the testing system with its adapter and recorder components) that mediates between the tester and the application under test. This intermediary provides both black-box interfaces for simple testing and white-box capabilities for thorough testing, resolving the contradiction by offering multiple access paths.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If white-box testing techniques are used for GUI testing, then testing thoroughness is improved, but ease of operation and accessibility deteriorates

Engineering Contradiction:
Improvetesting thoroughnessVSAvoidease of operation
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent makes the testing system dynamic by allowing automatic generation of test cases from recorded user interactions. The system adapts its behavior based on the testing mode selected: in black-box mode, it provides simple recording and playback; in white-box mode, it generates comprehensive test cases with assertions and verifications, thus accommodating both ease of operation and testing thoroughness.

Inventive Principle:
Principle #15Dynamics

3Reliability

If custom test logic is implemented in GUI test cases, then testing thoroughness is improved, but device complexity increases

Engineering Contradiction:
Improvetesting thoroughnessVSAvoiddevice complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent enables the system to serve itself by automatically generating test cases, assertions, and verification logic from recorded user interactions. This self-service capability reduces the need for manual creation of complex test logic while maintaining testing thoroughness, as the system automatically produces the necessary test structures.

Inventive Principle:
Principle #25Self-service

4Ease of operation

If data is extracted from screen using generic component introspection, then ease of operation is improved, but data reliability deteriorates

Engineering Contradiction:
Improveease of operationVSAvoiddata reliability
Core Design Contradiction:
Ease of operationVSMeasurement precision

Solution Approach 1:

The patent performs preliminary actions by recording user interactions and extracting data at the source (from the application's data structures and API calls) rather than extracting from the rendered screen later. This preliminary extraction of data in its original, reliable form avoids the interpretation errors and truncation issues associated with screen scraping.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9047413B2White-box testing systems and/or methods for use in connection with graphical user interfaces
Publication Date: 2015.06.02 SAG ARIS GMBH
  • US9047413B2 patent drawing
  • US9047413B2 patent drawing
  • US9047413B2 patent drawing

AI summary

Certain example embodiments relate to white-box testing techniques, e.g., for graphical user interfaces (GUIs). A test case to be run on the application includes interactions between the application and external components that were gathered as the application ran and received user input from a user until a desired test state was reached, and assertions to be made to the application once that state is reached. A test environment replaces a normal environment in which the application runs. An adapter executes interactions on the test environment's GUI dedicated thread(s). The application is fed with interactions, through the adapter, until the application reaches the desired state. Once the application reaches that state, the application is fed with assertions. Expected data associated with the assertions is compared with data actually being generated by the application. A determination is made regarding whether the test case resulted in success or failure.