CN110750446A - System testing method and related device - Google Patents

System testing method and related device Download PDF

Info

Publication number
CN110750446A
CN110750446A CN201910880364.6A CN201910880364A CN110750446A CN 110750446 A CN110750446 A CN 110750446A CN 201910880364 A CN201910880364 A CN 201910880364A CN 110750446 A CN110750446 A CN 110750446A
Authority
CN
China
Prior art keywords
test
data
tested
test data
interface
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
CN201910880364.6A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910880364.6A priority Critical patent/CN110750446A/en
Publication of CN110750446A publication Critical patent/CN110750446A/en
Pending legal-status Critical Current

Links

Images

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/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The application provides a system testing method and a related device. A system testing method is applied to a system testing platform, the system testing platform is used for butting a plurality of systems, and the method comprises the following steps: determining a system to be tested needing to be tested from a plurality of systems; receiving a parameter configuration instruction, and performing parameter configuration on an interface of the system to be tested according to parameters carried by the parameter configuration instruction; acquiring data dependency, data use frequency and data generation difficulty respectively corresponding to M test data types of a system to be tested, wherein M is a positive integer; selecting N test data types with high priority from M test data types according to the data dependency, the data use frequency and the data generation difficulty to generate N pieces of test data, wherein N is a positive integer not greater than M; and compiling a test case according to the N pieces of test data, and executing system test on the system to be tested through an interface of the system to be tested. The technical scheme of the embodiment of the application is beneficial to providing the efficiency of system testing.

Description

System testing method and related device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a system testing method and a related apparatus.
Background
The system test is a test for the whole product system, and aims to verify whether the system meets the definition of the requirement specification and find out the places which do not accord with or contradict the requirement specification. The system test object includes not only the software of the product system to be tested, but also the hardware and peripheral devices on which the software depends, including some data, some supporting software and its interfaces.
At present, in the process of testing a system, test data needs to be constructed manually, when the number of tested systems is large, the process of constructing the test data manually is complicated, and in addition, test data of all types need to be constructed in the test process for testing, so that a large amount of time and resources can be spent, and the system testing efficiency is low.
Disclosure of Invention
The embodiment of the application provides a system testing method and a related device, which are beneficial to improving the efficiency of system testing.
The first aspect of the present application provides a method for system testing, where the method is applied to a system test platform, where the system test platform interfaces a plurality of systems, and the method includes:
determining a system to be tested needing to be tested from the plurality of systems;
receiving a parameter configuration instruction, and performing parameter configuration on an interface of the system to be tested according to parameters carried by the parameter configuration instruction;
acquiring data dependency, data use frequency and data generation difficulty respectively corresponding to M test data types of the system to be tested, wherein M is a positive integer;
selecting N test data types with high priority from the M test data types according to the data dependency, the data use frequency and the data generation difficulty to generate N test data, wherein the N test data correspond to the N test data types one by one, and N is a positive integer not greater than M;
compiling a test case according to the N test data, and executing system test on the system to be tested through an interface of the system to be tested.
The second aspect of the present application provides a system testing apparatus, the apparatus is applied to a system testing platform, the system testing platform is docked with a plurality of systems, the apparatus includes:
the system comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining a system to be tested which needs to be tested from the systems;
the configuration unit is used for receiving a parameter configuration instruction and performing parameter configuration on the interface of the system to be tested according to parameters carried by the parameter configuration instruction;
the acquisition unit is used for acquiring data dependency, data use frequency and data generation difficulty respectively corresponding to M test data types of the system to be tested, wherein M is a positive integer;
the selection unit is used for selecting N test data types with high priority from the M test data types according to the data dependency, the data use frequency and the data generation difficulty so as to generate N pieces of test data, wherein the N pieces of test data correspond to the N test data types one by one, and N is a positive integer not greater than M;
and the test unit is used for compiling a test case according to the N pieces of test data and executing system test on the system to be tested through the interface of the system to be tested.
A third aspect of the present application provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps of the method of any of the first aspects of the present application.
A fourth aspect of the present application provides a computer readable storage medium having a computer program stored thereon for execution by a processor to perform some or all of the steps described in any of the methods of the first aspect of the present application.
It can be seen that, with the system testing method and related apparatus provided by the present application, the system testing platform interfaces with a plurality of systems, determines a system under test to be tested from the plurality of systems, receives a parameter configuration instruction, performing parameter configuration on the interface of the system to be tested according to the parameters carried by the parameter configuration instruction, acquiring data dependency, data use frequency and data generation difficulty respectively corresponding to M types of test data of the system to be tested, wherein M is a positive integer, selecting N test data types with high priority from the M test data types according to the data dependency, the data use frequency and the data generation difficulty, to generate N pieces of test data, wherein the N pieces of test data correspond to N types of test data one by one, N is a positive integer not greater than M, and compiling a test case according to the N pieces of test data, and executing system test on the system to be tested through an interface of the system to be tested. Therefore, in the system testing process, after the system to be tested is determined, the interface of the system to be tested can be configured through the system testing platform without artificially constructing the testing data, the testing data is generated, and before the testing data is generated, the testing data type with high priority is selected from multiple testing data types of the system to be tested, for example, the testing data can be common or the testing data with high construction difficulty, and then the testing data corresponding to the testing data type with high priority is generated, so that the time cost and the resource cost can be reduced, and the system testing efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic system diagram of a system test according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for system testing according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of another method for system testing provided by embodiments of the present application;
FIG. 4 is a schematic diagram of an apparatus for system testing according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present application.
Detailed Description
The system testing method and the related device provided by the embodiment of the application are beneficial to providing the efficiency of system testing.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
The following describes embodiments of the present application in detail.
Referring first to fig. 1, fig. 1 is a schematic diagram of a system 100 for system testing according to an embodiment of the present application. The system 100 comprises a terminal 101, a system test platform 102 and a plurality of systems 103, wherein the terminal 101 logs in the system test platform 102;
the terminal 101 is configured to determine a system to be tested, which needs to be tested, from the multiple systems 103; receiving a parameter configuration instruction, and performing parameter configuration on an interface of the system to be tested according to parameters carried by the parameter configuration instruction; acquiring data dependency, data use frequency and data generation difficulty respectively corresponding to M test data types of the system to be tested, wherein M is a positive integer; selecting N test data types with high priority from the M test data types according to the data dependency, the data use frequency and the data generation difficulty to generate N test data, wherein the N test data correspond to the N test data types one by one, and N is a positive integer not greater than M; compiling a test case according to the N test data, and executing system test on the system to be tested through an interface of the system to be tested;
the system test platform 102 interfaces with a plurality of systems 103.
In the above embodiments, the terminal 101 includes a mobile phone, a tablet computer, a palm computer, a mobile internet device, or other types of terminals.
It can be seen that, according to the above embodiment, the system test platform 102 interfaces the multiple systems 103, determines a system to be tested that needs to be tested from the multiple systems 103, receives a parameter configuration instruction, performs parameter configuration on an interface of the system to be tested according to a parameter carried by the parameter configuration instruction, and obtains data dependencies, data usage frequencies, and data generation difficulties that correspond to M types of test data of the system to be tested, where M is a positive integer; selecting N test data types with high priority from M test data types according to the data dependency, the data use frequency and the data generation difficulty to generate N test data, wherein the N test data correspond to the N test data types one by one, N is a positive integer not larger than M, writing a test case according to the N test data, and testing the system to be tested through an interface of the system to be tested. In this way, in the system testing process, after the system to be tested is determined, the interface of the system to be tested can be configured through the system testing platform 102 without artificially constructing the testing data, the testing data is generated, and before the testing data is generated, the testing data type with high priority is selected from multiple testing data types of the system to be tested, for example, the testing data can be common or the testing data with high construction difficulty, and then the testing data corresponding to the testing data type with high priority is generated, so that the time cost and the resource cost can be reduced, and the system testing efficiency is improved.
Referring to fig. 2, fig. 2 is a flowchart of a system testing method according to an embodiment of the present disclosure, where the system testing method according to the embodiment is applied to a system testing platform, and the system testing platform is connected to a plurality of systems. As shown in fig. 2, the method for system testing provided in this embodiment may include:
201. a system under test to be tested is determined from a plurality of systems.
The terminal logs in a system test platform, the system test platform is in butt joint with a plurality of systems, system test can be carried out on any one of the systems through the system test platform, wherein the terminal can be a mobile phone, a tablet computer, a notebook computer, a palm computer, mobile internet equipment or other types of terminals, the system test is carried out on the whole product system, the purpose is to verify whether the system meets the definition of the requirement specification, and find out the place which is not in accordance with or contradictory to the requirement specification, and the system test object not only comprises software of the product system to be tested, but also comprises hardware and peripheral equipment depending on the software, even comprises some data, some supporting software and interfaces thereof and the like.
Specifically, the system to be tested may be selected manually or automatically by the terminal.
In one possible example, the method for the terminal to determine the system under test to be tested from the plurality of systems may be:
and the terminal receives a system selection request carrying the system identification, and determines the system to be tested matched with the system identification from the plurality of systems.
Specifically, the system to be tested is selected manually, the terminal receives a system selection request, the system selection request carries a system identifier selected by a user, and the terminal searches a system matched with the system identifier from the multiple systems, namely the system to be tested.
In another possible example, the method for the terminal to determine the system under test needing to be tested from the plurality of systems may further be:
and acquiring the test priorities of the systems, and determining the system to be tested from the systems according to the test priorities of the systems.
Specifically, the system to be tested is automatically selected by the terminal, the user does not select the system to be tested, the terminal obtains the test priorities of the multiple systems, the test priorities can be preset by the user, and the terminal selects the system with the highest test priority from the multiple systems, namely the system to be tested.
202. And receiving a parameter configuration instruction, and performing parameter configuration on the interface of the system to be tested according to parameters carried by the parameter configuration instruction.
The parameters of the interface of the system to be tested comprise any combination of domain name parameters, port parameters, protocol type parameters and expected result parameters.
Specifically, the access of any one website is realized by the combination of the IP and the port number of the server. The IP of the server is complex and can therefore be represented by a domain name. The domain name represents a certain server IP in a character string form, the domain name and the IP address are in one-to-one correspondence, and the domain name is bound and resolved by mapping. The port is an outlet for communication between the device and the outside, and can be divided into a virtual port and a physical port, such as 80 ports, 21 ports, 23 ports and the like in a computer.
In a possible example, the method for the terminal to perform parameter configuration on the interface of the system to be tested according to the parameters carried by the parameter configuration instruction may be:
when a first configuration instruction carrying a domain name of a system to be tested is received, configuring domain name parameters of an interface of the system to be tested into the domain name of the system to be tested;
when a second configuration instruction carrying a port of the system to be tested is received, configuring the port parameter of the interface of the system to be tested into the port of the system to be tested;
when a third configuration instruction carrying a communication protocol type is received, configuring a protocol type parameter of an interface of the system to be tested into the communication protocol type;
and when a fourth configuration instruction carrying an expected test result is received, configuring the expected result parameter of the interface of the system to be tested into the expected test result.
Specifically, the expected test results respectively correspond to input parameter types, where the input parameter types include legal input parameters, illegal input parameters, empty input parameters, null input parameters, and overlong input parameters, and the expected test results under various input parameter types are correspondingly configured, and include an expected test result under legal input parameters, an expected test result under illegal input parameters, an expected test result under empty input parameters, an expected test result under null input parameters, and an expected test result under overlong input parameters.
And the terminal can configure the address of the system, the interface and the parameters of the system, so that if the interface of the system is changed, synchronous change can be realized only by modifying the configuration at the terminal, and the maintenance cost is reduced.
203. And acquiring data dependency, data use frequency and data generation difficulty respectively corresponding to M test data types of the system to be tested, wherein M is a positive integer.
Specifically, when a system to be tested is tested, a lot of data need to be constructed, but not all test data need to be constructed, so that development and maintenance costs are too high, and a terminal judges the test data need to be constructed according to data dependency, data use frequency and data generation difficulty.
The test data with high data dependency, high data use frequency and high data generation difficulty needs to support construction, because in system test, related upstream and downstream systems are more, and test data with high data dependency, high data use frequency and high data generation difficulty needs to be constructed preferentially, so that the system test work of the main process is completed preferentially, for example, the test data with high priority comprises test data required by common business transactions.
204. And selecting N test data types with high priority from the M test data types according to the data dependency, the data use frequency and the data generation difficulty to generate N pieces of test data, wherein the N pieces of test data correspond to the N test data types one by one, and N is a positive integer not greater than M.
In one possible example, the method for selecting the N test data types with high priority from the M test data types according to the data dependency, the data usage frequency, and the data generation difficulty may be:
respectively calculating the priorities of the M test data types according to the data dependency, the data use frequency and the data generation difficulty;
sequencing the M test data types according to the sequence of the priorities from large to small;
and selecting the first N types from the M test data types, and determining the first N types as the N test data types.
Specifically, the terminal judges test data to be constructed according to the data dependency, the data use frequency and the data generation difficulty. The test data with high data dependency, high data use frequency and high data generation difficulty needs to support construction, because in system test, related upstream and downstream systems are more, and test data with high data dependency, high data use frequency and high data generation difficulty needs to be constructed preferentially, so that the system test work of the main process is completed preferentially, for example, the test data with high priority comprises test data required by common business transactions.
The terminal respectively calculates the priority of the M test data types, sorts the M test data types according to the sequence of the priority from large to small, and selects the N test data types positioned in front from the M test data types.
Further, the terminal generates N pieces of test data, and the N pieces of test data correspond to the N types of test data one by one.
Based on the above example, in one possible example, the calculation formula for calculating the priorities of the M test data types according to the data dependency, the data usage frequency, and the data generation difficulty is as follows:
Si=Ai*W1+Bi*W2+Ci*W3
wherein S isiIs the priority of the ith test data type among the M test data types, AiFor the data dependency corresponding to the ith test data type, BiData use frequency, C, for the ith test data typeiGenerating difficulty for data corresponding to the ith test data type;
W1is a first weight value of data dependency, W2A second weight value, W, for data frequency of use3Generating a third weight value, W, for the difficulty of the data1>W2>W2
Specifically, the test data with high data dependency, high data use frequency and high data generation difficulty needs to support the structure, and weight values are set for the data dependency, the data use frequency and the data generation difficulty, and the weight value of the data dependency is higher than that of the data use frequency, and the weight value of the data use frequency is higher than that of the data generation difficulty, for example, W1、W2、W3Can be respectively 50%, 30%, 20%, W1、W2、W3The concentration may be 40%, 35% or 25%, respectively.
205. Compiling a test case according to the N test data, and executing system test on the system to be tested through an interface of the system to be tested.
The test case comprises a case name, operation steps, test data and an expected result, a user logs in a system test platform through a terminal, before system test is executed, the user inputs the case name, and the case name is described by using a generalized language.
The operation steps can be written by a user, the operation steps required by the current test case are executed, detailed description of each step needs to be clearly given, a tester can complete case execution according to the operation steps, the operation steps can be obtained by analyzing a test script, namely in the previous system test process, interaction between the user and a tested system is recorded, the test script is generated and analyzed, the operation steps are obtained, in the process, a VuGen component can be used for recording the interaction between the user and the tested system, wherein the VuGen component is one of core components of LoadRunner, the LoadRunner is a load test tool for predicting system behaviors and performances, problems are confirmed and searched by simulating tens of millions of users to implement concurrent load and real-time performance monitoring, and the LoadRunner can test the whole enterprise architecture.
In one possible example, the process of recording the user's interaction with the system under test using the VuGen component includes:
the VuGen component opens a browser that accesses the system under test with the VuGen component as a proxy, so that the VuGen component can capture the interaction between the user and the system under test.
The test data is artificially constructed and automatically generated, the terminal respectively calculates the priority of M test data types of the system to be tested, the M test data types are sequenced according to the sequence of the priority from large to small, N test data types positioned in front are selected from the M test data types, and further, the terminal generates N test data, and the N test data correspond to the N test data types one by one. For other test data types with lower priority, the test data types can be artificially constructed due to lower dependency, lower use frequency and small construction difficulty, and the process is simpler and quicker.
The expected result is an expected output result of the current operation, and includes content of a return value, a response result of an interface, rule conformity of the output result, an operation state of a storage table such as a database, and the like, the expected result may be input by a user, that is, before the system test is executed, the user inputs the expected result, and the expected result may also be obtained from parameters of an interface of the system under test, that is, before the system test is executed, the interface of the system under test needs to be configured according to parameters carried by the parameter configuration instruction, and when the parameter configuration instruction carries the expected test result, the expected result parameter of the interface of the system under test is configured as the expected test result, and thus, the expected result may be obtained from parameters of the interface of the system under test.
In one possible example, the test case further includes any one or a combination of the following:
the case number is formed by combining characters and numbers, and has uniqueness and easy identification;
the module belongs to represents the test class of the current test case;
the importance level, namely the priority of the case, is generally divided into high, medium and low, the priority level can be defined by a special project, and a tester can arrange the execution time according to the importance level;
the precondition is used for indicating the precondition required when the current test case is executed, if the precondition is not satisfied, the following test step can not be executed, and the precondition is not required by each test case according to the situation.
And generating a test case according to the case name, the operation steps, the test data and the expected result, and executing system test on the system to be tested through an interface of the system to be tested after the test case is generated.
In one possible example, before performing the system test on the system under test through the interface of the system under test, the method further includes:
receiving an execution mode configuration instruction, wherein the execution mode configuration instruction is used for indicating and configuring an execution mode for executing system test on the system to be tested;
and receiving an execution time configuration instruction, wherein the execution time configuration instruction is used for indicating the execution time for configuring the system test executed on the system to be tested.
Based on the above example, in one possible example, the method for performing the system test on the system under test through the interface of the system under test may be:
when a test request is received, acquiring an execution mode and execution times for executing system test on the system to be tested;
if the execution mode is immediate execution, executing system test with the same execution times to the system to be tested through the interface of the system to be tested;
if the execution mode is timing execution, acquiring preset execution time, and executing system tests with the same execution times to the system to be tested when the current time is detected to be the same as the preset execution time.
Specifically, the terminal may set an execution mode and an execution frequency for testing the system to be tested, where the execution mode includes immediate execution and timed execution, the immediate execution is that the terminal immediately starts to execute the test when receiving the test instruction, the timed execution is that the terminal starts to execute the test at the set execution time, and the execution frequency is the cycle frequency for testing the system to be tested by the terminal.
In one possible example, the terminal may also set the system under test to test in the background.
It can be seen that, with the system testing method provided in this embodiment, the system testing platform interfaces with a plurality of systems, determines a system under test to be tested from the plurality of systems, receives a parameter configuration instruction, performing parameter configuration on the interface of the system to be tested according to the parameters carried by the parameter configuration instruction, acquiring data dependency, data use frequency and data generation difficulty respectively corresponding to M types of test data of the system to be tested, wherein M is a positive integer, selecting N test data types with high priority from the M test data types according to the data dependency, the data use frequency and the data generation difficulty, to generate N pieces of test data, wherein the N pieces of test data correspond to N types of test data one by one, N is a positive integer not greater than M, and compiling a test case according to the N pieces of test data, and executing system test on the system to be tested through an interface of the system to be tested. Therefore, in the system testing process, after the system to be tested is determined, the interface of the system to be tested can be configured through the system testing platform without artificially constructing the testing data, the testing data is generated, and before the testing data is generated, the testing data type with high priority is selected from multiple testing data types of the system to be tested, for example, the testing data can be common or the testing data with high construction difficulty, and then the testing data corresponding to the testing data type with high priority is generated, so that the time cost and the resource cost can be reduced, and the system testing efficiency is improved.
Referring to fig. 3, fig. 3 is a flowchart of another system testing method according to another embodiment of the present disclosure, where the system testing method according to this embodiment is applied to a system testing platform, and the system testing platform interfaces with a plurality of systems. As shown in fig. 3, a method for system testing provided in an embodiment of the present application may include:
301. and the terminal receives a system selection request carrying the system identification, and determines the system to be tested matched with the system identification from the plurality of systems.
The terminal logs in a system test platform, the system test platform is in butt joint with a plurality of systems, system test can be carried out on any one of the systems through the system test platform, wherein the terminal can be a mobile phone, a tablet computer, a notebook computer, a palm computer, mobile internet equipment or other types of terminals, the system test is carried out on the whole product system, the purpose is to verify whether the system meets the definition of the requirement specification, and find out the place which is not in accordance with or contradictory to the requirement specification, and the system test object not only comprises software of the product system to be tested, but also comprises hardware and peripheral equipment depending on the software, even comprises some data, some supporting software and interfaces thereof and the like.
302. The terminal receives a first configuration instruction carrying a domain name of a system to be tested, and configures domain name parameters of an interface of the system to be tested into the domain name of the system to be tested.
The parameters of the interface of the system to be tested comprise domain name parameters.
Specifically, since the IP of the server is complex, it can be represented by a domain name. The domain name represents a certain server IP in a character string form, the domain name and the IP address are in one-to-one correspondence, and the domain name is bound and resolved by mapping.
303. And the terminal receives a second configuration instruction carrying the port of the system to be tested, and configures the port parameter of the interface of the system to be tested into the port of the system to be tested.
The parameters of the interface of the system to be tested comprise port parameters.
Specifically, the access of any one website is realized by the combination of the IP and the port number of the server. The port is an outlet for communication between the device and the outside, and can be divided into a virtual port and a physical port, such as 80 ports, 21 ports, 23 ports and the like in a computer.
304. And the terminal receives a third configuration instruction carrying the communication protocol type, and configures the protocol type parameter of the interface of the system to be tested into the communication protocol type.
The parameters of the interface of the system to be tested comprise protocol type parameters.
305. And the terminal receives a fourth configuration instruction carrying an expected test result, and configures the expected result parameters of the interface of the system to be tested into the expected test result.
Wherein the parameters of the interface of the system under test include expected result parameters.
Specifically, the expected test results respectively correspond to input parameter types, where the input parameter types include legal input parameters, illegal input parameters, empty input parameters, null input parameters, and overlong input parameters, and the expected test results under various input parameter types are correspondingly configured, and include an expected test result under legal input parameters, an expected test result under illegal input parameters, an expected test result under empty input parameters, an expected test result under null input parameters, and an expected test result under overlong input parameters.
And the terminal can configure the address of the system, the interface and the parameters of the system, so that if the interface of the system is changed, synchronous change can be realized only by modifying the configuration at the terminal, and the maintenance cost is reduced.
306. The terminal acquires data dependency, data use frequency and data generation difficulty corresponding to M test data types of the system to be tested respectively.
Specifically, when a system to be tested is tested, a lot of data need to be constructed, but not all test data need to be constructed, so that development and maintenance costs are too high, and a terminal judges the test data need to be constructed according to data dependency, data use frequency and data generation difficulty.
The test data with high data dependency, high data use frequency and high data generation difficulty needs to support construction, because in system test, related upstream and downstream systems are more, and test data with high data dependency, high data use frequency and high data generation difficulty needs to be constructed preferentially, so that the system test work of the main process is completed preferentially, for example, the test data with high priority comprises test data required by common business transactions.
307. And the terminal respectively calculates the priorities of the M test data types according to the data dependency, the data use frequency and the data generation difficulty.
The calculation formula for respectively calculating the priorities of the M test data types according to the data dependency, the data use frequency and the data generation difficulty is as follows:
Si=Ai*W1+Bi*W2+Ci*W3
wherein S isiIs the priority of the ith test data type among the M test data types, AiFor the data dependency corresponding to the ith test data type, BiData use frequency, C, for the ith test data typeiGenerating difficulty for data corresponding to the ith test data type;
W1is a first weight value of data dependency, W2A second weight value, W, for data frequency of use3Generating a third weight value, W, for the difficulty of the data1>W2>W2
Specifically, the test data with high data dependency, high data use frequency and high data generation difficulty needs to support the structure, and weight values are set for the data dependency, the data use frequency and the data generation difficulty, and the weight value of the data dependency is higher than that of the data use frequency, and the weight value of the data use frequency is higher than that of the data generation difficulty, for example, W1、W2、W3Can be respectively 50%, 30%, 20%, W1、W2、W3The concentration may be 40%, 35% or 25%, respectively.
308. And the terminal selects N test data types from the M test data types according to the sequence of the priorities from large to small.
Specifically, the terminal respectively calculates the priorities of the M test data types, sorts the M test data types according to the descending order of the priorities, and selects the N test data types located in front from the M test data types.
309. And the terminal generates N pieces of test data, and the N pieces of test data correspond to the N types of test data one by one.
In a possible example, in order to avoid confusion of test data, right control is added to a terminal, that is, after a user constructs test data through the terminal, only the test data constructed under the name of the user can be maintained, and the test data of other people cannot be maintained. Meanwhile, for some data operations which may cause system crash, only authorized personnel are allowed to operate.
In one possible example, after the terminal constructs the test data, the constructed test data is saved so that the risk of test data construction can be controlled.
310. And the terminal compiles a test case according to the N pieces of test data.
After the terminal constructs the test data, the test case is compiled according to the test data, when the test case is compiled, the test case can be provided for a user to use in the expression forms of naming, annotating, classifying and the like, and the user can select the test case required by the user visually according to the naming, the annotating, the classifying and the like.
In one possible example, the system under test has Q test cases, where Q is a positive integer.
When the terminal receives a first case selection instruction, the first case selection instruction is used for indicating the terminal to select K test cases from the Q test cases, wherein K is a positive integer smaller than Q;
and when the terminal receives a second example selection instruction, the second example selection instruction is used for indicating the terminal to select the Q test cases.
In one possible example, the terminal stores historically written test cases, and the user can select to use the used test cases in the test process, so that the operation steps are simplified.
And after the terminal selects the test case, the system test can be executed.
311. And the terminal executes system test on the system to be tested through the interface of the system to be tested.
When the terminal configures the parameters of the interface, an expected test result is configured, that is, the terminal configures expected test results under various input parameter types before testing, including expected test results under input parameter legality, expected test results under input parameter vacancy, expected test results under input parameter null, and expected test results under input parameter overlong, so that the terminal can judge whether the system to be tested operates correctly by comparing the response of the system to be tested under various input parameter types with the expected test results under various input parameter types configured in advance.
When the first input parameter is legal, acquiring a first response of the system to be tested to the first input parameter, comparing the first response with an expected test result of the preset input parameter under the legal condition by the terminal, and if the first response is consistent with the expected test result of the preset input parameter under the legal condition, correctly operating the system to be tested under the legal condition of the input parameter;
when the second input parameter is illegal, acquiring a second response of the system to be tested to the second input parameter, comparing the second response with an expected test result of the preset input parameter under the illegal condition by the terminal, and if the second response is consistent with the expected test result, correctly operating the system to be tested under the condition that the input parameter is not empty;
when the third input parameter is empty, acquiring a third response of the system to be tested to the third input parameter, comparing the third response with an expected test result that the pre-configured input parameter is empty by the terminal, and if the third response is consistent with the expected test result, correctly operating the system to be tested under the condition that the input parameter is empty;
when the fourth input parameter is null, acquiring a fourth response of the system to be tested to the fourth input parameter, comparing the fourth response with an expected test result when the preset input parameter is null by the terminal, and if the fourth response is consistent with the expected test result, correctly operating the system to be tested under the condition that the input parameter is null;
and when the fifth input parameter is overlong, acquiring a fifth response of the system to be tested to the fifth input parameter, comparing the fifth response with an expected test result of the preset input parameter under the overlong condition by the terminal, and if the fifth response is consistent with the expected test result of the preset input parameter, correctly operating the system to be tested under the condition of the overlong input parameter.
It can be seen that, with the system testing method provided in this embodiment, after the system under test is determined during the system testing process, the interface of the system to be tested can be configured through the system test platform without artificially constructing test data to generate the test data, moreover, the terminal acquires the data dependency, the data use frequency and the data generation difficulty respectively corresponding to the M test data types of the system to be tested, respectively calculating the priority of the M test data types according to the data dependency, the data use frequency and the data generation difficulty, n test data types are selected from the M test data types according to the descending order of the priority, so that, when the system to be tested is tested, all test data do not need to be constructed, development and maintenance cost is reduced, time and resource cost is reduced, and system testing efficiency is improved.
Referring to fig. 4, fig. 4 is a schematic diagram of an apparatus for system testing, which is applied to a system testing platform that interfaces a plurality of systems according to an embodiment of the present application. As shown in fig. 4, an apparatus for system testing provided in an embodiment of the present application may include:
a determining unit 401, configured to determine, from the multiple systems, a system to be tested that needs to be tested;
a configuration unit 402, configured to receive a parameter configuration instruction, and perform parameter configuration on an interface of the system to be tested according to parameters carried by the parameter configuration instruction;
an obtaining unit 403, configured to obtain data dependencies, data usage frequencies, and data generation difficulties respectively corresponding to M types of test data of the system to be tested, where M is a positive integer;
a selecting unit 404, configured to select N test data types with high priority from the M test data types according to the data dependency, the data usage frequency, and the data generation difficulty, so as to generate N pieces of test data, where the N pieces of test data correspond to the N test data types one to one, and N is a positive integer not greater than M;
and the test unit 405 is configured to compile a test case according to the N test data, and execute a system test on the system to be tested through an interface of the system to be tested.
For specific implementation of the system testing apparatus of the present application, reference may be made to various embodiments of the system testing method, which are not described herein again.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present application. As shown in fig. 5, an electronic device of a hardware operating environment according to an embodiment of the present application may include:
a processor 501, such as a CPU.
The memory 502 may alternatively be a high speed RAM memory or a stable memory such as a disk memory.
A communication interface 503 for implementing connection communication between the processor 501 and the memory 502.
Those skilled in the art will appreciate that the configuration of the electronic device shown in fig. 5 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 5, the memory 502 may include an operating system, a network communication module, and a program for system test. An operating system is a program that manages and controls the hardware and software resources of an electronic device, a program that supports system testing, and the execution of other software or programs. The network communication module is used to implement communication between the components in the memory 502 and with other hardware and software in the electronic device.
In the electronic device shown in fig. 5, the processor 501 is configured to execute the program for system test stored in the memory 502, and implement the following steps:
determining a system to be tested needing to be tested from the plurality of systems;
receiving a parameter configuration instruction, and performing parameter configuration on an interface of the system to be tested according to parameters carried by the parameter configuration instruction;
acquiring data dependency, data use frequency and data generation difficulty respectively corresponding to M test data types of the system to be tested, wherein M is a positive integer;
selecting N test data types with high priority from the M test data types according to the data dependency, the data use frequency and the data generation difficulty to generate N test data, wherein the N test data correspond to the N test data types one by one, and N is a positive integer not greater than M;
compiling a test case according to the N test data, and executing system test on the system to be tested through an interface of the system to be tested.
For specific implementation of the electronic device of the present application, reference may be made to various embodiments of the method for system test, which are not described herein again.
Another embodiment of the present application provides a computer-readable storage medium storing a computer program for execution by a processor to perform the steps of:
determining a system to be tested needing to be tested from the plurality of systems;
receiving a parameter configuration instruction, and performing parameter configuration on an interface of the system to be tested according to parameters carried by the parameter configuration instruction;
acquiring data dependency, data use frequency and data generation difficulty respectively corresponding to M test data types of the system to be tested, wherein M is a positive integer;
selecting N test data types with high priority from the M test data types according to the data dependency, the data use frequency and the data generation difficulty to generate N test data, wherein the N test data correspond to the N test data types one by one, and N is a positive integer not greater than M;
compiling a test case according to the N test data, and executing system test on the system to be tested through an interface of the system to be tested.
For specific implementation of the computer-readable storage medium of the present application, reference may be made to the embodiments of the method for system test, which are not described herein again.
It is also noted that while for simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and concurrently. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application. In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method for system testing, the method being applied to a system test platform, the system test platform interfacing a plurality of systems, the method comprising:
determining a system to be tested needing to be tested from the plurality of systems;
receiving a parameter configuration instruction, and performing parameter configuration on an interface of the system to be tested according to parameters carried by the parameter configuration instruction;
acquiring data dependency, data use frequency and data generation difficulty respectively corresponding to M test data types of the system to be tested, wherein M is a positive integer;
selecting N test data types with high priority from the M test data types according to the data dependency, the data use frequency and the data generation difficulty to generate N test data, wherein the N test data correspond to the N test data types one by one, and N is a positive integer not greater than M;
compiling a test case according to the N test data, and executing system test on the system to be tested through an interface of the system to be tested.
2. The method of claim 1, wherein determining the system under test from the plurality of systems that needs to be tested comprises:
receiving a system selection request carrying a system identifier, and determining the system to be tested matched with the system identifier from the plurality of systems;
or, obtaining the test priorities of the plurality of systems, and determining the system to be tested from the plurality of systems according to the test priorities of the plurality of systems.
3. The method according to claim 2, wherein the performing parameter configuration on the interface of the system under test according to the parameter carried by the parameter configuration instruction includes:
when a first configuration instruction carrying the domain name of the system to be tested is received, configuring the domain name parameter of the interface of the system to be tested into the domain name of the system to be tested;
when a second configuration instruction carrying the port of the system to be tested is received, configuring the port parameter of the interface of the system to be tested into the port of the system to be tested;
when a third configuration instruction carrying a communication protocol type is received, configuring a protocol type parameter of an interface of the system to be tested into the communication protocol type;
and when a fourth configuration instruction carrying an expected test result is received, configuring the expected result parameter of the interface of the system to be tested into the expected test result.
4. The method of any one of claims 1 to 3, wherein the selecting N test data types with high priority from the M test data types according to data dependency, data usage frequency and data generation difficulty comprises:
respectively calculating the priorities of the M test data types according to the data dependency, the data use frequency and the data generation difficulty;
sequencing the M test data types according to the sequence of the priorities from large to small;
selecting the first N types from the M test data types, and determining the first N types as the N test data types.
5. The method of claim 4, wherein the calculating formula for calculating the priorities of the M test data types according to the data dependencies, the data usage frequency and the data generation difficulty respectively comprises:
Si=Ai*W1+Bi*W2+Ci*W3
wherein S isiIs the priority of the ith test data type in the M test data types, AiA data dependency corresponding to the ith test data type, BiA data use frequency, C, corresponding to the ith test data typeiGenerating difficulty for data corresponding to the ith test data type;
W1is a first weight value, W, of the data dependency2A second weight value, W, for the frequency of use of the data3Generating a third weight value, W, for the difficulty of the data1>W2>W2
6. The method of claim 1, wherein before performing system test on the system under test through the interface of the system under test, the method further comprises:
receiving an execution mode configuration instruction, wherein the execution mode configuration instruction is used for indicating the configuration of an execution mode for executing the system test on the system to be tested;
and receiving an execution time configuration instruction, wherein the execution time configuration instruction is used for indicating the execution times of the system test executed on the system to be tested.
7. The method of claim 6, wherein performing system testing on the system under test through the interface of the system under test comprises:
when a test request is received, acquiring an execution mode and execution times for executing system test on the system to be tested;
if the execution mode is immediate execution, executing system tests with the same execution times to the system to be tested through an interface of the system to be tested;
if the execution mode is timing execution, acquiring preset execution time, and executing system tests with the same execution times on the system to be tested when the current time is detected to be the same as the preset execution time.
8. An apparatus for system testing, the apparatus being applied to a system test platform, the system test platform interfacing a plurality of systems, the apparatus comprising:
the system comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining a system to be tested which needs to be tested from the systems;
the configuration unit is used for receiving a parameter configuration instruction and performing parameter configuration on the interface of the system to be tested according to parameters carried by the parameter configuration instruction;
the acquisition unit is used for acquiring data dependency, data use frequency and data generation difficulty respectively corresponding to M test data types of the system to be tested, wherein M is a positive integer;
the selection unit is used for selecting N test data types with high priority from the M test data types according to the data dependency, the data use frequency and the data generation difficulty so as to generate N pieces of test data, wherein the N pieces of test data correspond to the N test data types one by one, and N is a positive integer not greater than M;
and the test unit is used for compiling a test case according to the N pieces of test data and executing system test on the system to be tested through the interface of the system to be tested.
9. An electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method of any one of claims 1 to 7.
CN201910880364.6A 2019-09-18 2019-09-18 System testing method and related device Pending CN110750446A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910880364.6A CN110750446A (en) 2019-09-18 2019-09-18 System testing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910880364.6A CN110750446A (en) 2019-09-18 2019-09-18 System testing method and related device

Publications (1)

Publication Number Publication Date
CN110750446A true CN110750446A (en) 2020-02-04

Family

ID=69276630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910880364.6A Pending CN110750446A (en) 2019-09-18 2019-09-18 System testing method and related device

Country Status (1)

Country Link
CN (1) CN110750446A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367820A (en) * 2020-04-30 2020-07-03 中国银行股份有限公司 Test case sorting method and device
CN111858333A (en) * 2020-07-17 2020-10-30 视若飞信息科技(上海)有限公司 Copyright management system interface test method and device based on real data
CN112362360A (en) * 2020-11-10 2021-02-12 广州小鹏汽车科技有限公司 Vehicle component testing method, device and system, test board card and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367820A (en) * 2020-04-30 2020-07-03 中国银行股份有限公司 Test case sorting method and device
CN111367820B (en) * 2020-04-30 2023-04-25 中国银行股份有限公司 Sequencing method and device for test cases
CN111858333A (en) * 2020-07-17 2020-10-30 视若飞信息科技(上海)有限公司 Copyright management system interface test method and device based on real data
CN112362360A (en) * 2020-11-10 2021-02-12 广州小鹏汽车科技有限公司 Vehicle component testing method, device and system, test board card and storage medium
CN112362360B (en) * 2020-11-10 2023-03-31 广州小鹏汽车科技有限公司 Vehicle component testing method, device and system, test board card and storage medium

Similar Documents

Publication Publication Date Title
CN105099811B (en) Interface testing method and device
US7917896B2 (en) Extensible execution language
CN110750446A (en) System testing method and related device
CN111124919A (en) User interface testing method, device, equipment and storage medium
CN110825618B (en) Method and related device for generating test case
CN110532185B (en) Test method, test device, electronic equipment and computer readable storage medium
CN110955409B (en) Method and device for creating resources on cloud platform
CN114546738B (en) Universal test method, system, terminal and storage medium for server
CN113722020A (en) Interface calling method, device and computer readable storage medium
CN111597110A (en) Page testing method and device, electronic equipment and storage medium
CN113434396A (en) Interface test method, device, equipment, storage medium and program product
CN112988578A (en) Automatic testing method and device
CN103176903B (en) The test method and equipment of MapReduce distributed system program
CN112416747A (en) Test case execution method, device, equipment and medium
CN110609786A (en) Software testing method and device, computer equipment and storage medium
CN114564387A (en) Scene type automatic testing method and system for OpenStack cloud platform
CN110737900B (en) Webpage function testing method and device, server and computer readable storage medium
CN110347577B (en) Page testing method, device and equipment thereof
CN114116244A (en) Data processing method, device and system, electronic equipment and storage medium
CN113608996B (en) Mirror image compiling test method, system, device and readable storage medium
Andreozzi et al. A framework for large-scale simulations and output result analysis with ns-2
CN116203393B (en) Integrated circuit testing method and system
CN113986641B (en) Method, system, equipment and storage medium for verifying chip hardware function
US20230013797A1 (en) Analyzing performance metrics for improving technology environment of a software application
CN114297081A (en) Automatic testing method and related 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