CN-122019392-A - Test method, test device, test medium, and test program product
Abstract
The embodiment of the application provides a testing method, testing equipment, testing media and a program product, and relates to the technical field of software testing. The method comprises the steps of generating a main process corresponding to any version of a plurality of versions of tested software aiming at the version, generating a plurality of subprocesses through the main process, independently executing test processes based on the subprocesses, and summarizing test results obtained after the subprocesses independently execute the test processes. Based on the method, the main process can be used as a control node for version division and test task scheduling, a plurality of sub-processes are generated based on the main process, and each sub-process can independently execute a test flow, so that a plurality of versions of serial tests can be avoided, multi-version parallel tests can be realized, the test time can be shortened, and the test efficiency can be improved.
Inventors
- DOU JINSHUANG
- HE SU
- WEI QIAN
Assignees
- 中电科金仓(北京)科技股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260210
Claims (10)
- 1. A method of testing, the method comprising: Generating a main process corresponding to any version of a plurality of versions of tested software, wherein the main process is used for version division and test task scheduling; Generating a plurality of subprocesses through the main process, and independently executing a test flow based on the subprocesses respectively; summarizing test results obtained after the plurality of subprocesses independently execute the test flow.
- 2. The method of claim 1, wherein the generating the master process corresponding to the any version comprises: reading version information and configuration file information of any version; and generating a main process entry file of the main process corresponding to any version according to the version information and the configuration file information.
- 3. The method of claim 2, wherein the generating, by the main process, a plurality of sub-processes comprises: and reading the configuration file according to the version information of any version, and generating a plurality of sub-processes named by the version identification, the data source combination and the sub-process grouping.
- 4. A method according to any one of claims 1-3, wherein said independently executing a test procedure based on each of said plurality of sub-processes comprises: And aiming at the plurality of subprocesses, respectively constructing an isolated test environment for the plurality of subprocesses through containerized deployment, wherein any subprocess in the plurality of subprocesses independently executes a test flow in the corresponding test environment.
- 5. The method of claim 4, wherein prior to the separately building the isolated test environments for the plurality of sub-processes by containerized deployment, the method further comprises: And preloading a container image matched with the version information of any version, wherein the container image is used for configuring basic configuration information of the test environment.
- 6. A method according to claim 2 or 3, wherein the profile information comprises at least one of: a hierarchical structure of the version information; environmental parameters of the data source combination corresponding to the test flow; And the test case scope of the sub-process grouping of the plurality of sub-processes.
- 7. A method according to any one of claims 1-3, wherein after said generating a master process corresponding to said any version, the method further comprises: acquiring a real-time resource use state of the test resource; And dynamically adjusting the starting quantity and/or starting sequence of the plurality of sub-processes according to the real-time resource use state.
- 8. An electronic device is characterized by comprising a memory and a processor; The memory stores computer-executable instructions; The processor executing computer-executable instructions stored in the memory, causing the processor to perform the method of any one of claims 1-7.
- 9. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1-7.
- 10. A computer program product comprising a computer program which, when executed by a processor, implements the method of any of claims 1-7.
Description
Test method, test device, test medium, and test program product Technical Field The present application relates to the field of software testing technologies, and in particular, to a testing method, device, medium, and program product. Background In the field of software development and software testing, and in particular in the field of automated testing involving database synchronization software, the complexity and resource requirements of the test flow are increasing. Along with the advancement of digital transformation, database synchronization software is widely applied to key business scenes such as cross-platform data migration, real-time data backup, distributed system consistency guarantee and the like. For example, in the financial industry, database synchronization software needs to ensure real-time synchronization of transaction data among multiple data centers, and in the e-commerce field, data consistency verification in a high concurrency scenario needs to be supported. In the process, the test link needs to cover compatibility verification of multi-version software, suitability test of multi-data source combination (such as mixed environment of a relational database management system MySQL and an object relational database management system PostgreSQL), and functional regression test in multi-project parallel development. The existing test method generally relies on manual configuration of test environments and execution of test cases version by version, so that the test period is long and the resource utilization rate is low. In addition, with the diversification of test requirements (such as supporting hybrid tests of different database types, synchronous delay tests of multi-region deployment, etc.), a test team needs to frequently switch test environments, manually maintain test configuration files, and easily cause test failures due to human operation errors, etc. Therefore, an automatic test framework capable of supporting multiple versions, multiple data source combinations and multiple projects is needed to shorten the test period, reduce the test difficulty and improve the reliability and traceability of the test results. Disclosure of Invention The embodiment of the application provides a testing method, equipment, a medium and a program product, which are used for improving the testing efficiency when multi-version, multi-data source combination and/or multi-project testing is carried out on tested software. In a first aspect, an embodiment of the present application provides a testing method, including: generating a main process corresponding to any version aiming at any version of a plurality of versions of the tested software, wherein the main process is used for version division and test task scheduling; generating a plurality of subprocesses through the main process, and respectively and independently executing a test flow based on the subprocesses; And summarizing test results obtained after the plurality of subprocesses independently execute the test flow. In one possible implementation manner, generating a master process corresponding to any version includes: reading version information and configuration file information of any version; and generating a main process entry file of the main process corresponding to any version according to the version information and the configuration file information. In one possible implementation, generating a plurality of sub-processes by a main process includes: And reading the configuration file according to the version information of any version, and generating a plurality of sub-processes named by the version identification, the data source combination and the sub-process grouping. In one possible implementation, the test procedure is independently executed based on a plurality of sub-processes, including: for a plurality of subprocesses, an isolated test environment is respectively constructed for the plurality of subprocesses through containerization deployment, and any subprocess in the plurality of subprocesses independently executes a test flow in the corresponding test environment. In one possible implementation, before the isolated test environments are respectively built for the plurality of sub-processes by containerized deployment, the method further includes: the container mirror image matched with the version information of any version is preloaded, and the container mirror image is used for configuring basic configuration information of the test environment. In one possible implementation, the profile information includes at least one of: A hierarchy of version information; environmental parameters of the data source combination corresponding to the test flow; test case scope for sub-process grouping of multiple sub-processes. In one possible implementation manner, after generating the main process corresponding to any version, the method further includes: acquiring a real-time resource use state of the test resource; a