Browser Testing Handler Factory Decoupling Strategy
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing software testing platforms require developers to write near-duplicate code for different web browsers due to browser-specific functions, leading to code duplication and increased complexity in maintaining 'clean code'.
Innovation Solution
A software testing system that uses a handler factory to decouple handler classes from test classes, implementing a strategy support interface to determine browser-dependent strategies, allowing for browser-independent testing by instantiating the correct handler instance based on the browser type.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If developers write separate handler classes for each web browser type, then browser-specific functionality can be implemented, but code duplication increases and maintenance complexity increases
Solution Approach 1:
The patent creates a universal handler interface that can work with multiple browser types (Internet Explorer, Firefox, Chrome, Safari) through a common abstraction layer. The Handler interface defines standard methods that all browser-specific handlers must implement, allowing the same test code to operate across different browsers without duplication.
Solution Approach 2:
The patent introduces an intermediary Handler interface between the test execution engine and browser-specific implementations. This mediator layer allows the testing framework to interact with different browsers through a standardized interface, while browser-specific handlers translate these generic commands into browser-specific actions, eliminating the need for duplicate test code.
2Adaptability or versatility
If developers write separate handler classes for each web browser type, then browser-specific functions can be supported, but code maintenance becomes more difficult
Solution Approach 1:
The patent segments the handler implementation into two distinct parts: a browser-agnostic test execution engine and browser-specific handler implementations. This segmentation allows modifications to be made in isolation - changes to one browser's handler do not affect others, and the core testing logic remains unchanged regardless of browser-specific variations.
Solution Approach 2:
By creating a universal Handler interface that all browser-specific handlers must implement, the patent ensures that the core testing framework remains unchanged when adding support for new browsers or modifying existing ones. This universality makes the codebase more maintainable as changes are localized to specific handler implementations rather than requiring widespread modifications.
3Adaptability or versatility
If near-duplicate code is written for different browsers, then all browser-specific requirements can be met, but the amount of code increases
Solution Approach 1:
The patent eliminates code duplication by creating a universal Handler interface and centralized test execution logic that works across all browser types. Instead of writing separate test code for each browser, the same test code interacts with the Handler interface, which then routes to the appropriate browser-specific implementation, significantly reducing the total volume of code required.
Solution Approach 2:
The Handler interface acts as an intermediary that translates generic test commands into browser-specific actions. This mediator approach allows a single set of test code to control multiple browsers without requiring duplicate implementations, as the Handler layer handles all browser-specific variations in one centralized location.
Data Source
AI summary
A computer implemented system and method for testing code for implementation in web browsers, implements test class code defining test cases for testing operations on web applications implementable by different web browser types, and implements handler class code comprising code specific to each web browser and defining strategies to be used by test cases. The handler class code implements a handler interface and the test class code uses the handler interface to identify the methods to be used for test cases. A non-transient storage medium stores code for a handler template supporting different web browser types for use in a test environment, the code comprising code to identify browser specific strategies for implementation in the test environment; code to implement a strategy support interface for use by a handler factory to select a handler instance; and code to implement a handler interface for use by a test case to identify methods for testing web browser functions.


