Software testing method, device, computer equipment and storage medium

By automatically determining and configuring test plans through the software test management interface, the problems of complexity and high cost in traditional software testing are solved, and efficient and low-cost software testing is achieved.

CN112597043BActive Publication Date: 2025-01-07SHENZHEN POWER SUPPLY BUREAU
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011588001.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-28
Publication Date
2025-01-07
Estimated Expiration
2040-12-28

AI Technical Summary

Technical Problem

Traditional software testing methods are complex to operate, inefficient, and costly, especially in metering software testing in power companies, which requires specialized skills and the participation of third-party organizations.

Method used

The software test management interface obtains test instructions, automatically determines the target test plan based on the test plan identifier, and generates a test plan based on the interface configuration parameters, thereby realizing automated software testing.

Benefits of technology

It simplifies testing procedures, improves testing efficiency, reduces costs, and eliminates the need for specialized skills or the involvement of third-party organizations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112597043B_ABST
    Figure CN112597043B_ABST
Patent Text Reader

Abstract

The present application relates to a software testing method, device, computer equipment and storage medium. The method comprises: obtaining software testing instructions based on a software testing management interface; the software testing instructions include a test scheme identifier, and determining a target test scheme corresponding to the test scheme identifier according to the corresponding relationship between the test scheme and the test scheme identifier; the test scheme is a scheme generated based on the test parameters configured in the test scheme creation interface, and software testing is performed according to the target test scheme to obtain a test report. The software testing method is simple to operate, improves testing efficiency, and does not require a third-party testing organization to perform testing, thereby reducing costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software testing technology, and in particular to a software testing method, apparatus, computer equipment and storage medium. Background Art

[0002] With the continuous development of smart grids, power companies use relevant power metering systems to monitor and analyze grid data, as well as alarm for abnormal metering situations. Before maintaining and upgrading the relevant metering software used by power companies, the metering software must be tested to determine whether there are any abnormalities in the metering software, and then determine whether the metering software can be updated or upgraded.

[0003] When traditional technology is used to test metering software used by power companies, it places high demands on the professional skills of software testers. Therefore, a third-party professional testing organization is usually required to test the metering software. In addition, professional testers need to build different test environments, test scripts, test cases, etc. for different software testing tools, and then test different software.

[0004] However, current software testing methods have problems such as complex operation, low testing efficiency and high cost. Summary of the invention

[0005] Based on this, it is necessary to provide a software testing method, device, computer equipment and storage medium with high testing efficiency and low cost to address the above technical problems.

[0006] In a first aspect, an embodiment of the present application provides a software testing method, the method comprising:

[0007] Based on the software testing management interface, obtain software testing instructions; the software testing instructions include a test plan identifier;

[0008] According to the correspondence between the test plan and the test plan identifier, determine the target test plan corresponding to the test plan identifier; the test plan is a plan generated based on the test parameters configured in the test plan creation interface;

[0009] Perform software testing according to the target test plan and obtain a test report.

[0010] In one embodiment, the software testing method further includes:

[0011] Obtain basic software testing data from the project file corresponding to the version control system;

[0012] Based on the test plan creation interface, obtain the configuration parameters of the test tool, the test tool instructions, and the configuration parameters of the test plan;

[0013] Generate a test plan based on software test basic data, test tool configuration parameters, test tool instructions and test plan configuration parameters.

[0014] In one embodiment, the software testing basic data includes test scripts, driver data, and configuration files.

[0015] In one embodiment, based on the test plan creation interface, obtaining configuration parameters of the test tool includes:

[0016] Get the test tool creation instructions based on the test plan creation interface;

[0017] Jump to the test tool configuration interface according to the test tool creation instruction;

[0018] The configuration parameters of the test tool are obtained based on the test tool configuration interface; the configuration parameters of the test tool include the test tool name, installation directory, and running operating system.

[0019] In one embodiment, based on the test plan creation interface, obtaining the test tool instruction includes:

[0020] Get test instruction creation instructions based on the test plan creation interface;

[0021] Create an instruction based on the test instruction and jump to the test instruction configuration interface;

[0022] The configuration parameters of the test command are obtained based on the test command configuration interface; the configuration parameters of the test command include the test command name, the test tool name, and the command line.

[0023] In one embodiment, based on the test plan creation interface, obtaining configuration parameters of the test plan includes:

[0024] Get the test plan creation instruction based on the test plan creation interface;

[0025] Jump to the test plan configuration interface according to the test plan creation instruction;

[0026] The configuration parameters of the test plan are obtained based on the test plan configuration interface; the configuration parameters of the test plan include the test plan name, instruction line, test script name, configuration file name, configuration file storage path, test report name, and test report storage path.

[0027] In one embodiment, the software testing method further includes:

[0028] Based on the software test management interface, obtain report query instructions;

[0029] Jump to the report query interface according to the report query instruction; the report query interface includes multiple options corresponding to the query report;

[0030] Acquire a selection instruction based on the report query interface; the selection instruction includes a report identifier corresponding to at least one selected option;

[0031] Determine the target test report based on the report identification;

[0032] The target test reports are displayed according to their type.

[0033] In a second aspect, an embodiment of the present application provides a software testing device, the device comprising:

[0034] An acquisition module is used to acquire software test instructions based on a software test management interface; the software test instructions include a test plan identifier;

[0035] A determination module, used to determine a target test scheme corresponding to the test scheme identifier according to a correspondence between the test scheme and the test scheme identifier; the test scheme is a scheme generated based on the test parameters configured in the test scheme creation interface;

[0036] The test module is used to perform software testing according to the target test plan and obtain a test report.

[0037] In a third aspect, the present application provides a computer device including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method in any one of the embodiments of the first aspect are implemented.

[0038] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any one of the embodiments of the first aspect above.

[0039] The software testing method, device, computer equipment and storage medium described above obtain software testing instructions based on the software testing management interface, determine the target test plan corresponding to the test plan identifier according to the correspondence between the test plan and the test plan identifier, perform software testing according to the target test plan, and obtain a test report. When the user needs to test the metering software, he or she makes a selection on different selection interfaces according to the test requirements, generates a target test plan, and triggers the test instructions. The software testing system will automatically query the target test plan according to the identifier in the test instruction, and automatically perform software testing according to the target test plan. This method performs software testing based on the interface, is intuitive, and the test operation is simple, which improves the test efficiency. The user does not need to have very professional testing skills, so there is no need for a third-party testing organization to perform the test, which reduces the cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 An application environment diagram of a software testing method in an embodiment;

[0041] Figure 2 A flowchart of a software testing method in one embodiment;

[0042] Figure 3 is a flowchart of a software testing method in another embodiment;

[0043] Figure 4 is a flowchart of a software testing method in another embodiment;

[0044] Figure 5 is a flowchart of a software testing method in another embodiment;

[0045] Figure 6 is a flowchart of a software testing method in another embodiment;

[0046] Figure 7 is a flowchart of a software testing method in another embodiment;

[0047] Figure 8 is a flowchart of a software testing method in another embodiment;

[0048] Fig. 9 is a structural block diagram of a software testing device in one embodiment;

[0049] Fig.10 FIG. 4 is a structural block diagram of a software testing device in one embodiment. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0051] The software testing method provided in this application can be applied to Figure 1 In the application environment shown. The application environment includes a computer device. Among them, the computer device may include a software testing system and a version control system. Among them, the software testing system is a system for testing relevant metrology software, and the version control system is a system for storing test tools, test instructions, and test plans. When the software testing system tests the relevant metrology software, the metrology software to be tested can be tested by calling the test plan in the version control system. Among them, the software testing system and the version control system can be in the same computer device or in different computer devices.

[0052] In one embodiment, Figure 2 As shown, a software testing method is provided, which is applied to Figure 1The computer device in the example is used to illustrate, including the following steps:

[0053] S202, based on the software test management interface, obtaining software test instructions; the software test instructions include a test solution identifier.

[0054] Specifically, when the user needs to test the relevant metrology software, he can log in to the software testing system. After successful login, the software testing management interface is displayed. In the software testing management interface, there are multiple menu options, such as test tool selection options, test instruction selection options, test plan selection options, test report query options, automatic test options, etc. The user can trigger the software testing instruction by clicking the automatic test option. Among them, the test plan identifier can be the name of the test plan or the number of the test plan, which is not limited here.

[0055] S204, determining a target test scheme corresponding to the test scheme identifier according to the correspondence between the test scheme and the test scheme identifier; the test scheme is a scheme generated based on the test parameters configured in the test scheme creation interface.

[0056] Specifically, after the computer device obtains the software test instruction, it searches for the test solution with the corresponding identification stored in the version control system according to the test solution identification in the software test instruction, that is, the target test solution. For example, if the identification of the test solution in the obtained software test instruction is the number 01 of the test solution A, then the test solution A with the test solution number 01 is searched in the version control system to determine it as the target test solution.

[0057] The test plan is a plan generated based on the test parameters configured in the test plan creation interface. When a user needs to create a test plan, he can click the test plan selection option to enter the test plan creation interface. In the test plan creation interface, he can click the configured test parameter option to set and save different configuration test parameters to create a test plan. The configured test parameters can be the test plan name, command line, test script name, configuration file name, configuration file storage path, test report name, test report storage path, etc., which are not limited here.

[0058] Among them, the test script can be a test script with different test types. For example, the test script can be a security test script, a stress test script, a load test script, a functional test script, etc., which is not limited here.

[0059] S206, performing software testing according to the target testing plan and obtaining a test report.

[0060] Specifically, after receiving the test instruction, the target test scheme corresponding to the test scheme identifier in the test instruction is automatically searched, and the software test is performed according to the test parameters configured in the target test scheme. For example, according to the storage path of the test tool in the target test scheme, the test tool under the corresponding storage path is searched, the target test tool is called, and the test instruction for starting the test tool is executed. After the test tool is started, according to the storage path of the test case, the test case under the storage path of the test case is searched, the test case is called, the instruction for running the test case is executed, the software test is performed, and a test report is generated.

[0061] In the above software testing method, the software testing instruction is obtained based on the software testing management interface, and the target test scheme corresponding to the test scheme identifier is determined according to the correspondence between the test scheme and the test scheme identifier, and the software test is performed according to the target test scheme to obtain a test report. When the user needs to test the metering software, he makes a selection on different selection interfaces according to the test requirements, generates a target test scheme, and triggers the test instruction. The software testing system will automatically query the target test scheme according to the identifier in the test instruction, and automatically execute the software test according to the target test scheme. This method performs software testing based on the interface, which is intuitive and simple to operate, improves the test efficiency, does not require the user to have very professional testing skills, and therefore does not require a third-party testing agency to perform the test, thereby reducing costs.

[0062] The above embodiment describes the software testing method. When performing software testing, it is necessary to perform software testing according to the target test plan. Now, an embodiment is used to further describe how to generate a test plan. In one embodiment, Figure 3 As shown, the software testing method also includes:

[0063] S302, obtaining software testing basic data from a project file corresponding to the version control system.

[0064] Optionally, the software testing basic data includes test scripts, driver data, and configuration files.

[0065] Specifically, the software testing basic data are the test scripts, configuration files and complete and controllable test drive data prepared in advance by dedicated test engineers, and these software testing basic data are pre-stored in the project file corresponding to the version control system. When performing software testing, the software testing system can find the software testing basic data according to the storage path of the project file in the version control system, and call it, that is, obtain the software testing basic data from the project file corresponding to the version control system.

[0066] S304, based on the test plan creation interface, obtain configuration parameters of the test tool, test tool instructions, and configuration parameters of the test plan.

[0067] Specifically, when a user needs to create a test plan, he can first enter the version control system. After entering the version control system, the version control management interface is displayed. In the selection menu of the interface, click the test plan creation option to jump to the test plan creation interface. In the test plan creation interface, the user can click the test tool setting option to select the configuration parameters of the corresponding test tool for setting, or enter the configuration parameters of the corresponding test tool for configuration; click the test instruction setting option to select the corresponding test tool instruction, or enter the corresponding test tool instruction; click the test plan setting option to select the configuration parameters of the corresponding test plan, or enter the configuration parameters of the corresponding test plan. Among them, the test tool can be a functional test tool, a performance test tool, a security test tool, etc., which are not limited here. Further, the test tool can specifically include: Mercury test tool, Rational test tool, Segue test tool, qtp automation test tool and AutoRunner tool, Jmeter test tool, LoadRunner test tool, etc., which are not limited here. Among them, the version control interface can include test tool creation options, test instruction creation options, test plan creation options, etc.

[0068] Among them, the configuration parameters of the test tool may include the test tool name, the test tool storage path, etc.; the test tool instructions may include starting the test tool or stopping the test tool, etc.; the configuration parameters of the test plan may include the test plan name, instruction line, test script name, configuration file name, configuration file storage path, test report name, test report storage path, etc., which are not limited here.

[0069] S306, generating a test plan according to the software test basic data, the configuration parameters of the test tool, the test tool instructions and the configuration parameters of the test plan.

[0070] Specifically, by clicking the new menu option of the test plan in the test plan creation interface, jumping to the test plan creation interface, clicking to select the corresponding software test basic data options, test tool configuration parameter options, test tool instruction options and test plan configuration parameter options on the test plan creation interface for setting, after setting, click the "Save" button, and a new test plan will be generated in the database. For example, in the test plan creation interface, you can use the performance test case in the software test basic data, select the test tool Jmeter test tool, select the storage path of the test tool, select the start JMETER test tool instruction, set the test result name to performance test result, the storage path of the test result, select the close test tool instruction, set the test plan name, and click Save after setting to generate a new test plan.

[0071] Optionally, after entering the test plan creation interface, you can also generate a new test plan by modifying, adding or deleting relevant software test basic data, test tool configuration parameters, test tool instructions and test plan configuration parameters, and saving the modified test plan.

[0072] In this embodiment, by obtaining software testing basic data from the project file corresponding to the version control system, based on the test plan creation interface, obtaining the configuration parameters of the test tool, the test tool instructions, and the configuration parameters of the test plan, a test plan is generated according to the software testing basic data, the configuration parameters of the test tool, the test tool instructions, and the configuration parameters of the test plan. Since the software testing basic data, the test tool, the test instructions, etc. are all pre-stored in the project file corresponding to the version control system, when the user uses it, he can select and call it in the corresponding selection interface, without having high professional testing skills, the operation is simple, and the testing efficiency is improved.

[0073] The above embodiment describes the generation of a test plan. Based on the above embodiment, the configuration parameters of the test tool in the generation of the test plan are further described. In one embodiment, Figure 4 As shown, based on the test plan creation interface, obtain the configuration parameters of the test tool, including:

[0074] S402, obtaining a test tool creation instruction based on a test solution creation interface.

[0075] Specifically, when the user creates a test plan, he or she may click on a test tool creation option on the test plan creation interface to trigger a test tool creation instruction, ie, obtain the test tool creation instruction.

[0076] S404: Jump to the test tool configuration interface according to the test tool creation instruction.

[0077] Specifically, when the computer device obtains the test tool creation instruction, it will automatically jump to the test tool configuration interface. Optionally, the test tool configuration interface may include: a test tool name editing area, a test tool installation directory editing area, and a test tool running operating system editing area.

[0078] S406, obtaining configuration parameters of the test tool based on the test tool configuration interface; the configuration parameters of the test tool include the test tool name, installation directory, and running operating system.

[0079] Specifically, the user can obtain the test tool name of the test tool by inputting the test name of the test tool in the test tool name editing area of ​​the test tool creation interface and clicking Save after inputting. The user can obtain the test tool installation directory of the test tool by inputting the installation directory of the test tool in the test tool installation directory editing area of ​​the test tool creation interface and clicking Save after inputting. Alternatively, the user can obtain the test tool installation directory of the test tool by selecting the installation directory in the test tool security directory editing area. The user can obtain the test tool running operating system of the test tool by inputting the test tool running operating system in the test tool running operating system editing area of ​​the test tool creation interface and clicking Save after inputting. The test tool running operating system can be a Linux operating system, a Windows operating system, etc., which are not limited here.

[0080] For example, taking the jMeter test tool as an example, enter the test tool name as jMeter, the installation directory as C:\Program Files(x86), select the operating system Linux for jMeter, and click the Save option to obtain the configuration parameters of the test tool.

[0081] For example, the tested tool is the LoadRunner test tool. Enter the test tool name as LoadRunner, the installation directory as C:\Program Files(x86), and select the operating system Windows for LoadRunner. Click the Save option to obtain the configuration parameters of the test tool.

[0082] In this embodiment, by obtaining the test tool creation instruction based on the test plan creation interface, jumping to the test tool configuration interface according to the test tool creation instruction, and obtaining the configuration parameters of the test tool based on the test tool configuration interface, the operation steps are simple, the acquisition of the test tool configuration parameters is realized, and the testing efficiency is improved.

[0083] The above embodiment describes the generation of a test plan. Based on the above embodiment, the configuration parameters of the acquisition test instruction in the generation of the test plan are further described. In one embodiment, Figure 5 As shown, based on the test plan creation interface, obtain the test tool instructions, including:

[0084] S502, obtaining a test instruction creation instruction based on a test plan creation interface.

[0085] Specifically, when the user creates a test plan, he or she may click a test instruction creation option on the test plan creation interface to trigger a test instruction creation instruction, that is, obtain a test instruction creation instruction.

[0086] S504, creating an instruction according to the test instruction to jump to the test instruction configuration interface.

[0087] Specifically, when the computer device obtains the test instruction creation instruction, it will automatically jump to the test instruction configuration interface. Optionally, the test instruction configuration interface may include: a test instruction name editing area, a test tool name editing area, an instruction line editing area, etc.

[0088] S506, acquiring configuration parameters of the test instruction based on the test instruction configuration interface; the configuration parameters of the test instruction include a test instruction name, a test tool name, and an instruction line.

[0089] Specifically, the user can obtain the test instruction name by entering the test instruction name in the test instruction name editing area of ​​the test instruction creation interface and clicking Save after the input is completed. The user can obtain the test tool name by entering the test tool name editing area of ​​the test instruction creation interface and clicking Save after the input is completed. The user can obtain the instruction line by entering the instruction line in the instruction line editing area of ​​the test instruction creation interface and saving after the input is completed. Among them, the instruction line refers to the instruction containing the test script name, the test report result file name, and the path for storing the test report.

[0090] For example, the configuration parameters of the test command can be a performance test command: jmeter-nt FileName-lResultFileName-eo / path. The command name is the performance test command; jmeter is the name of the test tool; FileName is the test script name; ResultFileName is the test report result file name; / path is the path where the test report is stored.

[0091] For example, the configuration parameters of the test instruction can be a performance test instruction: C:\Users\AppAdmin>runas / user:Administrator"%PATH%\bin\wlrun.exe-Run-TestPath SCENAROIS_NAME-ResultName RESULT_NAME". Among them, the instruction name is the performance test instruction, C:\Users\AppAdmin is the instruction running path for installing LoadRunner; runas / user: execute the LoadRunner test scenario as an administrator user; Administrator is the administrator user name of the server where LoadRunner is installed; wLrun.exe is the LoadRunner running instruction, that is, open the loadrunner controller; PATH is to set the software installation path, which can be PATH="C:\Program Files(x86)\HP\LoadRunner"; TestPath is the path of the test script; SCENAROIS_NAME is the absolute path of the test script and the running name of the test script, for example, SCENAROIS_NAME=c:\dx\jzx\PerformanceTest\Scenarios\example.lrs; Run is an instruction to run the test script, dump all output messages to the specified file, and close the controller; ResultName is an instruction parameter, the completion path of the execution result; RESULT_NAME is the absolute path of the test script and the test report name, for example, RESULT_NAME=c:\dx\jzx\PerformanceTest\Result\result01. Optionally, when the computer device runs the above instructions, the Windows system will prompt the user to enter a password. After the user enters the password, the LoadRunner controller (controller) will be started as the user "Administrator" to run the performance test script examples.lrs. After the test is completed, the test report file result01.lrr will be automatically generated in the specified .\PerformanceTest\Result path.

[0092] In this embodiment, a test instruction creation instruction is obtained based on a test plan creation interface, and a jump is made to a test instruction configuration interface according to the test instruction creation instruction. Configuration parameters of the test instruction are obtained based on the test instruction configuration interface. The test instruction configuration parameters can be obtained through simple operations, thereby improving test efficiency.

[0093] The above embodiment describes the generation of a test plan. Based on the above embodiment, the configuration parameters of the test plan in the generation of the test plan are further described. In one embodiment, Figure 6 As shown, based on the test plan creation interface, obtain the configuration parameters of the test plan, including:

[0094] S602: Acquire a test plan creation instruction based on a test plan creation interface.

[0095] Specifically, when the user creates a test plan, he can click a test plan creation option on the test plan creation interface to trigger a test plan creation instruction, that is, obtain the test plan creation instruction.

[0096] S604, jump to the test plan configuration interface according to the test plan creation instruction.

[0097] Specifically, when the computer device obtains the test plan creation instruction, it will automatically jump to the test plan configuration interface. Optionally, the test plan configuration interface may include: a test plan name editing area, a command line editing area, a test script name editing area, a configuration file name editing area, a configuration file storage path editing area, a test report name editing area, a test report storage path editing area, etc.

[0098] S606, obtaining configuration parameters of the test plan based on the test plan configuration interface; the configuration parameters of the test plan include the test plan name, instruction line, configuration file name, and configuration file storage path.

[0099] Specifically, the user can obtain the test plan name by entering the test plan name in the test plan name editing area of ​​the test plan creation interface and clicking Save after the input is completed. The user can obtain the command line by entering the command line in the command line editing area of ​​the test plan creation interface and saving after the input is completed. Among them, the command line refers to the command containing the test script name, the test report result file name, and the path for storing the test report. The user can obtain the configuration file name by entering the configuration file name in the configuration file name editing area of ​​the test plan creation interface and clicking Save after the input is completed. The user can obtain the configuration file name by entering the configuration file storage path in the configuration file storage path editing area of ​​the test plan creation interface and clicking Save after the input is completed.

[0100] In this embodiment, by obtaining a test plan creation instruction based on a test plan creation interface, jumping to a test plan configuration interface according to the test plan creation instruction, and obtaining the configuration parameters of the test plan based on the test plan configuration interface, the test plan configuration parameters can be obtained through simple operations, thereby improving the test efficiency.

[0101] The above embodiment describes the software testing method. After the software is tested, a software testing result is generated. The query method for the software testing result is now described with an embodiment. In one embodiment, Figure 7 As shown, the software testing method also includes:

[0102] S702, based on the software test management interface, obtain a report query instruction.

[0103] Specifically, after testing the metering software, the software test results will be stored in a preset storage path. When the user needs to query, he can trigger the report query instruction by clicking the report query menu in the software test shutdown interface, that is, the computer device obtains the report query instruction.

[0104] S704, jumping to the report query interface according to the report query instruction; the report query interface includes multiple options corresponding to query reports.

[0105] Specifically, after the report query instruction is obtained, the system automatically jumps to the report query interface, wherein the report query interface may include multiple test reports, each test report corresponding to a selection option.

[0106] S706, obtaining a selection instruction based on the report query interface; the selection instruction includes a report identifier corresponding to at least one selected option.

[0107] The report identifier may be a report name, a report number, etc., which is not limited here.

[0108] Specifically, the user selects the report to be queried on the report query interface, and can select one test report at a time, or multiple test reports at a time, without limitation. The user triggers the selection instruction by clicking the option corresponding to the report to be queried on the report query interface, that is, the software testing system obtains the selection instruction.

[0109] S708, determining a target test report according to the report identifier.

[0110] Specifically, according to the identification information of the report in the selection instruction, a search is performed in the report storage database to determine that the report with the same report identification is the target test report. For example, the report identification is report number 12, and the test report with report number 12 is searched in the database, which is the target test report.

[0111] S710: Display the target test report according to the type of the target test report.

[0112] Specifically, after testing the software, the generated test report can be a file in the format of a document (doc), portable document format (pdf), hypertext markup language (html), picture (jpg), etc. When the user needs to view the target test report, different display tools can be used to display it according to the type of the target test report. For example, if the target test report is in the format of hypertext markup language (html), the target test report can be opened using a browser for display.

[0113] Optionally, the user can decide whether to upgrade the software based on the test results of the target test report. If the test result is normal, the software is upgraded; if the test result is abnormal, the software needs to be repaired, and then retested after the repair, and upgraded after the test result passes. It is understandable that after the software test is completed, the software testing system can automatically send the test report results to the email or mobile phone of the relevant personnel.

[0114] In this embodiment, by obtaining a report query instruction based on the software test management interface, jumping to the report query interface according to the report query instruction, obtaining a selection instruction based on the report query interface, determining the target test report according to the report identifier, and displaying the target test report according to the type of the target test report. The test results can be displayed in a variety of ways, which is convenient for users to judge the test results and avoids direct software upgrades and failures during use, which causes huge losses.

[0115] In order to facilitate the understanding of those skilled in the art, the software testing method provided by this application is described in detail below. Figure 8 As shown, the method may include:

[0116] S801, obtaining software testing basic data from a project file corresponding to a version control system.

[0117] S802, obtaining a test tool creation instruction based on a test solution creation interface.

[0118] S803, jump to the test tool configuration interface according to the test tool creation instruction.

[0119] S804, obtaining configuration parameters of the test tool based on the test tool configuration interface; the configuration parameters of the test tool include the test tool name, installation directory, and running operating system.

[0120] S805, obtaining a test instruction creation instruction based on the test plan creation interface.

[0121] S806, jump to the test instruction configuration interface according to the test instruction creation instruction.

[0122] S807, obtaining configuration parameters of the test instruction based on the test instruction configuration interface; the configuration parameters of the test instruction include the name of the instruction, the name of the test tool, and the instruction line.

[0123] S808, obtaining a test plan creation instruction based on the test plan creation interface.

[0124] S809, jump to the test plan configuration interface according to the test plan creation instruction.

[0125] S810, obtaining configuration parameters of the test plan based on the test plan configuration interface; the configuration parameters of the test plan include the test plan name, command line, test script name, configuration file name, configuration file storage path, test report name, and test report storage path.

[0126] S811, generating a test plan according to software test basic data, configuration parameters of a test tool, test tool instructions and configuration parameters of a test plan.

[0127] S812, based on the software test management interface, obtain software test instructions; the software test instructions include a test solution identifier.

[0128] S813, determining a target test scheme corresponding to the test scheme identifier according to the correspondence between the test scheme and the test scheme identifier; the test scheme is a scheme generated based on the test parameters configured in the test scheme creation interface.

[0129] S814, perform software testing according to the target test plan and obtain a test report.

[0130] S815, based on the software test management interface, obtaining a report query instruction.

[0131] S816, jumping to the report query interface according to the report query instruction; the report query interface includes multiple options corresponding to query reports.

[0132] S817, obtaining a selection instruction based on the report query interface; the selection instruction includes a report identifier corresponding to at least one selected option.

[0133] S818, determining a target test report according to the report identifier.

[0134] S819, displaying the target test report according to the type of the target test report.

[0135] In the above software testing method, the software testing instruction is obtained based on the software testing management interface, and the target test scheme corresponding to the test scheme identifier is determined according to the correspondence between the test scheme and the test scheme identifier, and the software test is performed according to the target test scheme to obtain a test report. When the user needs to test the metering software, he makes a selection on different selection interfaces according to the test requirements, generates a target test scheme, and triggers the test instruction. The software testing system will automatically query the target test scheme according to the identifier in the test instruction, and automatically execute the software test according to the target test scheme. This method performs software testing based on the interface, which is intuitive and simple to operate, improves the test efficiency, does not require the user to have very professional testing skills, and therefore does not require a third-party testing agency to perform the test, thereby reducing costs.

[0136] It should be understood that although Figure 2-8 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-8 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0137] In one embodiment, Fig. 9 As shown, a software testing device is provided, including: an acquisition module 901, a determination module 902 and a testing module 903, wherein:

[0138] The acquisition module 901 is used to acquire software test instructions based on the software test management interface; the software test instructions include a test solution identifier;

[0139] Determination module 902, used to determine the target test scheme corresponding to the test scheme identifier according to the correspondence between the test scheme and the test scheme identifier; the test scheme is a scheme generated based on the test parameters configured in the test scheme creation interface;

[0140] The testing module 903 is used to perform software testing according to the target testing scheme and obtain a test report.

[0141] In this embodiment, the acquisition module obtains the software test instruction based on the software test management interface, and the determination module determines the target test plan corresponding to the test plan identifier according to the corresponding relationship between the test plan and the test plan identifier. The test module performs software testing according to the target test plan to obtain a test report. When the user needs to test the metering software, he makes a selection on different selection interfaces according to the test requirements, generates a target test plan, and triggers the test instruction. The software testing system will automatically query the target test plan according to the identifier in the test instruction, and automatically execute the software test according to the target test plan. This method performs software testing based on the interface, which is intuitive and simple to operate, improves the test efficiency, does not require the user to have very professional testing skills, and therefore does not require a third-party testing agency to perform the test, thereby reducing costs.

[0142] In one embodiment, Fig.10 As shown, the software testing device also includes:

[0143] The second acquisition module 101 is used to acquire software test basic data from the project file corresponding to the version control system;

[0144] The third acquisition module 102 is used to acquire configuration parameters of the test tool, test tool instructions, and configuration parameters of the test plan based on the test plan creation interface;

[0145] The generating module 103 is used to generate a test plan according to the software testing basic data, the configuration parameters of the test tool, the test tool instructions and the configuration parameters of the test plan.

[0146] Optionally, the second acquisition module is specifically used to obtain test scripts, driver data, and configuration files from a project file corresponding to the version control system.

[0147] In one embodiment, see Fig.10 As shown, the second acquisition module includes:

[0148] A first acquisition unit 1011 is used to acquire a test tool creation instruction based on the test solution creation interface;

[0149] A first jump unit 1012, configured to jump to a test tool configuration interface according to the test tool creation instruction;

[0150] The second acquisition unit 1013 is used to acquire the configuration parameters of the test tool based on the test tool configuration interface; the configuration parameters of the test tool include the test tool name, installation directory, and running operating system.

[0151] In one embodiment, see Fig.10 As shown, the second acquisition module includes:

[0152] A third acquisition unit 1014 is used to acquire a test instruction creation instruction based on the test scheme creation interface;

[0153] A second jump unit 1015, configured to jump to a test instruction configuration interface according to the test instruction creation instruction;

[0154] The fourth acquisition unit 1016 is used to acquire the configuration parameters of the test instruction based on the test instruction configuration interface; the configuration parameters of the test instruction include the name of the instruction, the name of the test tool, and the instruction line.

[0155] In one embodiment, see Fig.10 As shown, the second acquisition module includes:

[0156] A fifth acquisition unit 1017, configured to acquire a test plan creation instruction based on the test plan creation interface;

[0157] A third jump unit 1018, configured to jump to a test scheme configuration interface according to the test scheme creation instruction;

[0158] The sixth acquisition unit 1019 is used to obtain the configuration parameters of the test plan based on the test plan configuration interface; the configuration parameters of the test plan include the test plan name, instruction line, test script name, configuration file name, configuration file storage path, test report name, and test report storage path.

[0159] In one embodiment, see Fig.10 As shown, the software testing device also includes:

[0160] The fourth acquisition module 104 is used to acquire a report query instruction based on the software test management interface;

[0161] The jump module 105 is used to jump to the report query interface according to the report query instruction; the report query interface includes multiple options corresponding to the query report;

[0162] A fifth acquisition module 106 is used to acquire a selection instruction based on the report query interface; the selection instruction includes a report identifier corresponding to at least one selected option;

[0163] A second determination module 107, configured to determine a target test report according to a report identifier;

[0164] The display module 108 is used to display the target test report according to the type of the target test report.

[0165] For the specific definition of the software testing device, please refer to the definition of the testing device method above, which will not be repeated here. Each module in the above-mentioned testing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0166] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 1 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as test tools, operating instructions, and test plans. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a software testing method is implemented.

[0167] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0168] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0169] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0170] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0171] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0172] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A software testing method, characterized in that: The method is applied to a computer device including a software testing system and a version control system, and the method comprises: Based on the software testing management interface, obtaining software testing instructions; the software testing instructions include a testing scheme identifier; According to the correspondence between the test scheme and the test scheme identifier, determine the target test scheme corresponding to the test scheme identifier; the test scheme is a scheme generated based on the test parameters configured in the test scheme creation interface; Through the software testing system, software testing is performed according to the target testing scheme to obtain a test report; The software testing system is used to perform software testing according to the target testing scheme to obtain a test report, including: Through the software testing system, according to the storage path of the test tool in the target test scheme, the test tool under the corresponding storage path is searched, the test tool is called, and the test instruction started by the test tool is executed. After the test tool is started, according to the storage path of the test case, the test case under the storage path of the test case is searched, the test case is called, the instruction to run the test case is executed, the software test is performed, and the test report is generated; The target test scheme, the test tool and the test instruction are stored in the version control system, the software testing system is a system for testing related metrology software, and the version control system is a system for storing the test tool, the test instruction and the test scheme; The method further comprises: Acquire software testing basic data from the project file corresponding to the version control system; Based on the test scheme creation interface, obtain configuration parameters of the test tool, test tool instructions, and configuration parameters of the test scheme; Generate the test plan according to the software test basic data, the configuration parameters of the test tool, the test tool instructions and the configuration parameters of the test plan; The software testing basic data includes test scripts, driver data, and configuration files; The step of creating an interface based on the test scheme and obtaining configuration parameters of the test tool includes: Acquire a test tool creation instruction based on the test solution creation interface; Jump to the test tool configuration interface according to the test tool creation instruction; Acquiring configuration parameters of the test tool based on the test tool configuration interface; the configuration parameters of the test tool include the test tool name, installation directory, and running operating system; The step of creating an interface based on the test scheme and obtaining a test tool instruction includes: Acquire a test instruction creation instruction based on the test scheme creation interface; Create an instruction according to the test instruction to jump to the test instruction configuration interface; Acquire configuration parameters of the test instruction based on the test instruction configuration interface; the configuration parameters of the test instruction include a test instruction name, a test tool name, and an instruction line; The acquiring the configuration parameters of the test scheme based on the test scheme creation interface includes: Acquire a test plan creation instruction based on the test plan creation interface; Jump to the test plan configuration interface according to the test plan creation instruction; The configuration parameters of the test scheme are obtained based on the test scheme configuration interface; the configuration parameters of the test scheme include the test scheme name, instruction line, test script name, configuration file name, configuration file storage path, test report name, and test report storage path.

2. The method according to claim 1, characterized in that The software testing method further comprises: Based on the software test management interface, obtaining a report query instruction; Jump to the report query interface according to the report query instruction; the report query interface includes multiple options corresponding to the query report; Acquiring a selection instruction based on the report query interface; the selection instruction includes a report identifier corresponding to at least one selected option; Determine a target test report according to the report identifier; The target test report is displayed according to the type of the target test report.

3. A software testing device, characterized in that: The device includes a software testing system and a version control system, and the device also includes: An acquisition module, used to acquire software test instructions based on a software test management interface; the software test instructions include a test solution identifier; A determination module, used to determine a target test scheme corresponding to the test scheme identifier according to a correspondence between the test scheme and the test scheme identifier; the test scheme is a scheme generated based on the test parameters configured in the test scheme creation interface; A testing module, used to perform software testing according to the target testing scheme through the software testing system and obtain a test report; The software testing system is used to perform software testing according to the target testing scheme to obtain a test report, including: Through the software testing system, according to the storage path of the test tool in the target test scheme, the test tool under the corresponding storage path is searched, the test tool is called, and the test instruction started by the test tool is executed. After the test tool is started, according to the storage path of the test case, the test case under the storage path of the test case is searched, the test case is called, the instruction to run the test case is executed, the software test is performed, and the test report is generated; The target test scheme, the test tool and the test instruction are stored in the version control system, the software testing system is a system for testing related metrology software, and the version control system is a system for storing the test tool, the test instruction and the test scheme; The device also includes: A second acquisition module is used to acquire software test basic data from a project file corresponding to the version control system; A third acquisition module is used to acquire configuration parameters of the test tool, test tool instructions, and configuration parameters of the test scheme based on the test scheme creation interface; A generating module, configured to generate the test plan according to the software testing basic data, the configuration parameters of the test tool, the test tool instructions and the configuration parameters of the test plan; The software testing basic data includes test scripts, driver data, and configuration files; The step of creating an interface based on the test scheme and obtaining configuration parameters of the test tool includes: Acquire a test tool creation instruction based on the test solution creation interface; Jump to the test tool configuration interface according to the test tool creation instruction; Acquiring configuration parameters of the test tool based on the test tool configuration interface; the configuration parameters of the test tool include the test tool name, installation directory, and running operating system; The step of creating an interface based on the test scheme and obtaining a test tool instruction includes: Acquire a test instruction creation instruction based on the test scheme creation interface; Create an instruction according to the test instruction to jump to the test instruction configuration interface; Acquire configuration parameters of the test instruction based on the test instruction configuration interface; the configuration parameters of the test instruction include a test instruction name, a test tool name, and an instruction line; The acquiring the configuration parameters of the test scheme based on the test scheme creation interface includes: Acquire a test plan creation instruction based on the test plan creation interface; Jump to the test plan configuration interface according to the test plan creation instruction; The configuration parameters of the test scheme are obtained based on the test scheme configuration interface; the configuration parameters of the test scheme include the test scheme name, instruction line, test script name, configuration file name, configuration file storage path, test report name, and test report storage path.

4. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 2 are implemented.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.

Citation Information

Patent Citations

  • Application offline test method and tool

    CN107102949A

  • Test system and method for calling third-party test tools

    CN107291611A

  • Automatic testing method and device, computer equipment and storage medium

    CN108572919A

  • Metering automation terminal information security and reliability test method and system

    CN110427314A