Program Testing via Multi-Account Interaction and Local Code Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current program testing methods are inefficient as they typically require online testing after application launch, making it difficult to detect and address issues in a timely manner, leading to low testing efficiency.
Innovation Solution
A method and apparatus for program testing that involves receiving a test account adding instruction, acquiring and generating target code, and interacting through multiple test accounts to test the program, allowing for efficient debugging and modification of code through shared running spaces and debugging pages.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If online testing after application launch is used, then the application can be tested in real environment, but the testing efficiency is low and problems cannot be discovered in time
Solution Approach 1:
The patent applies preliminary action by enabling code modification and testing before the application is launched to production environment. Developers can modify target code, regenerate pages, and test functionality locally before deployment, thus discovering problems early without needing to wait for online testing after launch.
Solution Approach 2:
The patent uses copying by generating test pages from target code locally on the developer's device. Instead of deploying to production environment for testing, the system creates local copies of pages that can be tested in isolation, maintaining testing accuracy while improving efficiency.
2Adaptability or versatility
If code modification is made frequently during development, then the program can be optimized, but the testing process becomes complex and time-consuming
Solution Approach 1:
The system performs code modification and page regeneration in advance before testing is needed. When developers modify target code, the system automatically regenerates the corresponding pages locally, so that testing is always performed on the latest version without manual intervention, reducing testing complexity despite frequent code changes.
Solution Approach 2:
The system provides self-service by automatically detecting code modifications and regenerating pages without requiring manual testing setup. The development environment itself performs the regeneration and prepares test instances, eliminating the need for complex external testing processes.
3Reliability
If multiple test accounts are used to test interaction functions, then the testing coverage is improved, but the setup and management becomes more complex
Solution Approach 1:
The system uses copying by creating local copies of test accounts and their associated pages on the developer's device. Instead of managing multiple real accounts across different devices, the system generates local test instances that replicate account behaviors, simplifying account management while maintaining comprehensive interaction testing coverage.
Data Source
AI summary
A program testing method is provided. The method includes receiving a test account adding instruction the test account adding instruction identifying a second test account, acquiring a first target code corresponding to a target program in response to the test account adding instruction, the first target code corresponding to a first page, a first test account being logged in on the first page, and the first page being generated according to the first target code, generating a second page corresponding to the second test account according to the first target code, and interacting through the first page and the second page to test the target program. Apparatus and computer-readable medium counterpart embodiments are also provided.


