CN118132435A - Test method, test device, computer equipment, readable storage medium and computer product - Google Patents

Test method, test device, computer equipment, readable storage medium and computer product Download PDF

Info

Publication number
CN118132435A
CN118132435A CN202410322090.XA CN202410322090A CN118132435A CN 118132435 A CN118132435 A CN 118132435A CN 202410322090 A CN202410322090 A CN 202410322090A CN 118132435 A CN118132435 A CN 118132435A
Authority
CN
China
Prior art keywords
test
target
tool
template
target test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410322090.XA
Other languages
Chinese (zh)
Inventor
韩雪峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202410322090.XA priority Critical patent/CN118132435A/en
Publication of CN118132435A publication Critical patent/CN118132435A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a testing method, a testing device, computer equipment, a readable storage medium and a product, and relates to the technical field of testing. The method comprises the following steps: displaying a test inlet when a system test instruction is received; the test inlet is integrated with the test sub-inlets corresponding to different test systems in advance; in response to a trigger operation of selecting a target test portal from among the test sub-portals, displaying a test tool configuration prompt and a test template configuration prompt for the target test portal; receiving a target test tool configured based on the test tool configuration hint, and a target test template configured based on the test template configuration hint; generating a test case of a target test system corresponding to a target test inlet based on the target test tool and the target test template; and testing the target test system according to the test case to obtain a test result corresponding to the target test system. By adopting the method, the test accuracy can be improved.

Description

Test method, test device, computer equipment, readable storage medium and computer product
Technical Field
The present application relates to the field of testing technology, and in particular, to a testing method, apparatus, computer device, readable storage medium, and product.
Background
System testing is an important means of ensuring system quality, with the goal of ensuring that a deliverable system is free of defects. The method mainly tests the system to be tested or the software to be tested under the preset condition to find out the system errors, so that the iterative optimization is carried out on the system to improve the system performance.
Considering the bulkiness of the system, the implementation scheme of the existing system test is usually completed by writing test cases of each test module in the system by a developer corresponding to the test module. However, this approach tends to result in too scattered test cases being written, resulting in insufficient overall system testing and, in turn, lower test accuracy.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a test method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve test accuracy.
In a first aspect, the present application provides a test method. The method comprises the following steps: displaying a test inlet when a system test instruction is received; the test inlet is integrated with the test sub-inlets corresponding to different test systems in advance; in response to a trigger operation of selecting a target test portal from among the test sub-portals, displaying a test tool configuration prompt and a test template configuration prompt for the target test portal; receiving a target test tool configured based on the test tool configuration hint, and a target test template configured based on the test template configuration hint; generating a test case of a target test system corresponding to a target test inlet based on the target test tool and the target test template; and testing the target test system according to the test case to obtain a test result corresponding to the target test system.
In one embodiment, displaying a test tool configuration prompt for a target test entry includes: under the condition that an initial test template is not configured in a target test system corresponding to the target test inlet, obtaining a test requirement corresponding to the target test system; based on the test requirement, performing scene matching on the target test system to obtain a plurality of test scenes corresponding to the target test system; and constructing a candidate test template corresponding to each test scene, and displaying a test template configuration prompt containing each candidate test template.
In one embodiment, displaying a test template configuration hint for a target test entry includes: under the condition that an initial test tool is not configured in a target test system corresponding to the target test inlet, acquiring test parameters corresponding to each test scene; according to the test parameters, respectively carrying out test tool matching on each test scene to obtain candidate test tools corresponding to each test scene; a test tool configuration prompt is displayed containing each candidate test tool.
In one embodiment, before the step of displaying the test tool configuration hint and the test template configuration hint for the target test entry, further comprising: responding to the triggering operation of selecting a target test inlet from all the test sub-inlets, and performing template configuration detection on a target test system corresponding to the target test inlet to obtain a template configuration detection result corresponding to the target test system; the template configuration detection result is used for indicating whether the target test entrance is preconfigured with the initial test template.
In one embodiment, before the step of displaying the test tool configuration hint and the test template configuration hint for the target test entry, further comprising: responding to the triggering operation of selecting a target test inlet from all test sub-inlets, and carrying out tool configuration detection on a target test system to obtain a tool configuration detection result corresponding to the target test system; the tool configuration detection result is used for indicating whether the target test entry is preconfigured with the initial test tool.
In one embodiment, according to the test parameters, performing test tool matching on each test scene to obtain candidate test tools corresponding to each test scene, including: parameter constraint information among all the test parameters is acquired, and the respective corresponding test intensity of each test scene is determined based on the parameter constraint information; and matching the candidate test tools corresponding to each test scene in the test tool library according to the test intensity.
In one embodiment, after the step of obtaining the test result corresponding to the target test system, the method further includes: acquiring the corresponding fault detection rate, statement coverage rate and effective execution time of the test case in the running process; and optimizing the test case based on the fault detection rate, the statement coverage rate and the effective execution time to obtain the optimized test case.
In one embodiment, generating a test case of a target test system corresponding to a target test entry based on a target test tool and a target test template includes: determining a test flow corresponding to a target test tool according to a test requirement corresponding to a target test system; and adding the test flow and the target test template into a preset test case frame to generate a test case corresponding to the target test system.
In a second aspect, the application further provides a testing device. The device comprises: the starting inlet module is used for displaying a test inlet when a system test instruction is received; the test inlet is integrated with the test sub-inlets corresponding to different test systems in advance; the configuration prompt module is used for responding to the triggering operation of selecting a target test entry from all the test sub-entries and displaying a test tool configuration prompt and a test template configuration prompt aiming at the target test entry; the receiving module is used for receiving a target test tool configured based on the test tool configuration prompt and a target test template configured based on the test template configuration prompt; the case generation module is used for generating a test case of the target test system corresponding to the target test inlet based on the target test tool and the target test template; and the system test module is used for testing the target test system according to the test cases to obtain a test result corresponding to the target test system.
In one embodiment, the apparatus further comprises: the requirement acquisition module is used for acquiring the test requirement corresponding to the target test system under the condition that the target test system corresponding to the target test inlet indicates that the initial test template is not configured; the scene matching module is used for performing scene matching on the target test system based on the test requirement to obtain a plurality of test scenes corresponding to the target test system; the template construction module is used for constructing candidate test templates corresponding to each test scene and displaying test template configuration prompts containing the candidate test templates.
In one embodiment, the apparatus further comprises: the parameter acquisition module is used for acquiring the test parameters corresponding to each test scene under the condition that the initial test tool is not configured in the target test system corresponding to the target test inlet; the tool matching module is used for respectively carrying out test tool matching on each test scene according to the test parameters to obtain candidate test tools corresponding to each test scene; and the tool configuration prompt module is used for displaying the test tool configuration prompt containing each candidate test tool.
In one embodiment, the configuration hint module further comprises: the template configuration detection module is used for responding to the triggering operation of selecting a target test inlet from all the test sub-inlets, and carrying out template configuration detection on a target test system corresponding to the target test inlet to obtain a template configuration detection result corresponding to the target test system; the template configuration detection result is used for indicating whether the target test entrance is preconfigured with the initial test template.
In one embodiment, the configuration hint module further comprises: the tool configuration detection module is used for responding to the triggering operation of selecting a target test entry from all the test sub-entries, and carrying out tool configuration detection on the target test system to obtain a tool configuration detection result corresponding to the target test system; the tool configuration detection result is used for indicating whether the target test entry is preconfigured with the initial test tool.
In one embodiment, the tool matching module further comprises: the intensity detection module is used for acquiring parameter constraint information among the test parameters and determining the test intensity corresponding to each test scene based on the parameter constraint information; and the tool matching module is used for matching the candidate test tools corresponding to each test scene in the test tool library according to the test intensity.
In one embodiment, the apparatus further comprises: the information acquisition module is used for acquiring the corresponding fault detection rate, statement coverage rate and effective execution time of the test case in the running process; the case optimizing module is used for optimizing the test case based on the fault detection rate, the statement coverage rate and the effective execution time to obtain the optimized test case.
In one embodiment, the use case generation module is further configured to: determining a test flow corresponding to a target test tool according to a test requirement corresponding to a target test system; and adding the test flow and the target test template into a preset test case frame to generate a test case corresponding to the target test system.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of: displaying a test inlet when a system test instruction is received; the test inlet is integrated with the test sub-inlets corresponding to different test systems in advance; in response to a trigger operation of selecting a target test portal from among the test sub-portals, displaying a test tool configuration prompt and a test template configuration prompt for the target test portal; receiving a target test tool configured based on the test tool configuration hint, and a target test template configured based on the test template configuration hint; generating a test case of a target test system corresponding to a target test inlet based on the target test tool and the target test template; and testing the target test system according to the test case to obtain a test result corresponding to the target test system.
In a fourth aspect, the present application also provides a computer-readable storage medium. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of: displaying a test inlet when a system test instruction is received; the test inlet is integrated with the test sub-inlets corresponding to different test systems in advance; in response to a trigger operation of selecting a target test portal from among the test sub-portals, displaying a test tool configuration prompt and a test template configuration prompt for the target test portal; receiving a target test tool configured based on the test tool configuration hint, and a target test template configured based on the test template configuration hint; generating a test case of a target test system corresponding to a target test inlet based on the target test tool and the target test template; and testing the target test system according to the test case to obtain a test result corresponding to the target test system.
In a fifth aspect, the present application also provides a computer program product. Computer program product comprising a computer program which, when executed by a processor, realizes the steps of: displaying a test inlet when a system test instruction is received; the test inlet is integrated with the test sub-inlets corresponding to different test systems in advance; in response to a trigger operation of selecting a target test portal from among the test sub-portals, displaying a test tool configuration prompt and a test template configuration prompt for the target test portal; receiving a target test tool configured based on the test tool configuration hint, and a target test template configured based on the test template configuration hint; generating a test case of a target test system corresponding to a target test inlet based on the target test tool and the target test template; and testing the target test system according to the test case to obtain a test result corresponding to the target test system.
According to the testing method, the testing device, the computer equipment, the computer readable storage medium and the computer program product, when the system testing instruction is received, the testing inlets which are integrated with the testing sub-inlets corresponding to the different testing systems in advance are started, and the testing inlets of the testing systems are integrated at the unified inlet, so that the subsequently generated test cases can be prevented from being scattered. And then, responding to the triggering operation of the operation object to select a target test entry from all test sub-entries, and displaying a test tool configuration prompt and a test template configuration prompt aiming at the target test entry on a front-end interface of the system so as to prompt the operation object to configure a test tool and a test template, so that the operation object can acquire test cases meeting actual requirements. When a target test tool of which the operation object is configured based on the test tool configuration prompt and a target test template of which the configuration is based on the test template configuration prompt are received, according to the target test tool and the target test template, a test case of a target test system corresponding to a target test inlet is generated, and the obtained test case is more accurate. And finally, running the test case to test the target test system to obtain a test result corresponding to the target test system. On one hand, the application does not need to manually write the test cases by a developer, thereby improving the test efficiency. On the other hand, the test system and the test template are configured by integrating the test inlets of the test systems at the same inlet, so that test cases are generated by configuring the test tools and configuring the test templates of the test systems at the inlet, the dispersion of the test cases is effectively avoided, the whole test is more comprehensive and full, and the test accuracy is improved.
Drawings
FIG. 1 is a schematic diagram of an application scenario of a test method in one embodiment;
FIG. 2 is a flow chart of a test method in one embodiment;
FIG. 3 is a schematic diagram of test template construction in one embodiment;
FIG. 4 is a flow diagram of test tool matching in one embodiment;
FIG. 5 is another flow diagram of test tool matching in one embodiment;
FIG. 6 is a flow diagram of test case optimization in one embodiment;
FIG. 7 is another flow diagram of a test method in one embodiment;
FIG. 8 is a block diagram of a test apparatus in one embodiment;
fig. 9 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party.
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The test method provided by the embodiment of the disclosure can be applied to an application environment as shown in fig. 1. Including test engine 102 and terminal 104, test engine 102 communicates with terminal 104. Specifically, when the test engine 102 receives a system test instruction initiated by an operation object through the terminal 104, a test entry pre-integrated with test sub-entries corresponding to different test systems is displayed on an interface of the terminal 106, then the test engine 102 responds to a trigger operation that the operation object selects a target test entry from the test sub-entries on the interface of the terminal 104, and a test tool configuration prompt and a test template configuration prompt for the target test entry are displayed on the interface of the terminal 104. After the configuration of the interface of the terminal 104 is completed by the operation object, the test engine 102 receives the target test tool and the target test template sent by the terminal 104, and generates a test case of the target test system corresponding to the target test inlet based on the target test tool and the target test template, so that the test engine 102 tests the target test system according to the test case to obtain a test result corresponding to the target test system.
The test engine 102 may be developed by shell (Shell Script) scripts, and may be implemented under a Linux (operating system kernel) server, so that the test engine may be deployed in a Linux operating system. The terminal 104 may be, but is not limited to, various desktop computers, notebook computers, smart phones, tablet computers, internet of things devices.
In one embodiment, as shown in fig. 2, a test method is provided, and the test engine 102 in fig. 1 is taken as an example for illustrating the application of the method, and the method includes the following steps:
Step S202, when a system test instruction is received, a test entry is displayed; the test inlet is integrated with the test sub-inlets corresponding to different test systems in advance.
The system test instruction may be an instruction for instructing a system test, and the instruction may be used to trigger display of a test entry. The test inlet may refer to an inlet for performing system test, where the inlet is a unified inlet, and is pre-integrated with test inlets corresponding to different test systems, that is, test sub-inlets, and through triggering operation of the test sub-inlets, test configuration can be performed on the test systems and corresponding test cases can be generated.
In an example, the test system may refer to a business system, or may refer to each subunit system in the business system. Test systems may include, but are not limited to, hvps (High Value PAYMENT SYSTEM, high real-time payment system), beps (Bulk Electronic PAYMENT SYSTEM, low Bulk payment system), saps (SETTLEMENT ACCOUNT PROCESSING SYSTEM, clearing account management system), ccms (Customer Communications MANAGEMENT SYSTEM, customer communication management system), and the like.
In particular, the test engine is deployed in a test server, such as a Linux server, which may communicate with the terminal. When an operation object of the terminal initiates a system test instruction by clicking a system test control or other triggering operations on a terminal interface, the terminal sends the system test instruction to a test server, and the test service can start a test engine to execute a subsequent system test flow. The test engine sends the test entry to the terminal for the terminal to display on the interface, and the test entry may be a popup window, a page, or even a link, and the specific test entry form is not limited herein and may be set according to practical situations. The test entry is integrated with the test sub-entries corresponding to the test systems in advance, so that an operation object can test different test systems through one unified test entry, and the problem that the test is incomplete due to the dispersion of finally obtained test cases and the accuracy of the test is affected is avoided. In an example, the test portals may be displayed simultaneously with each test sub-portal when displayed, or may be displayed after clicking on the test portal.
In step S204, in response to a trigger operation of selecting a target test entry from the test sub-entries, a test tool configuration prompt and a test template configuration prompt for the target test entry are displayed.
The target test entry may refer to a test entry corresponding to a target test system to be tested. The test tool configuration prompt may be a test tool for prompting the operation object to configure the target test system for testing, and the test template configuration may be a test template for prompting the operation object to configure the target test system for testing.
In an example, the test templates may include test case templates, and may also include presentation templates of final test results.
Specifically, when the test engine monitors that the operation object selects the triggering operation of the target test entry in each test sub-entry, a test tool configuration prompt and a test template configuration prompt aiming at the target test entry are created, so that the operation object can flexibly configure a test tool and a test template when the target test system is tested. It will be appreciated that either the test tool configuration prompt or the test template configuration prompt may be displayed on the terminal interface in the form of a pop-up window or an inquiry command, etc.
In an embodiment, the test engine may detect in advance whether the target test system corresponding to the target test entry is configured with a test template and/or a test tool in advance, and if the test system is configured with the test template and/or the test tool, the prompt content may be "whether the system is configured with the test template and/or the test tool and is used" or not, and if the operation object clicks the use button, the test engine may directly generate a test case according to the configured test template and/or the test tool. If the operation object clicks the unused button, further prompting to inquire whether the operation object is self-configured, if the operation object clicks the self-configuration, prompting a proper test template and/or test tool to the operation object so that the operation object can select the required test template and/or test tool by itself, and if the operation object does not use the configured test template and/or test tool and does not need the self-configuration, closing the dialogue and ending the test. In the case that the target test system is not configured with the test template and/or the test tool, the prompt content may be "" whether the system is configured with the test template and/or the test tool by itself, and the subsequent steps are the same as those described above, and will not be repeated here.
In one embodiment, the test engine may screen appropriate test tools and test templates according to the test requirements of the target test system and prompt the operation object for the operation object to select by itself.
Step S206, receiving a target test tool configured based on the test tool configuration prompt, and a target test template configured based on the test template configuration prompt.
The target test tool may refer to a tool for testing a target test system, including but not limited to a Junit (unit test framework), a TestNG (Testing Next Generation, next generation test framework), which has a stronger and concise function and is suitable for functional testing and automation testing, and Jmeter (Apache JMeter, pressure test tool), which is an open source free tool suitable for pressure performance testing, etc. The target test template can comprise a template for generating test cases, and can also comprise a template for displaying test results.
Specifically, the test engine receives a target test tool configured by the operation object based on the test tool configuration prompt, and in an example, the target test tool can be one or a plurality of tools used in combination, and can be specifically set according to actual requirements. And receiving a target test template configured by the operation object based on the test template configuration prompt.
Step S208, based on the target test tool and the target test template, generating a test case of the target test system corresponding to the target test entry.
The test case may refer to description of a test task performed on a target test system, and may embody contents such as a test object, a test scheme, a test tool, a test template, input data, an expected result, and the like.
Specifically, after the test engine obtains the target test tool and the target test template configured by the operation object, the test case of the target test system can be generated after the target test tool and the target test target are processed.
In an embodiment, the test engine may obtain a test requirement of the target test system, determine a test flow corresponding to the target test tool according to the test requirement, and add the test flow and the target test template into a preset test case frame, where the test case frame may refer to an architecture of the whole test process, so as to generate a test case corresponding to the target test system.
Step S210, testing the target test system according to the test cases to obtain a test result corresponding to the target test system.
The test result may be a result obtained after the target test system is tested, and includes, but is not limited to, a function test result, that is, whether a function is normally completed, response time, and a concurrency condition, that is, whether a system crashes or responds with delay, a system load, and the like when a certain number of use objects are online at the same time.
Specifically, after the test engine generates the test case, the test script corresponding to the test case can be directly operated, so that the target test system is tested, and the functional test result, response time, concurrency condition, system load and other test results of the target test system in the test process are obtained.
In this embodiment, when a system test instruction is received, test inlets which are integrated with test sub-inlets corresponding to different test systems in advance are started, and by integrating the test inlets of each test system at a unified inlet, the subsequently generated test cases can be prevented from being scattered. And then, responding to the triggering operation of the operation object to select a target test entry from all test sub-entries, and displaying a test tool configuration prompt and a test template configuration prompt aiming at the target test entry on a front-end interface of the system so as to prompt the operation object to configure a test tool and a test template, so that the operation object can acquire test cases meeting actual requirements. When a target test tool of which the operation object is configured based on the test tool configuration prompt and a target test template of which the configuration is based on the test template configuration prompt are received, according to the target test tool and the target test template, a test case of a target test system corresponding to a target test inlet is generated, and the obtained test case is more accurate. And finally, running the test case to test the target test system to obtain a test result corresponding to the target test system. On one hand, the application does not need to manually write the test cases by a developer, thereby improving the test efficiency. On the other hand, the test system and the test template are configured by integrating the test inlets of the test systems at the same inlet, so that test cases are generated by configuring the test tools and configuring the test templates of the test systems at the inlet, the dispersion of the test cases is effectively avoided, the whole test is more comprehensive and full, and the test accuracy is improved.
In one embodiment, as shown in FIG. 3, a test tool configuration prompt for a target test entry is displayed, comprising:
Step S302, under the condition that an initial test template is not configured in a target test system corresponding to a target test inlet, test requirements corresponding to the target test system are obtained.
The test requirement may refer to requirement information for performing a system test on the target test system, such as a system unit to be tested, a function to be tested, a test index, and the like.
Specifically, when the test engine detects that the target test system is not configured with the initial test template in advance, the operation object is required to perform custom template configuration. Therefore, the test engine can firstly acquire the test requirement of the target test system, namely the system unit to be tested, the function to be tested, the test index and the like, so as to carry out subsequent template configuration prompt.
In an example, the test requirement may be obtained from the test server, or may be prompted to the operation object to receive the test requirement uploaded by the operation object, so as to obtain the test requirement more accurately.
Step S304, based on the test requirement, performing scene matching on the target test system to obtain a plurality of test scenes corresponding to the target test system.
The test scenario may refer to various service scenarios that the target test system performs a test, such as a request receiving scenario, a request real-time sending scenario, and a request batch sending scenario.
After the test engine obtains the test requirement of the target test system, the test engine can be matched with a plurality of suitable test scenes for the target test system according to the test requirement. For example, if the function to be tested of the target test system includes a receiving function, a request receiving scene may be set for the target test engine, or other information or data receiving scenes may be set, and in particular, setting may be performed according to actual requirements.
Step S306, constructing a candidate test template corresponding to each test scene, and displaying a test template configuration prompt containing each candidate test template.
The candidate test templates may refer to templates that match each test scenario.
Specifically, the test engine constructs a corresponding candidate test template for each test scene, and it can be understood that there may be one candidate test template or a plurality of candidate test templates, for example, a simple template, a detailed template, or a template in a thinking pattern may be constructed according to a template style, and the candidate test templates are packaged in prompt information and displayed on a terminal interface, and the operation object selects a required template by itself.
In this embodiment, under the condition that the initial test template is not preconfigured by the target test system, the test engine performs scene matching according to the test requirement of the target test system to obtain a plurality of test scenes of the target test system, so as to construct candidate test templates corresponding to each test scene, display the candidate test templates on the terminal interface, and automatically select the required templates by the operation object, so that the configuration of the test templates can be more fit with the actual requirement, the flexibility and accuracy of the configuration of the test templates are improved, and the flexibility and accuracy of the whole test process are further improved.
In one embodiment, as shown in FIG. 4, a test template configuration hint for a target test entry is displayed, comprising:
Step S402, under the condition that the initial test tool is not configured in the target test system corresponding to the target test inlet, the test parameters corresponding to each test scene are obtained.
The test parameters may refer to test parameters when a system test is performed in each test scenario, and include, but are not limited to, the number of concurrent objects that interact with a target test system at the same time, the number of associated parameters, test time, testers, request receiving frequency, request sending frequency, and the number of request batch sending.
Specifically, when the test engine detects that the target test system is not configured with the initial test tool, the test engine can acquire the test parameters of the target test system when the target test system is tested in each test scene, so that the test engine can match the appropriate test tool for each test scene according to the test parameters.
Step S404, according to the test parameters, respectively carrying out test tool matching on each test scene to obtain candidate test tools corresponding to each test scene.
Specifically, after the test engine obtains the test parameters corresponding to each test scenario, the test engine may match appropriate candidate test tools in a preset test tool library based on the test parameters.
In one example, there may be multiple matched candidate test tools per test scenario, and the operator may select a test tool of the cardiometer from among the multiple matched candidate test tools. Of course, there may be only one candidate test tool, and this may be determined according to the actual matching situation.
In step S406, a test tool configuration prompt including each candidate test tool is displayed.
Specifically, the test engine displays each candidate test tool on the terminal interface to perform test tool configuration prompt, i.e. prompt an operator to select a target test tool from among the candidate test tools.
In an example, the operator may also add new test tools by himself, or may select multiple target test tools to use in combination.
In this embodiment, according to the test parameters of each test scenario, suitable candidate test tools are matched for each test scenario, so as to recommend suitable candidate test tools to operators, and usability and suitability of the test tools are improved, so that the accuracy of the test is further improved.
In one embodiment, prior to the step of displaying the test tool configuration hint and the test template configuration hint for the target test entry, further comprising: and responding to the triggering operation of selecting the target test entrance from the test sub-entrances, and performing template configuration detection on the target test system corresponding to the target test entrance to obtain a template configuration detection result corresponding to the target test system.
The template configuration detection result is used for indicating whether the target test entrance is preconfigured with an initial test template. The initial test template may be a test template configured in advance for a target test system corresponding to the target test entry, may be a default test template, or may be a test template stored after the last configuration.
Specifically, the test engine responds to the triggering operation of selecting a target test entry from all test sub-entries by an operation object, and performs template configuration detection on a target test system corresponding to the target test entry, namely, detects whether the target test system is pre-configured with an initial test template, so as to obtain a template configuration detection result corresponding to the target test system, wherein the template configuration detection result can comprise an initial test template configured and an initial test template not configured.
In an example, the test engine may determine whether the target test system is configured with an initial test template by obtaining a template configuration identifier of the target test system, where the template configuration identifier may be a unique identifier for identifying a test template configuration condition of the target test system, for example, when the identifier is 1, it may be considered that the initial test template is configured, and when the identifier is 0, it may be considered that the initial test template is not configured. It should be noted that the template configuration identifier may set other values or letters to identify the test template configuration, and is not limited to the above examples.
In one embodiment, prior to the step of displaying the test tool configuration hint and the test template configuration hint for the target test entry, further comprising: and responding to the triggering operation of selecting the target test entry from the test sub-entries, and carrying out tool configuration detection on the target test system to obtain a tool configuration detection result corresponding to the target test system.
The tool configuration detection result is used for indicating whether the target test entrance is preconfigured with an initial test tool. The initial test tool may be a test tool configured in advance for the target test system corresponding to the target test entry, may be a default test tool, or may be a test tool stored after being configured last time.
Specifically, the test engine performs tool configuration detection on the target test system corresponding to the target test inlet, that is, detects whether the target test system is configured with an initial test tool in advance, and obtains a tool configuration detection result corresponding to the target test system, where the tool configuration detection result may include configuration of the initial test tool and non-configuration of the initial test tool.
In an example, the test engine may also determine whether the target test system is configured with an initial test tool according to the tool configuration identifier of the target test system, and the specific process may refer to the upper template configuration identifier, which is not described herein.
In an example, the detection order for the template configuration detection and the tool configuration detection is not limited to the above order, and detection may be performed simultaneously.
In this embodiment, before performing configuration prompt, template configuration detection and tool configuration detection are performed on the target test system to determine whether the target test system is preconfigured with an initial test template and/or an initial test tool, so that targeted configuration prompt is performed, and test efficiency and flexibility are further improved.
In an embodiment, as shown in fig. 5, according to the test parameters, performing test tool matching on each test scene to obtain candidate test tools corresponding to each test scene, including:
Step S502, parameter constraint information among the test parameters is obtained, and the test intensity corresponding to each test scene is determined based on the parameter constraint information.
The parameter constraint information may refer to constraint conditions among the test parameters, for example, when a certain operation is performed on the parameter a, the value of the parameter B may be affected.
Specifically, the test engine may first obtain the associated parameters that have an association relationship with each test parameter, so as to analyze constraint conditions between the test parameter and the associated parameters, such as a value constraint or an execution constraint, such as an execution parameter a, cannot execute a parameter B. And according to the constraint conditions, carrying out test intensity analysis on each test scene, namely judging the intensity of each test scene when carrying out system test according to the constraint conditions, wherein the more the constraint conditions are, the more complex the test scene is, the higher the test intensity is, and the lower the test intensity is otherwise.
Step S504, according to the test intensity, matching the candidate test tools corresponding to each test scene in the test tool library.
The test tool library may be a library for storing each preliminary test tool.
Specifically, after the test engine calculates the test intensity corresponding to each test scene, candidate test tools matched with the test intensity are selected from the test tool library, for example, if the test intensity is high, the candidate test tools capable of performing high-intensity test are matched in the test tool library.
In this embodiment, the test strength corresponding to each test scenario is determined according to the parameter constraint condition between the test parameters, so that a suitable candidate test tool is matched for each test scenario, the accuracy of the test tool is improved, and the accuracy of the test is further improved.
In one embodiment, as shown in fig. 6, after the step of obtaining the test result corresponding to the target test system, the method further includes:
Step S602, obtaining the corresponding fault detection rate, statement coverage and effective execution time of the test case in the running process.
Step S604, optimizing the test case based on the fault detection rate, the statement coverage rate and the effective execution time to obtain the optimized test case.
The failure detection rate may refer to an average accumulated proportion of system defects detected during the execution of the test case. Statement coverage may refer to the ratio of the number of executable statements used to execute a test case to the number of total executable statements. The effective execution time may refer to the total execution time when the failure detection rate and statement coverage of the test case reach the maximum.
Specifically, the test engine can count the fault detection rate, the statement coverage rate and the effective execution time of the test cases in the running process, optimize the test cases according to the fault detection rate, the statement coverage rate and the effective execution time, optimize the test templates, optimize the test tools and optimize the test parameters to obtain more perfect test cases, further update the current test cases of the target test system into optimized test cases, and directly call the optimized test cases for testing when the target test system is tested later, thereby improving the test accuracy.
In the embodiment, the test cases are optimized by collecting the related indexes of the test cases in the running process, so that the test can be conveniently performed on the target test system later by using the optimized test cases, and the accuracy of the subsequent test is improved.
In a specific embodiment, the test flow of the test method further includes:
S1: when the test engine receives a system test instruction, a test inlet is displayed, and the test inlet is integrated with test sub-inlets corresponding to different test systems in advance.
S2: in response to a trigger operation of selecting a target test entry from the test sub-entries by an operation object, the test engine detects whether a target test system corresponding to the target test entry is preconfigured with an initial test template, and detects whether the target test system is preconfigured with an initial test tool.
S3: under the condition that the initial test template is not configured in advance by the target test system, the test requirement corresponding to the target test system is acquired, and scene matching is carried out on the target test system based on the test requirement, so that a plurality of test scenes corresponding to the target test system are obtained. With further reference to fig. 8, a test template mapping relation table may be preconfigured at the test entrance, each candidate test template may be stored in a test template mapping relation table, and the test template mapping relation table is configured at the test entrance to perform test template configuration prompt on the operation object.
S4: under the condition that the initial test tool is not configured in the target test system, the test parameters corresponding to each test scene are acquired, parameter constraint information among the test parameters is acquired, the test intensity corresponding to each test scene is determined based on the parameter constraint information, and accordingly candidate test tools corresponding to each test scene are matched in a test tool library according to the test intensity, and test tool configuration prompts are displayed based on the candidate test tools.
S5: the test engine receives the target test tool configured by the operation object based on the test tool configuration prompt, and the target test template configured by the test template configuration prompt, in an example, as shown in fig. 7, the target test tool and the target test template may be stored in a configuration file, the terminal sends the configuration file to the test engine, and the test causes the configuration file to be parsed, thereby obtaining the target test tool and the target test template. And determining a test flow corresponding to the target test tool according to the test requirement, so that the test flow and the target test template are added into a preset test case frame to generate a test case corresponding to the target test system.
S6: the test engine tests the target test system according to the test cases, as shown in fig. 7, the test process may be to reorganize and verify the messages generated in each test scene, and call the test interface, so as to finally obtain the test result corresponding to the target test system.
S7: the test engine obtains the corresponding fault detection rate, statement coverage rate and effective execution time of the test case in the running process, and optimizes the test case based on the fault detection rate, the statement coverage rate and the effective execution time to obtain the optimized test case.
In this embodiment, when a system test instruction is received, test inlets which are integrated with test sub-inlets corresponding to different test systems in advance are started, and by integrating the test inlets of each test system at a unified inlet, the subsequently generated test cases can be prevented from being scattered. And then, responding to the triggering operation of the operation object to select a target test entry from all test sub-entries, and displaying a test tool configuration prompt and a test template configuration prompt aiming at the target test entry on a front-end interface of the system so as to prompt the operation object to configure a test tool and a test template, so that the operation object can acquire test cases meeting actual requirements. When a target test tool of which the operation object is configured based on the test tool configuration prompt and a target test template of which the configuration is based on the test template configuration prompt are received, according to the target test tool and the target test template, a test case of a target test system corresponding to a target test inlet is generated, and the obtained test case is more accurate. And finally, running the test case to test the target test system to obtain a test result corresponding to the target test system. On one hand, the application does not need to manually write the test cases by a developer, thereby improving the test efficiency. On the other hand, the test system and the test template are configured by integrating the test inlets of the test systems at the same inlet, so that test cases are generated by configuring the test tools and configuring the test templates of the test systems at the inlet, the dispersion of the test cases is effectively avoided, the whole test is more comprehensive and full, and the test accuracy is improved.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a testing device for realizing the testing method. The implementation of the solution provided by the device is similar to that described in the above method, so the specific limitations of one or more embodiments of the testing device provided below may be referred to above for limitations of the testing method, and will not be repeated here.
In one embodiment, as shown in FIG. 8, there is provided a test apparatus comprising: a start-up entry module 802, configured to display a test entry when a system test instruction is received; the test inlet is integrated with the test sub-inlets corresponding to different test systems in advance; a configuration prompt module 804, configured to display a test tool configuration prompt and a test template configuration prompt for a target test portal in response to a trigger operation of selecting the target test portal from the test sub-portals; a receiving module 806 for receiving a target test tool configured based on the test tool configuration hint, and a target test template configured based on the test template configuration hint; the case generation module 908 is configured to generate a test case of the target test system corresponding to the target test entry based on the target test tool and the target test template; and the system testing module 810 is configured to test the target testing system according to the test case, so as to obtain a testing result corresponding to the target testing system.
In one embodiment, the apparatus further comprises: the requirement acquisition module is used for acquiring a test requirement corresponding to the target test system under the condition that the template configuration detection result indicates that the initial test template is not configured; the scene matching module is used for performing scene matching on the target test system based on the test requirement to obtain a plurality of test scenes corresponding to the target test system; the template construction module is used for constructing candidate test templates corresponding to each test scene and displaying test template configuration prompts containing the candidate test templates.
In one embodiment, the apparatus further comprises: the parameter acquisition module is used for acquiring the test parameters corresponding to each test scene under the condition that the tool configuration detection result indicates that the initial test tool is not configured; the tool matching module is used for respectively carrying out test tool matching on each test scene according to the test parameters to obtain candidate test tools corresponding to each test scene; and the tool configuration prompt module is used for displaying the test tool configuration prompt containing each candidate test tool.
In one embodiment, the configuration hint module 804 further includes: the template configuration detection module is used for responding to the triggering operation of selecting a target test inlet from all the test sub-inlets, and carrying out template configuration detection on a target test system corresponding to the target test inlet to obtain a template configuration detection result corresponding to the target test system; the template configuration detection result is used for indicating whether the target test entrance is preconfigured with the initial test template.
In one embodiment, the configuration hint module 804 further includes: the tool configuration detection module is used for responding to the triggering operation of selecting a target test entry from all the test sub-entries, and carrying out tool configuration detection on the target test system to obtain a tool configuration detection result corresponding to the target test system; the tool configuration detection result is used for indicating whether the target test entry is preconfigured with the initial test tool.
In one embodiment, the tool matching module further comprises: the intensity detection module is used for acquiring parameter constraint information among the test parameters and determining the test intensity corresponding to each test scene based on the parameter constraint information; and the tool matching module is used for matching the candidate test tools corresponding to each test scene in the test tool library according to the test intensity.
In one embodiment, the apparatus further comprises: the information acquisition module is used for acquiring the corresponding fault detection rate, statement coverage rate and effective execution time of the test case in the running process; the case optimizing module is used for optimizing the test case based on the fault detection rate, the statement coverage rate and the effective execution time to obtain the optimized test case.
In one embodiment, the use case generation module is further configured to: determining a test flow corresponding to a target test tool according to a test requirement corresponding to a target test system; and adding the test flow and the target test template into a preset test case frame to generate a test case corresponding to the target test system.
The various modules in the test apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 9. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured 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, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing item recommendation data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a test method.
It will be appreciated by persons skilled in the art that the architecture shown in fig. 9 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting as to the computer device to which the present inventive arrangements are applicable, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: displaying a test inlet when a system test instruction is received; the test inlet is integrated with the test sub-inlets corresponding to different test systems in advance; in response to a trigger operation of selecting a target test portal from among the test sub-portals, displaying a test tool configuration prompt and a test template configuration prompt for the target test portal; receiving a target test tool configured based on the test tool configuration hint, and a target test template configured based on the test template configuration hint; generating a test case of a target test system corresponding to a target test inlet based on the target test tool and the target test template; and testing the target test system according to the test case to obtain a test result corresponding to the target test system.
In one embodiment, the processor when executing the computer program further performs the steps of: under the condition that an initial test template is not configured in a target test system corresponding to the target test inlet, obtaining a test requirement corresponding to the target test system; based on the test requirement, performing scene matching on the target test system to obtain a plurality of test scenes corresponding to the target test system; and constructing a candidate test template corresponding to each test scene, and displaying a test template configuration prompt containing each candidate test template.
In one embodiment, the processor when executing the computer program further performs the steps of: under the condition that an initial test tool is not configured in a target test system corresponding to the target test inlet, acquiring test parameters corresponding to each test scene; according to the test parameters, respectively carrying out test tool matching on each test scene to obtain candidate test tools corresponding to each test scene; a test tool configuration prompt is displayed containing each candidate test tool.
In one embodiment, the processor when executing the computer program further performs the steps of: responding to the triggering operation of selecting a target test inlet from all the test sub-inlets, and performing template configuration detection on a target test system corresponding to the target test inlet to obtain a template configuration detection result corresponding to the target test system; the template configuration detection result is used for indicating whether the target test entrance is preconfigured with the initial test template.
In one embodiment, the processor when executing the computer program further performs the steps of: responding to the triggering operation of selecting a target test inlet from all test sub-inlets, and carrying out tool configuration detection on a target test system to obtain a tool configuration detection result corresponding to the target test system; the tool configuration detection result is used for indicating whether the target test entry is preconfigured with the initial test tool.
In one embodiment, the processor when executing the computer program further performs the steps of: parameter constraint information among all the test parameters is acquired, and the respective corresponding test intensity of each test scene is determined based on the parameter constraint information; and matching the candidate test tools corresponding to each test scene in the test tool library according to the test intensity.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring the corresponding fault detection rate, statement coverage rate and effective execution time of the test case in the running process; and optimizing the test case based on the fault detection rate, the statement coverage rate and the effective execution time to obtain the optimized test case.
In one embodiment, the processor when executing the computer program further performs the steps of: determining a test flow corresponding to a target test tool according to a test requirement corresponding to a target test system; and adding the test flow and the target test template into a preset test case frame to generate a test case corresponding to the target test system.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: displaying a test inlet when a system test instruction is received; the test inlet is integrated with the test sub-inlets corresponding to different test systems in advance; in response to a trigger operation of selecting a target test portal from among the test sub-portals, displaying a test tool configuration prompt and a test template configuration prompt for the target test portal; receiving a target test tool configured based on the test tool configuration hint, and a target test template configured based on the test template configuration hint; generating a test case of a target test system corresponding to a target test inlet based on the target test tool and the target test template; and testing the target test system according to the test case to obtain a test result corresponding to the target test system.
In one embodiment, the computer program when executed by the processor further performs the steps of: under the condition that an initial test template is not configured in a target test system corresponding to the target test inlet, obtaining a test requirement corresponding to the target test system; based on the test requirement, performing scene matching on the target test system to obtain a plurality of test scenes corresponding to the target test system; and constructing a candidate test template corresponding to each test scene, and displaying a test template configuration prompt containing each candidate test template.
In one embodiment, the computer program when executed by the processor further performs the steps of: under the condition that an initial test tool is not configured in a target test system corresponding to the target test inlet, acquiring test parameters corresponding to each test scene; according to the test parameters, respectively carrying out test tool matching on each test scene to obtain candidate test tools corresponding to each test scene; a test tool configuration prompt is displayed containing each candidate test tool.
In one embodiment, the computer program when executed by the processor further performs the steps of: responding to the triggering operation of selecting a target test inlet from all the test sub-inlets, and performing template configuration detection on a target test system corresponding to the target test inlet to obtain a template configuration detection result corresponding to the target test system; the template configuration detection result is used for indicating whether the target test entrance is preconfigured with the initial test template.
In one embodiment, the processor when executing the computer program further performs the steps of: responding to the triggering operation of selecting a target test inlet from all test sub-inlets, and carrying out tool configuration detection on a target test system to obtain a tool configuration detection result corresponding to the target test system; the tool configuration detection result is used for indicating whether the target test entry is preconfigured with the initial test tool.
In one embodiment, the computer program when executed by the processor further performs the steps of: parameter constraint information among all the test parameters is acquired, and the respective corresponding test intensity of each test scene is determined based on the parameter constraint information; and matching the candidate test tools corresponding to each test scene in the test tool library according to the test intensity.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring the corresponding fault detection rate, statement coverage rate and effective execution time of the test case in the running process; and optimizing the test case based on the fault detection rate, the statement coverage rate and the effective execution time to obtain the optimized test case.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining a test flow corresponding to a target test tool according to a test requirement corresponding to a target test system; and adding the test flow and the target test template into a preset test case frame to generate a test case corresponding to the target test system.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of: displaying a test inlet when a system test instruction is received; the test inlet is integrated with the test sub-inlets corresponding to different test systems in advance; in response to a trigger operation of selecting a target test portal from among the test sub-portals, displaying a test tool configuration prompt and a test template configuration prompt for the target test portal; receiving a target test tool configured based on the test tool configuration hint, and a target test template configured based on the test template configuration hint; generating a test case of a target test system corresponding to a target test inlet based on the target test tool and the target test template; and testing the target test system according to the test case to obtain a test result corresponding to the target test system.
In one embodiment, the computer program when executed by the processor further performs the steps of: under the condition that an initial test template is not configured in a target test system corresponding to the target test inlet, obtaining a test requirement corresponding to the target test system; based on the test requirement, performing scene matching on the target test system to obtain a plurality of test scenes corresponding to the target test system; and constructing a candidate test template corresponding to each test scene, and displaying a test template configuration prompt containing each candidate test template.
In one embodiment, the computer program when executed by the processor further performs the steps of: under the condition that an initial test tool is not configured in a target test system corresponding to the target test inlet, acquiring test parameters corresponding to each test scene; according to the test parameters, respectively carrying out test tool matching on each test scene to obtain candidate test tools corresponding to each test scene; a test tool configuration prompt is displayed containing each candidate test tool.
In one embodiment, the computer program when executed by the processor further performs the steps of: responding to the triggering operation of selecting a target test inlet from all the test sub-inlets, and performing template configuration detection on a target test system corresponding to the target test inlet to obtain a template configuration detection result corresponding to the target test system; the template configuration detection result is used for indicating whether the target test entrance is preconfigured with the initial test template.
In one embodiment, the processor when executing the computer program further performs the steps of: responding to the triggering operation of selecting a target test inlet from all test sub-inlets, and carrying out tool configuration detection on a target test system to obtain a tool configuration detection result corresponding to the target test system; the tool configuration detection result is used for indicating whether the target test entry is preconfigured with the initial test tool.
In one embodiment, the computer program when executed by the processor further performs the steps of: parameter constraint information among all the test parameters is acquired, and the respective corresponding test intensity of each test scene is determined based on the parameter constraint information; and matching the candidate test tools corresponding to each test scene in the test tool library according to the test intensity.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring the corresponding fault detection rate, statement coverage rate and effective execution time of the test case in the running process; and optimizing the test case based on the fault detection rate, the statement coverage rate and the effective execution time to obtain the optimized test case.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining a test flow corresponding to a target test tool according to a test requirement corresponding to a target test system; and adding the test flow and the target test template into a preset test case frame to generate a test case corresponding to the target test system.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program, which may be stored on a non-transitory computer readable storage medium and which, when executed, may comprise the steps of the above-described embodiments of the methods. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (19)

1. A method of testing, the method comprising:
Displaying a test inlet when a system test instruction is received; the test inlet is integrated with test sub-inlets corresponding to different test systems in advance;
in response to a trigger operation of selecting a target test portal from the test sub-portals, displaying a test tool configuration prompt and a test template configuration prompt for the target test portal;
Receiving a target test tool configured based on the test tool configuration hint, and a target test template configured based on the test template configuration hint;
generating a test case of a target test system corresponding to the target test inlet based on the target test tool and the target test template;
and testing the target test system according to the test case to obtain a test result corresponding to the target test system.
2. The method of claim 1, wherein displaying a test tool configuration prompt for the target test entry comprises:
Under the condition that an initial test template is not configured in a target test system corresponding to the target test inlet, obtaining a test requirement corresponding to the target test system;
Based on the test requirement, performing scene matching on the target test system to obtain a plurality of test scenes corresponding to the target test system;
And constructing a candidate test template corresponding to each test scene, and displaying a test template configuration prompt containing each candidate test template.
3. The method of claim 2, wherein displaying a test template configuration hint for the target test portal comprises:
under the condition that an initial test tool is not configured in a target test system corresponding to the target test inlet, acquiring test parameters corresponding to each test scene;
According to the test parameters, respectively carrying out test tool matching on each test scene to obtain candidate test tools corresponding to each test scene;
Displaying a test tool configuration prompt containing each candidate test tool.
4. The method of claim 2, further comprising, prior to the step of displaying test tool configuration cues and test template configuration cues for the target test entry:
Responding to the triggering operation of selecting the target test entry from the test sub-entries, and performing template configuration detection on a target test system corresponding to the target test entry to obtain a template configuration detection result corresponding to the target test system; the template configuration detection result is used for indicating whether the initial test template is preconfigured on the target test entrance.
5. A method according to claim 3, further comprising, prior to the step of displaying test tool configuration cues and test template configuration cues for the target test entry:
Responding to the triggering operation of selecting the target test entry from the test sub-entries, and carrying out tool configuration detection on the target test system to obtain a tool configuration detection result corresponding to the target test system; the tool configuration detection result is used for indicating whether the target test entrance is preconfigured with the initial test tool.
6. The method according to claim 3, wherein the performing test tool matching on each test scene according to the test parameters to obtain candidate test tools corresponding to each test scene respectively includes:
Parameter constraint information among the test parameters is obtained, and the test intensity corresponding to each test scene is determined based on the parameter constraint information;
And matching the candidate test tools corresponding to each test scene in a test tool library according to the test intensity.
7. The method of claim 1, further comprising, after the step of obtaining the test result corresponding to the target test system:
Acquiring a fault detection rate, a statement coverage rate and effective execution time corresponding to the test case in the running process;
and optimizing the test case based on the fault detection rate, the statement coverage rate and the effective execution time to obtain an optimized test case.
8. The method of claim 1, wherein generating test cases of a target test system corresponding to the target test entry based on the target test tool and the target test template comprises:
Determining a test flow corresponding to the target test tool according to the test requirement corresponding to the target test system;
And adding the test flow and the target test template into a preset test case frame to generate a test case corresponding to the target test system.
9. A test apparatus, the apparatus comprising:
The starting inlet module is used for displaying a test inlet when a system test instruction is received; the test inlet is integrated with test sub-inlets corresponding to different test systems in advance;
a configuration prompt module, configured to respond to a trigger operation of selecting a target test entry from the test sub-entries, and display a test tool configuration prompt and a test template configuration prompt for the target test entry;
the receiving module is used for receiving a target test tool configured based on the test tool configuration prompt and a target test template configured based on the test template configuration prompt;
The case generation module is used for generating a test case of the target test system corresponding to the target test inlet based on the target test tool and the target test template;
And the system test module is used for testing the target test system according to the test case to obtain a test result corresponding to the target test system.
10. The apparatus of claim 9, wherein the apparatus further comprises:
the requirement acquisition module is used for acquiring the test requirement corresponding to the target test system under the condition that the initial test template is not configured in the target test system corresponding to the target test inlet;
the scene matching module is used for performing scene matching on the target test system based on the test requirement to obtain a plurality of test scenes corresponding to the target test system;
the template construction module is used for constructing candidate test templates corresponding to each test scene and displaying test template configuration prompts containing the candidate test templates.
11. The apparatus of claim 10, wherein the apparatus further comprises:
the parameter acquisition module is used for acquiring the test parameters corresponding to each test scene under the condition that the initial test tool is not configured in the target test system corresponding to the target test inlet;
the tool matching module is used for respectively carrying out test tool matching on each test scene according to the test parameters to obtain candidate test tools corresponding to each test scene;
And the tool configuration prompt module is used for displaying a test tool configuration prompt containing each candidate test tool.
12. The apparatus of claim 9, wherein the configuration hint module further comprises:
The template configuration detection module is used for responding to the triggering operation of selecting the target test entry from the test sub-entries, and carrying out template configuration detection on a target test system corresponding to the target test entry to obtain a template configuration detection result corresponding to the target test system; the template configuration detection result is used for indicating whether the initial test template is preconfigured on the target test entrance.
13. The apparatus of claim 11, wherein the configuration hint module further comprises:
The tool configuration detection module is used for responding to the triggering operation of selecting the target test entry from the test sub-entries, and carrying out tool configuration detection on the target test system to obtain a tool configuration detection result corresponding to the target test system; the tool configuration detection result is used for indicating whether the target test entrance is preconfigured with the initial test tool.
14. The apparatus of claim 11, wherein the tool matching module further comprises:
the intensity detection module is used for acquiring parameter constraint information among the test parameters and determining the test intensity corresponding to each test scene based on the parameter constraint information;
and the tool matching module is used for matching the candidate test tools corresponding to each test scene in the test tool library according to the test intensity.
15. The apparatus of claim 9, wherein the apparatus further comprises:
the information acquisition module is used for acquiring the corresponding fault detection rate, statement coverage rate and effective execution time of the test case in the running process;
and the case optimizing module is used for optimizing the test case based on the fault detection rate, the statement coverage rate and the effective execution time to obtain an optimized test case.
16. The apparatus of claim 9, wherein the use case generation module is further configured to: determining a test flow corresponding to the target test tool according to the test requirement corresponding to the target test system; and adding the test flow and the target test template into a preset test case frame to generate a test case corresponding to the target test system.
17. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 8 when the computer program is executed.
18. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 8.
19. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 8.
CN202410322090.XA 2024-03-20 2024-03-20 Test method, test device, computer equipment, readable storage medium and computer product Pending CN118132435A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410322090.XA CN118132435A (en) 2024-03-20 2024-03-20 Test method, test device, computer equipment, readable storage medium and computer product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410322090.XA CN118132435A (en) 2024-03-20 2024-03-20 Test method, test device, computer equipment, readable storage medium and computer product

Publications (1)

Publication Number Publication Date
CN118132435A true CN118132435A (en) 2024-06-04

Family

ID=91238868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410322090.XA Pending CN118132435A (en) 2024-03-20 2024-03-20 Test method, test device, computer equipment, readable storage medium and computer product

Country Status (1)

Country Link
CN (1) CN118132435A (en)

Similar Documents

Publication Publication Date Title
CN107861870B (en) Interface test and test data generation method, device, terminal and storage medium
CN108153670B (en) Interface testing method and device and electronic equipment
CN111026645B (en) User interface automatic test method and device, storage medium and electronic equipment
CN109408375B (en) Method and device for generating interface document
WO2018184361A1 (en) Application test method, server, terminal, and storage media
CN113127347A (en) Interface testing method, device, equipment and readable storage medium
CN111666201A (en) Regression testing method, device, medium and electronic equipment
CN110569194A (en) interface testing method and device, electronic equipment and storage medium
CN103049374B (en) Automatic testing method and device
CN109711124B (en) Method, apparatus, computer device and storage medium for managing mobile device
CN112395182A (en) Automatic testing method, device, equipment and computer readable storage medium
CN113778878A (en) Interface testing method and device, electronic equipment and storage medium
CN108228611B (en) Document information copying method and device
CN112613275A (en) Receipt generation method and device, computer equipment and storage medium
CN118132435A (en) Test method, test device, computer equipment, readable storage medium and computer product
CN111949510A (en) Test processing method and device, electronic equipment and readable storage medium
CN114003497A (en) Method, device and equipment for testing service system and storage medium
CN110806981B (en) Application program testing method, device, equipment and storage medium
CN113704114A (en) Automatic testing method, device, equipment and medium for functional interface
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN113392002A (en) Test system construction method, device, equipment and storage medium
CN118132448B (en) Test case processing method, device, computer equipment and storage medium
CN112835803B (en) Tool generation method, test data construction method, device, equipment and medium
CN114610620B (en) Testing method, device, equipment and storage medium of approval process
CN116795723B (en) Chain unit test processing method and device and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination