White-box GUI Testing via EDT Adapter and Interaction Recorder
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Reliability
If white-box testing techniques are used for GUI testing, then testing thoroughness is improved, but ease of operation and accessibility deteriorates
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.
3Reliability
If custom test logic is implemented in GUI test cases, then testing thoroughness is improved, but device complexity increases
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.
4Ease of operation
If data is extracted from screen using generic component introspection, then ease of operation is improved, but data reliability deteriorates
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.
Data Source
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.


