Software research automation test method and system
By using automated testing methods in software research and development, and by automating the deployment of testing environments using hardware and software repositories, the problems of low efficiency in testing resource utilization and data sharing are solved, enabling rapid and low-error-rate test environment construction and defect reproduction.
Patent Information
- Application Number
- CN202210180175.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-26
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2042-02-26
AI Technical Summary
In existing technologies, testing environments frequently change, resource utilization efficiency is low, the connection between testing and development is not close, test data is not fully shared and utilized, and experience and lessons learned are difficult to pass on when employees leave, increasing human resource costs.
The software development and testing automation method is adopted, which deploys the runtime environment through automated scripts of hardware, operating system and software repository, and performs tests using preset test scripts to generate test reports.
It enables rapid construction of testing environments, reduces error rates, improves resource utilization, provides a unified testing environment, facilitates defect reproduction and resolution, and reduces labor costs.
Smart Images

Figure CN114510428B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of software testing, in particular to a software development and testing automation testing method and system. BACKGROUND
[0002] Currently, with the development of the company, more and more projects, different projects, products need to develop and test the product, in the existing test method, there are the following shortcomings: (1) the development and test environment often changes, the utilization efficiency is not high under the condition of limited resources, and some resources are often occupied mutually; (2) the test and development are not closely connected, and resource information cannot be fully shared; (3) test data cannot be effectively utilized, compared and analyzed, and the output results are not fully and uniformly utilized; (4) when facing sudden resignation of employees, the methods of predecessors cannot be fully inherited, test results cannot be effectively accumulated, valuable experience and lessons cannot be effectively utilized, and unnecessary human cost is increased.
[0003] As the main delivery of the test, the test automation case, the test data, the test environment and other test assets, how to realize the sharing and reuse of the development and the test, let the test platform resources, the results can be shared across the development, the test, the operation and maintenance department, through the standardized, the process management, realize the centralized management and full sharing of the environment, improve the utilization rate of the existing assets, play the role of the important assets of the company in the continuous iteration, become the problem that the development and the test need to think together. Therefore, a scheme needs to be provided to improve the situation. SUMMARY
[0004] The purpose of the present application is to provide a software development and testing automation testing method, which can conveniently test the code to be tested.
[0005] In order to achieve the above purpose, the technical scheme adopted by the present application is as follows: a software development and testing automation testing method, comprising the following steps: S100, automatically selecting hardware of a specified model from a hardware warehouse, selecting an operating system of a specified type from an operating system warehouse, and selecting various software required for deployment from a software warehouse to generate a running environment according to a test project; S200, testing the code to be tested in the deployed running environment through a preset test script file; S300, analyzing and processing the data generated in the test process to generate a test report.
[0006] Compared with the prior art, the present application has the following technical effects: the required operating system, hardware model and software type are selected from the warehouse for coupling, the running environment can be constructed in a very short time through automatic script deployment, when the hardware platform resources are sufficient, the constructed environment can be replicated in large quantities, and due to less human intervention, the deployment is less prone to errors; and the test personnel provide almost the same test environment, which provides a prerequisite for defect reproduction, the error rate is extremely low, which is beneficial for the R&D personnel to better understand, reproduce and solve defects, and brings convenience to the R&D personnel.
[0007] The present application aims to provide a software R&D automation test system which can conveniently perform automated testing on the code to be tested.
[0008] To achieve the above object, the technical scheme adopted by the present application is as follows: a software R&D automation test system, comprising a hardware warehouse, a plurality of host computers of different models, each host computer being a test terminal; an operating system warehouse for storing installation images of various types of operating systems; a software warehouse for storing various types of software required for deployment; a code warehouse for storing the code to be tested, deployment scripts and test scripts; and a control terminal for interacting with the user to realize testing of the code to be tested by the test terminal according to the set requirements.
[0009] Compared with the prior art, the present application has the following technical effects: the system only needs to collect the hardware warehouse, operating system warehouse and software warehouse once before running, and subsequently, as the product scale continues to expand, only new samples need to be added to the asset management warehouse, the maintenance cost is low, the cost performance is high, and the generated warehouse can be circulated in the R&D, testing and operation and maintenance platforms, when deployment is required, the same environment can be quickly deployed, and the environment deployment can be guaranteed to be error-free to the maximum extent, greatly improving the speed and convenience of code testing. BRIEF DESCRIPTION OF DRAWINGS
[0010] Fig. 1 is a flowchart of the present application;
[0011] Fig. 2 is a running environment deployment flowchart;
[0012] Fig. 3 is a principle block diagram of the present application. DETAILED DESCRIPTION
[0013] The present application will be further described in detail below. Figs. 1 to 3
[0014] Reference is made to Fig. 1 The application discloses a software research automation test method, which comprises the following steps: S100, automatically selecting hardware of a specified type from a hardware warehouse, selecting an operating system of a specified type from an operating system warehouse and selecting various types of software required for deployment from a software warehouse to generate a running environment according to a test item; S200, testing code to be tested through a preset test script file in the deployed running environment; and S300, generating a test report after analyzing and processing data generated in the test process.
[0015] When a certain item needs to be customized in software and hardware, according to the previous operation process, hardware needs to be selected first, an operating system is manually installed, software is manually installed, then the device is run, and the code is debugged, and this process often needs several hours or even one day, if multiple environments are needed, the process needs to be multiplied, and valuable time is often wasted. When the product is delivered to the test team by the development team, the above process needs to be repeated, and some uncontrollable factors will appear in the installation process, which can have a great influence on the stability of the product. Moreover, when the test team finds defects, the developers need to confirm, and valuable time of the test is often wasted in the reproduction process, if specific defects need to be reproduced and debugged in the test environment, the following test process can be affected, and the whole test process is delayed.
[0016] In the application, the required operating system, hardware type and software type are coupled from the warehouse, deployment is realized through an automatic script, the running environment can be constructed in a short time, the constructed environment can be massively copied when the hardware platform resources are sufficient, and the deployment is less likely to be wrong due to less human intervention; moreover, the test personnel provide almost the same test environment, which provides a prerequisite for defect reproduction, the error rate is extremely low, and it is beneficial for the developers to better understand, reproduce and solve defects, and the application brings convenience to the research and development of the project developers.
[0017] Referring to Fig. 2Further, the step S100 comprises the following steps: S101, opening the first software on the control terminal and initializing the first software; S102, creating a new automation project, selecting corresponding configured hardware, operating system and software information; S103, selecting the second software to be tested, and the first software pulls the code of the second software from the code repository; S104, reviewing the code of the second software to check whether the code can run on the hardware and operating system set in step S102, if it can run, the next step is executed, otherwise the test is ended and a prompt is given; S105, compiling the code of the second software into a test program according to the development document, and generating a program start-stop script; S106, pulling the test script for testing the second software from the code repository by the first software, and setting the running number of each test script; S107, the first software sends a communication request to the test terminal corresponding to the hardware configuration, and after the test terminal replies to the permission message, the control terminal and the test terminal establish a connection and wait for data transmission; S108, the first software packs the operating system image file, the software file, the test program, the program start-stop script and the test script into a first image file and uploads it to the test terminal; S109, the test terminal checks the received image file, and after the verification is successful, the operating system and the software are automatically installed on the test terminal to deploy the running environment. Through the above steps, the running environment can be easily deployed on the test terminal, and the test terminal can automatically execute the code test task according to each script.
[0018] Further, the step S200 comprises the following steps: S201, the test terminal starts the test program according to the program start-stop script; S202, the test terminal tests the test program according to the test script and the running number thereof; S203, after the test is completed, the test terminal stops the test program according to the program start-stop script. Through these steps, the test terminal can automatically complete the test of the test program, which is very convenient.
[0019] Further, the step S200 comprises the following steps: S201, the test terminal starts the test program according to the program start-stop script; S202, the test terminal tests the test program according to the test script and the running number thereof; S203, after the test is completed, the test terminal stops the test program according to the program start-stop script. Through these steps, the test terminal can automatically complete the test of the test program, which is very convenient.
[0020] Further, the server is composed of a monitoring module and a quality evaluation module, the monitoring module is used to collect the running data of the test terminal during testing, the log generated during the running of the test script, the test result of the test script, and output all the data to the quality evaluation module after collating and checking; the quality evaluation module analyzes and processes the data to obtain a test report meeting the requirements. The running data of the test terminal during testing includes CPU, memory, network, I / O usage and other data during running, which are continuously collected by the monitoring module during testing, after the running of the script, the monitoring module checks and collates the data to determine the authenticity and validity of the data, and uploads the valid data to the quality evaluation module. Here, the monitoring module is only used to collect and check data, and the quality evaluation module processes and analyzes the checked data to generate a quality report meeting the requirements.
[0021] Further, the step S203 further comprises the following step: S204, after the testing is completed, the operating system, software, program and script on the test terminal are collectively packaged into a second image file and saved to the image warehouse. Here, after the second image file is saved to the image warehouse, a large amount of adaptation cost is saved for subsequent software continuous integration, and a reliable real basis is provided for subsequent defect reproduction, problem tracing and data comparison.
[0022] Referring to Fig. 3 The application further discloses a software research and development automation testing system, which comprises a hardware warehouse, a plurality of hosts of different types, each host being a test terminal, an operating system warehouse for storing installation images of various types of operating systems, a software warehouse for storing various types of software required for deployment, a code warehouse for storing codes to be tested, deployment scripts and test scripts, and a control terminal for interacting with a user to realize testing of the codes to be tested by the test terminal according to the set requirements. By setting the warehouses, with the continuous expansion of the product scale, only new samples need to be added to the asset management warehouse, the maintenance cost is low, the cost performance is high, and the whole system is very convenient to use.
[0023] Further, the image warehouse is used to save the second image file collectively packaged for the operating system, software, program and script on the test terminal. By packaging and saving the second image file, a test environment almost the same as the original one is provided, which provides a prerequisite for defect reproduction, has a very low error rate, and is beneficial to the better understanding, reproduction and solving of defects by the R&D personnel, and brings convenience to the R&D work of the project R&D personnel.
Claims
1. A software development automated testing method, characterized by: Comprise the following steps: S100, according to the test project automatically from the hardware warehouse selects the specified model hardware, selects the specified type operating system from the operating system warehouse, selects the various software required for deployment from the software warehouse to generate the running environment, comprising the following steps: S101, open the first software in the control terminal, and initialize the first software; S102, new automation project, select the corresponding configuration hardware, operating system and software information; S103, select the second software to be tested, and the first software pulls the code of the second software from the code warehouse; S104, review the code of the second software, check whether the code can run on the hardware, operating system set in step S102, if it can run, execute the next step, otherwise end the test and prompt; S105, compile the second software code into a test program according to the development document, and generate a program start-stop script; S106, the first software pulls the test script for testing the second software from the code warehouse, and sets the running number of each test script; S107, the first software sends a communication request to the test terminal corresponding to the hardware configuration, the test terminal replies to the permission message, the control terminal and the test terminal establish connection and wait for data transmission; S108, the first software packs the operating system image file, software file, test program, program start-stop script and test script into a first image file, and uploads it to the test terminal; S109, the test terminal checks the received image file, and automatically installs the operating system and software on the test terminal to complete the deployment of the running environment after the verification is successful; S200, in the deployed running environment, test the code to be tested through the preset test script file, wherein the preset test script file comprises one or more of function test script, compatibility test script, performance test script, penetration test script and stability test script; S300, generate a test report after analyzing and processing the data generated in the test process.
2. The software development automated testing method of claim 1, wherein: In step S200, the following steps are included: S201, the test terminal starts the test program according to the program start-stop script; S202, the test terminal tests the test program according to the test script and the running number thereof; S203, after completing the test, the test terminal stops the test program according to the program start-stop script.
3. The software development automation testing method of claim 2, wherein: The server, the server is composed of a monitoring module and a quality evaluation module, the monitoring module is used for collecting the running data when the test terminal tests, the log generated when the test script runs, the test result of the test script, and all data are arranged and checked and then output to the quality evaluation module; The quality evaluation module analyzes and processes the data to obtain a test report meeting the requirements.
4. The software development automated testing method of claim 2, wherein: After step S203, the following steps are included: S204, after the test is completed, the operating system, software, program and script on the test terminal are packaged into a second image file and saved to the image warehouse.
5. A software research automation testing system, characterized by: Comprise Hardware warehouse, including different models of host computers, each host computer is a test terminal; Operating system warehouse, used for storing installation images of various types of operating systems; a software warehouse for storing various software required for deployment; a code warehouse for storing code to be tested, deployment scripts, and test scripts, wherein the test scripts include one or more of functional test scripts, compatibility test scripts, performance test scripts, penetration test scripts, and stability test scripts; a control terminal for interacting with a user to enable a test terminal to test the code to be tested according to a set requirement; the control terminal is configured to: receive a user instruction to select specified hardware, an operating system, and software from the hardware warehouse, the operating system warehouse, and the software warehouse, and generate a runtime environment configuration; pull code of a second software from the code warehouse and perform a runtime compatibility review; compile the code of the second software that passes the review to generate a test program and generate a program start-stop script; pull a test script from the code warehouse and set a number of runs; establish a communication connection with a selected test terminal; package the selected operating system image, software, the test program, the program start-stop script, and the test script into a first image file and send the first image file to the test terminal; the test terminal is configured from hardware selected from the hardware warehouse, and the test terminal is configured to: receive and verify the first image file from the control terminal; based on the verified first image file, automatically install an operating system and software to complete deployment of a runtime environment; in the deployed runtime environment, run the test script to automatically test the test program; the control terminal is further configured to analyze and process data generated by the test terminal during testing and generate a test report.
6. The software development automated testing system of claim 5, wherein: the image warehouse is configured to save a second image file that collectively packages an operating system, software, a program, and a script on the test terminal.
Citation Information
Patent Citations
Automatic testing method and system for web application compatibility
CN112035356A
Test method, device and equipment, storage medium and program product
CN113407451A