CN117271303A - Test case management method, device, equipment and medium - Google Patents

Test case management method, device, equipment and medium Download PDF

Info

Publication number
CN117271303A
CN117271303A CN202210677349.3A CN202210677349A CN117271303A CN 117271303 A CN117271303 A CN 117271303A CN 202210677349 A CN202210677349 A CN 202210677349A CN 117271303 A CN117271303 A CN 117271303A
Authority
CN
China
Prior art keywords
interaction
test case
script
target test
information
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
CN202210677349.3A
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.)
Beijing Armyfly Technology Co Ltd
Original Assignee
Beijing Armyfly Technology 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 Beijing Armyfly Technology Co Ltd filed Critical Beijing Armyfly Technology Co Ltd
Priority to CN202210677349.3A priority Critical patent/CN117271303A/en
Publication of CN117271303A publication Critical patent/CN117271303A/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/3688Test management for test execution, e.g. scheduling of test suites
    • 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/3692Test management for test results analysis

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)
  • Testing Or Calibration Of Command Recording Devices (AREA)

Abstract

The invention discloses a test case management method, a device, equipment and a medium. The method comprises the following steps: acquiring a script variable table corresponding to a target test case; the script variable table contains equipment interaction association information and instrument interaction association information of the target test case; according to the device interaction association information, determining a device interaction script variable corresponding to the target test case, and generating a device interaction execution script corresponding to the target test case according to the device interaction script variable; and determining the instrument interaction script variable corresponding to the target test case according to the instrument interaction association information, and generating an instrument interaction execution script corresponding to the target test case according to the instrument interaction script variable. The embodiment of the invention can automatically generate the execution script corresponding to the test case, improve the conversion rate of the test case and reduce the maintenance cost of the test case.

Description

Test case management method, device, equipment and medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a medium for managing test cases.
Background
The test case of the network switching device generally mainly comprises two links: link of interaction with network switching device: issuing a configuration command to the designated network switching equipment, and checking the return display information returned by the designated network switching equipment; link of interaction with network test meter: and controlling the network test instrument to send the constructed data flow to the port of the designated network switching equipment, receiving the data flow forwarded by the designated network switching equipment through the port, obtaining flow statistical results such as delay, throughput and the like of the designated network switching equipment for processing the data flow, and then checking the flow statistical results.
In the related art, a technician typically analyzes each test case, and writes an execution script corresponding to each test case, which interacts with the network switching device, and an execution script corresponding to each test case, which interacts with the network test instrument, so as to obtain an execution script corresponding to each test case. Each test case corresponds to an execution script. The execution script includes an execution script that interacts with the network switching device and an execution script that interacts with the network test meter.
The related art has the following drawbacks: the execution script corresponding to each test case contains a plurality of repeated parts, and the script writing amount is large, so that the conversion rate of the test case is low. In addition, if a test case changes, the corresponding execution script changes. If a certain configuration command changes, a corresponding plurality of execution scripts change accordingly. In the related art, the execution script corresponding to each test case needs to be rewritten by manpower according to the data change, and the maintenance cost of the test case is high.
Disclosure of Invention
The invention provides a test case management method, a device, equipment and a medium, which are used for solving the problems of low conversion rate of test cases and higher maintenance cost of the test cases in a test case management scheme of the related technology.
According to an aspect of the present invention, there is provided a test case management method, including:
acquiring a script variable table corresponding to a target test case; the script variable table comprises equipment interaction related information and instrument interaction related information of the target test case;
according to the equipment interaction association information, equipment interaction script variables corresponding to the target test cases are determined, and equipment interaction execution scripts corresponding to the target test cases are generated according to the equipment interaction script variables;
and determining the instrument interaction script variable corresponding to the target test case according to the instrument interaction association information, and generating an instrument interaction execution script corresponding to the target test case according to the instrument interaction script variable.
According to another aspect of the present invention, there is provided a test case management apparatus including:
the table acquisition module is used for acquiring a script variable table corresponding to the target test case; the script variable table comprises equipment interaction related information and instrument interaction related information of the target test case;
The first script generation module is used for determining equipment interaction script variables corresponding to the target test cases according to the equipment interaction association information and generating equipment interaction execution scripts corresponding to the target test cases according to the equipment interaction script variables;
and the second script generation module is used for determining the instrument interaction script variable corresponding to the target test case according to the instrument interaction association information and generating an instrument interaction execution script corresponding to the target test case according to the instrument interaction script variable.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the test case management method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the test case management method according to any one of the embodiments of the present invention when executed.
According to the technical scheme, the script variable table corresponding to the target test case is obtained, and the script variable table comprises equipment interaction associated information and instrument interaction associated information of the target test case; according to the device interaction association information, determining a device interaction script variable corresponding to the target test case, and generating a device interaction execution script corresponding to the target test case according to the device interaction script variable; according to the instrument interaction association information, instrument interaction script variables corresponding to the target test cases are determined, instrument interaction execution scripts corresponding to the target test cases are generated according to the instrument interaction script variables, the problem that in a test case management scheme of the related technology, the conversion rate of the test cases is low, and the maintenance cost of the test cases is high is solved, the problem that the test cases are managed through script variable tables is solved, device interaction execution scripts and instrument interaction execution scripts corresponding to the test cases are automatically generated according to script variable tables corresponding to the test cases, and therefore execution scripts corresponding to the test cases are obtained, automatic generation of the execution scripts corresponding to the test cases is achieved, the conversion rate of the test cases is improved, and the beneficial effects of the maintenance cost of the test cases are reduced.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a test case management method according to a first embodiment of the present invention.
Fig. 2A is a flowchart of a test case management method according to a second embodiment of the present invention.
Fig. 2B is a schematic diagram of a test case management process according to a second embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a test case management device according to a third embodiment of the present invention.
Fig. 4 is a schematic structural diagram of an electronic device implementing a test case management method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "object," "first," "second," and the like in the description and the claims of the present invention and the above drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a test case management method according to a first embodiment of the present invention, where the embodiment is applicable to managing test cases of all network switching devices, and automatically generates an execution script corresponding to a specified test case according to real-time test requirements. The method may be performed by a test case management device, which may be implemented in hardware and/or software, which may be configured in an electronic device. As shown in fig. 1, the method includes:
and step 101, acquiring a script variable table corresponding to the target test case. After completion of the execution of step 101, steps 102 and 103 are executed in parallel.
The script variable table comprises equipment interaction related information and instrument interaction related information of the target test case.
Alternatively, after the completion of the execution of step 101, steps 102 and 103 may also be executed in series. For example, after completion of the execution of step 101, step 102 is executed, and then, after completion of the execution of step 102, step 103 is executed.
Optionally, the target test case is a test case of a network switching device that needs to generate an execution script at the current time. The execution script corresponding to the target test case comprises a device interaction execution script and a meter interaction execution script.
Optionally, the device interaction execution script is an execution script that interacts with a specified network switching device. The configuration command can be issued to the designated network switching equipment by calling the equipment interaction execution script, and the return display information returned by the designated network switching equipment is checked.
Optionally, the meter interaction execution script is an execution script that interacts with the network test meter. The network test instrument can be controlled to send the constructed data flow to the port of the designated network switching equipment by calling the instrument interaction execution script, the data flow forwarded by the designated network switching equipment through the port is received, the flow statistical results such as time delay, throughput and the like of the data flow processed by the designated network switching equipment are obtained, and then the flow statistical results are checked.
Optionally, the script variable table corresponding to the test case is a data table for storing device interaction related information and meter interaction related information of the test case. Each script variable table corresponds to a test case.
Optionally, the device interaction related information is information for determining a device interaction script variable in a device interaction execution script corresponding to the test case. The device interaction execution scripts corresponding to all the test cases contain the same script content and different script content. The different script content contained in each device interaction execution script is a device interaction script variable in each device interaction execution script.
Optionally, the device interaction script variables include: device connection information, configuration instructions, and desired playback information. The device connection information is information for connecting the specified network switching device. The designated network switching device is the network switching device that the target test case needs to test. The configuration instruction is a configuration instruction that needs to be issued to the specified network switching device. The expected echo information is echo information which needs to be returned by the appointed network switching equipment in a normal working state after the configuration command is issued to the appointed network switching equipment.
Optionally, the meter interaction related information is information for determining a meter interaction script variable in a meter interaction execution script corresponding to the test case. The instrument interaction execution scripts corresponding to all the test cases contain the same script content and different script content. The different script content contained in each instrument interaction execution script is an instrument interaction script variable in each instrument interaction execution script.
Optionally, the meter interaction script variables include: meter connection information, header configuration information, and expected flow statistics. The meter connection information is information for connecting the network test meter. The network test instrument is an electronic device for sending the constructed data flow to the port of the designated network switching device, receiving the data flow forwarded by the designated network switching device through the port, and obtaining flow statistical results such as delay, throughput and the like of the data flow processed by the designated network switching device. Data traffic refers to sending a large number of messages to form traffic. The header configuration information is information of a header set for each message forming the flow. The expected flow statistics result is the flow statistics result such as delay, throughput and the like of the data flow processed by the designated network switching equipment in the normal working state.
Optionally, the device interaction related information of the target test case includes a device number, a configuration instruction corresponding to the target test case, and expected echo information corresponding to the target test case. And the equipment number in the equipment interaction associated information is the equipment number of the designated network switching equipment which needs to be tested by the target test case. According to the equipment numbers, the equipment connection information of the designated network switching equipment required to be tested by the target test case can be obtained from the configuration file containing the equipment numbers and the equipment connection information of all the network switching equipment, so that the equipment connection information required to be contained in the equipment interaction execution script corresponding to the target test case is obtained. The configuration instruction corresponding to the target test case in the device interaction association information is the configuration instruction needed to be contained in the device interaction execution script corresponding to the target test case. The expected echo information corresponding to the target test case in the equipment interaction associated information is the expected echo information needed to be contained in the equipment interaction execution script corresponding to the target test case.
Optionally, the meter interaction related information of the target test case includes a meter port number, message header configuration information corresponding to the target test case, and expected flow statistics result corresponding to the target test case. And the instrument port number in the instrument interaction associated information is the port number of the network test instrument to which the target test case needs to be connected. According to the instrument port numbers, the instrument connection information of the network test instrument which is required to be connected with the target test case can be obtained from configuration files containing the instrument port numbers and the instrument connection information of all the network test instruments, so that the instrument connection information which is required to be contained in the instrument interaction execution script corresponding to the target test case is obtained. The message header configuration information corresponding to the target test case in the instrument interaction association information is the message header configuration information needed to be contained in the instrument interaction execution script corresponding to the target test case. And the expected flow statistical result corresponding to the target test case in the instrument interaction related information is the expected flow statistical result needed to be contained in the instrument interaction execution script corresponding to the target test case.
Optionally, before obtaining the script variable table corresponding to the target test case, the method further includes: and acquiring equipment interaction associated information and instrument interaction associated information of the target test case input by a user, and storing the equipment interaction associated information and the instrument interaction associated information into a script variable table corresponding to the target test case.
In a specific example, the device interaction related information of the target test case includes a device number, a configuration instruction corresponding to the target test case, and expected echo information corresponding to the target test case. The instrument interaction associated information of the target test case comprises an instrument port number, message header configuration information corresponding to the target test case and expected flow statistics results corresponding to the target test case. The script variable table corresponding to the target test case comprises 6 columns: column a, column B, column C, column D, column E, and column F. Column a is used to store the device number. And B column is used for storing configuration instructions corresponding to the target test cases. And C column is used for storing the expected display information corresponding to the target test case. Column D is used to store the meter port number. And E column is used for storing message header configuration information corresponding to the target test case. And F, storing an expected flow statistical result corresponding to the target test case. Between each column of content, a linefeed is required. The stored information is wrapped in brackets. Columns A through F are all empty, indicating that the target test case is over. Each cell of column a can only store one device number. When multiple devices need to be configured, the devices are sequentially filled in according to the rows. The configuration commands in column B are complete. After the configuration command is stored in the column B, if the corresponding back display information needs to be checked, the expected back display information is stored in the column C in the same row, otherwise, the column C in the same row is empty. The D column may store a plurality of meter port numbers separated by spaces. The header configuration information in column E is stored in the data format of the dictionary. The expected flow statistics in column F are stored in the form of expressions.
And 102, determining a device interaction script variable corresponding to the target test case according to the device interaction association information, and generating a device interaction execution script corresponding to the target test case according to the device interaction script variable.
Optionally, the device interaction script variables include: device connection information, configuration instructions, and desired playback information; and determining the equipment interaction script variable corresponding to the target test case according to the equipment interaction association information, wherein the method comprises the following steps: determining equipment connection information corresponding to the target test case according to the equipment number in the equipment interaction association information; extracting a configuration instruction corresponding to the target test case from the equipment interaction association information; and extracting expected echo information corresponding to the target test case from the equipment interaction associated information.
Optionally, the device numbers and the device connection information of all the network switching devices are correspondingly stored in the configuration file containing the device numbers and the device connection information of all the network switching devices. According to the equipment number in the equipment interaction association information, determining equipment connection information corresponding to the target test case, including: inquiring a target equipment number which is the same as the equipment number in the equipment interaction related information in a configuration file containing the equipment numbers and the equipment connection information of all the network switching equipment; and determining the device connection information corresponding to the target device number as the device connection information of the designated network switching device to be tested by the target test case, thereby acquiring the device connection information needed to be contained in the device interaction execution script corresponding to the target test case.
Optionally, the generating, according to the device interaction script variable, a device interaction execution script corresponding to the target test case includes: and filling the equipment connection information, the configuration instruction and the expected echo information into an equipment interaction script template to obtain an equipment interaction execution script corresponding to the target test case.
Alternatively, the device interaction script template may be a user-written device interaction execution script that does not contain device interaction script variables. The device interaction script template contains the filling position of the device interaction script variable. And filling the equipment interaction script variable into the equipment interaction script template according to the filling position of the equipment interaction script variable, and obtaining a complete equipment interaction execution script.
Optionally, the device interaction script variable includes the device connection information, the configuration instruction, and the desired echo information. And filling the equipment connection information, the configuration instruction and the expected echo information into an equipment interaction script template to obtain an equipment interaction execution script corresponding to the target test case. And calling the equipment interaction execution script, and sending a configuration command to the designated network switching equipment and checking the return display information returned by the designated network switching equipment.
And step 103, determining the instrument interaction script variable corresponding to the target test case according to the instrument interaction related information, and generating an instrument interaction execution script corresponding to the target test case according to the instrument interaction script variable.
Optionally, the meter interaction script variables include: meter connection information, message header configuration information and expected flow statistics; and determining the instrument interaction script variable corresponding to the target test case according to the instrument interaction association information, wherein the method comprises the following steps: according to the instrument port number in the instrument interaction association information, determining instrument connection information corresponding to the target test case; extracting message header configuration information corresponding to the target test case from the instrument interaction association information; and extracting expected flow statistical results corresponding to the target test cases from the instrument interaction association information.
Optionally, the configuration file containing the instrument port numbers and the instrument connection information of all the network test instruments correspondingly stores the instrument port numbers and the instrument connection information of all the network test instruments. According to the instrument port number in the instrument interaction association information, determining instrument connection information corresponding to the target test case comprises the following steps: inquiring a target instrument port number which is the same as the instrument port number in the instrument interaction related information in a configuration file containing the instrument port numbers and instrument connection information of all network test instruments; and determining the instrument connection information corresponding to the port number of the target instrument as the instrument connection information of the network test instrument to which the target test case needs to be connected, thereby acquiring the instrument connection information needed to be contained in the instrument interaction execution script corresponding to the target test case.
Optionally, the generating, according to the instrument interaction script variable, an instrument interaction execution script corresponding to the target test case includes: and filling the instrument connection information, the message header configuration information and the expected flow statistical result into an instrument interaction script template to obtain an instrument interaction execution script corresponding to the target test case.
Alternatively, the meter interaction script template may be a user-written meter interaction execution script that does not contain meter interaction script variables. The meter interaction script template contains the filling position of the meter interaction script variable. And filling the instrument interaction script variables into an instrument interaction script template according to filling positions of the instrument interaction script variables, and then obtaining a complete instrument interaction execution script. The instrument interaction execution script is called, the network test instrument can be controlled to send the constructed data flow to the port of the designated network switching equipment, the data flow forwarded by the designated network switching equipment through the port is received, the flow statistical results such as time delay, throughput and the like of the data flow processed by the designated network switching equipment are obtained, and then the flow statistical results are checked.
Optionally, after storing the device interaction related information and the meter interaction related information in a script variable table corresponding to the target test case, the method further includes: and acquiring the table updating information input by the user, and updating the equipment interaction associated information and/or the instrument interaction associated information in the script variable table according to the table updating information.
Optionally, the table update information is information for updating the device interaction related information and/or the meter interaction related information of the target test case. The table update information contains new device interaction related information and/or meter interaction related information. And replacing the device interaction associated information and/or the instrument interaction associated information in the script variable table with new device interaction associated information and/or instrument interaction associated information.
Optionally, if a certain test case changes, a device interaction script variable or a meter interaction script variable corresponding to the test case changes, and only the corresponding script variable table needs to be modified, and then a corresponding device interaction execution script and a meter interaction execution script can be automatically generated according to the updated script variable table.
Optionally, if a certain configuration command changes, only a plurality of script variable tables containing the configuration command need to be modified, and then a corresponding device interaction execution script can be automatically generated according to the updated configuration command.
Optionally, if a certain expected flow statistical result changes, only a plurality of script variable tables containing the expected flow statistical result need to be modified, and then a corresponding instrument interaction execution script can be automatically generated according to the updated expected flow statistical result.
According to the technical scheme, the script variable table corresponding to the target test case is obtained, and the script variable table comprises equipment interaction associated information and instrument interaction associated information of the target test case; according to the device interaction association information, determining a device interaction script variable corresponding to the target test case, and generating a device interaction execution script corresponding to the target test case according to the device interaction script variable; according to the instrument interaction association information, instrument interaction script variables corresponding to the target test cases are determined, instrument interaction execution scripts corresponding to the target test cases are generated according to the instrument interaction script variables, the problem that in a test case management scheme of the related technology, the conversion rate of the test cases is low, and the maintenance cost of the test cases is high is solved, the problem that the test cases are managed through script variable tables is solved, device interaction execution scripts and instrument interaction execution scripts corresponding to the test cases are automatically generated according to script variable tables corresponding to the test cases, and therefore execution scripts corresponding to the test cases are obtained, automatic generation of the execution scripts corresponding to the test cases is achieved, the conversion rate of the test cases is improved, and the beneficial effects of the maintenance cost of the test cases are reduced.
Example two
FIG. 2A is a flowchart of a test case management method according to a second embodiment of the present invention, where the embodiment of the present invention may be combined with each of the alternatives in one or more embodiments described above. As shown in fig. 2A, the method includes:
step 201, a script variable table corresponding to the target test case is obtained. After completion of the execution of step 201, steps 202 and 206 are executed in parallel.
The script variable table comprises equipment interaction related information and instrument interaction related information of the target test case.
Optionally, steps 202-205 and steps 206-209 may also be performed serially after the completion of step 201 execution. For example, steps 202-205 are performed after the completion of the execution of step 201, and then steps 206-209 are performed after the completion of the execution of steps 202-205.
Step 202, determining device connection information corresponding to the target test case according to the device number in the device interaction association information.
And 203, extracting a configuration instruction corresponding to the target test case from the equipment interaction association information.
And 204, extracting expected echo information corresponding to the target test case from the equipment interaction associated information.
And 205, filling the equipment connection information, the configuration instruction and the expected echo information into an equipment interaction script template to obtain an equipment interaction execution script corresponding to the target test case.
And 206, determining the instrument connection information corresponding to the target test case according to the instrument port number in the instrument interaction association information.
Step 207, extracting message header configuration information corresponding to the target test case from the instrument interaction association information.
And step 208, extracting expected flow statistics corresponding to the target test case from the instrument interaction association information.
And step 209, filling the instrument connection information, the message header configuration information and the expected flow statistical result into an instrument interaction script template to obtain an instrument interaction execution script corresponding to the target test case.
According to the technical scheme, the problem that in a test case management scheme of the related technology, the conversion rate of the test case is low, and the maintenance cost of the test case is high is solved, the test case is managed through the script variable table, and the device interaction execution script and the instrument interaction execution script corresponding to the test case are automatically generated according to the script variable table corresponding to the test case, so that the execution script corresponding to the test case is obtained, the execution script corresponding to the test case is automatically generated, the conversion rate of the test case is improved, and the maintenance cost of the test case is reduced.
In one specific example, the script variable table corresponding to the target test case includes 6 columns: column a, column B, column C, column D, column E, and column F. Column a is used to store the device number. And the B column is used for storing configuration instructions corresponding to the target test cases. And the C column is used for storing expected display back information corresponding to the target test case. Column D is used to store the meter port number. And E column is used for storing message header configuration information corresponding to the target test case. And F, storing an expected flow statistical result corresponding to the target test case. As shown in FIG. 2B, the test case management process for the target test case may include:
step 211, reading the device number in column a.
And 212, determining the device connection information corresponding to the target test case according to the device number.
And 213, filling the device connection information into a device interaction script template.
Step 214, reading a configuration instruction corresponding to the target test case in the column B.
And step 215, filling the configuration instruction into the equipment interaction script template.
And step 216, reading expected echo information corresponding to the target test case in the C column.
And step 217, filling the expected back display information into the equipment interaction script template.
Step 218, reading the meter port number in column D.
And 219, determining the instrument connection information corresponding to the target test case according to the instrument port number.
And 220, filling the instrument connection information into an instrument interaction script template.
Step 221, reading the header configuration information corresponding to the target test case in the E column.
Step 222, converting the data type of the header configuration information from the character string data type to the data type of the dictionary.
And 223, filling the message header configuration information into an instrument interaction script template.
Step 224, reading the expected flow statistics corresponding to the target test case in the F column.
And 225, filling the expected flow statistics result into the instrument interaction script template.
Example III
Fig. 3 is a schematic structural diagram of a test case management device according to a third embodiment of the present invention. The apparatus may be configured in an electronic device. As shown in fig. 3, the apparatus includes: a table acquisition module 301, a first script generation module 302, and a second script generation module 303.
The table obtaining module 301 is configured to obtain a script variable table corresponding to the target test case; the script variable table comprises equipment interaction related information and instrument interaction related information of the target test case; the first script generating module 302 is configured to determine, according to the device interaction association information, a device interaction script variable corresponding to the target test case, and generate, according to the device interaction script variable, a device interaction execution script corresponding to the target test case; and the second script generating module 303 is configured to determine, according to the instrument interaction association information, an instrument interaction script variable corresponding to the target test case, and generate, according to the instrument interaction script variable, an instrument interaction execution script corresponding to the target test case.
According to the technical scheme, the script variable table corresponding to the target test case is obtained, and the script variable table comprises equipment interaction associated information and instrument interaction associated information of the target test case; according to the device interaction association information, determining a device interaction script variable corresponding to the target test case, and generating a device interaction execution script corresponding to the target test case according to the device interaction script variable; according to the instrument interaction association information, instrument interaction script variables corresponding to the target test cases are determined, instrument interaction execution scripts corresponding to the target test cases are generated according to the instrument interaction script variables, the problem that in a test case management scheme of the related technology, the conversion rate of the test cases is low, and the maintenance cost of the test cases is high is solved, the problem that the test cases are managed through script variable tables is solved, device interaction execution scripts and instrument interaction execution scripts corresponding to the test cases are automatically generated according to script variable tables corresponding to the test cases, and therefore execution scripts corresponding to the test cases are obtained, automatic generation of the execution scripts corresponding to the test cases is achieved, the conversion rate of the test cases is improved, and the beneficial effects of the maintenance cost of the test cases are reduced.
In an optional implementation manner of the embodiment of the present invention, optionally, the device interaction script variable includes: device connection information, configuration instructions, and desired playback information; the first script generating module 302 is specifically configured to, when executing the operation of determining the device interaction script variable corresponding to the target test case according to the device interaction association information: determining equipment connection information corresponding to the target test case according to the equipment number in the equipment interaction association information; extracting a configuration instruction corresponding to the target test case from the equipment interaction association information; and extracting expected echo information corresponding to the target test case from the equipment interaction associated information.
In an optional implementation manner of the embodiment of the present invention, optionally, when executing an operation of generating a device interaction execution script corresponding to the target test case according to the device interaction script variable, the first script generating module 302 is specifically configured to: and filling the equipment connection information, the configuration instruction and the expected echo information into an equipment interaction script template to obtain an equipment interaction execution script corresponding to the target test case.
In an optional implementation manner of the embodiment of the present invention, optionally, the instrument interaction script variable includes: meter connection information, message header configuration information and expected flow statistics; the second script generating module 303 is specifically configured to, when executing the operation of determining the instrument interaction script variable corresponding to the target test case according to the instrument interaction association information: according to the instrument port number in the instrument interaction association information, determining instrument connection information corresponding to the target test case; extracting message header configuration information corresponding to the target test case from the instrument interaction association information; and extracting expected flow statistical results corresponding to the target test cases from the instrument interaction association information.
In an optional implementation manner of the embodiment of the present invention, optionally, when executing an operation of generating a meter interaction execution script corresponding to the target test case according to the meter interaction script variable, the second script generation module 303 is specifically configured to: and filling the instrument connection information, the message header configuration information and the expected flow statistical result into an instrument interaction script template to obtain an instrument interaction execution script corresponding to the target test case.
In an optional implementation manner of the embodiment of the present invention, optionally, the test case management apparatus further includes: the table storage module is used for acquiring the equipment interaction associated information and the instrument interaction associated information of the target test case input by a user, and storing the equipment interaction associated information and the instrument interaction associated information into a script variable table corresponding to the target test case.
In an optional implementation manner of the embodiment of the present invention, optionally, the test case management apparatus further includes: and the table updating module is used for acquiring the table updating information input by the user and updating the equipment interaction associated information and/or the instrument interaction associated information in the script variable table according to the table updating information.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The test case management device can execute the test case management method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the test case management method.
Example IV
FIG. 4 shows a schematic diagram of an electronic device 10 that may be used to implement the test case management method of an embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program built into the Random Access Memory (RAM) 13 from the storage unit 18. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as test case management methods.
In some embodiments, the test case management method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When a computer program is built into RAM 13 and executed by processor 11, one or more steps of the test case management method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the test case management method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
The computer program used to implement the test case management methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A test case management method, comprising:
acquiring a script variable table corresponding to a target test case; the script variable table comprises equipment interaction related information and instrument interaction related information of the target test case;
according to the equipment interaction association information, equipment interaction script variables corresponding to the target test cases are determined, and equipment interaction execution scripts corresponding to the target test cases are generated according to the equipment interaction script variables;
And determining the instrument interaction script variable corresponding to the target test case according to the instrument interaction association information, and generating an instrument interaction execution script corresponding to the target test case according to the instrument interaction script variable.
2. The method of claim 1, wherein the device interaction script variables comprise: device connection information, configuration instructions, and desired playback information;
and determining the equipment interaction script variable corresponding to the target test case according to the equipment interaction association information, wherein the method comprises the following steps:
determining equipment connection information corresponding to the target test case according to the equipment number in the equipment interaction association information;
extracting a configuration instruction corresponding to the target test case from the equipment interaction association information;
and extracting expected echo information corresponding to the target test case from the equipment interaction associated information.
3. The method of claim 2, wherein generating a device interaction execution script corresponding to the target test case based on the device interaction script variables comprises:
and filling the equipment connection information, the configuration instruction and the expected echo information into an equipment interaction script template to obtain an equipment interaction execution script corresponding to the target test case.
4. The method of claim 1, wherein the meter interaction script variables comprise: meter connection information, message header configuration information and expected flow statistics;
and determining the instrument interaction script variable corresponding to the target test case according to the instrument interaction association information, wherein the method comprises the following steps:
according to the instrument port number in the instrument interaction association information, determining instrument connection information corresponding to the target test case;
extracting message header configuration information corresponding to the target test case from the instrument interaction association information;
and extracting expected flow statistical results corresponding to the target test cases from the instrument interaction association information.
5. The method of claim 4, wherein generating the meter interaction execution script corresponding to the target test case based on the meter interaction script variables comprises:
and filling the instrument connection information, the message header configuration information and the expected flow statistical result into an instrument interaction script template to obtain an instrument interaction execution script corresponding to the target test case.
6. The method of claim 1, further comprising, prior to obtaining the script variable table corresponding to the target test case:
And acquiring equipment interaction associated information and instrument interaction associated information of the target test case input by a user, and storing the equipment interaction associated information and the instrument interaction associated information into a script variable table corresponding to the target test case.
7. The method of claim 6, further comprising, after storing the device interaction related information and the meter interaction related information in a script variable table corresponding to the target test case:
and acquiring the table updating information input by the user, and updating the equipment interaction associated information and/or the instrument interaction associated information in the script variable table according to the table updating information.
8. A test case management apparatus, comprising:
the table acquisition module is used for acquiring a script variable table corresponding to the target test case; the script variable table comprises equipment interaction related information and instrument interaction related information of the target test case;
the first script generation module is used for determining equipment interaction script variables corresponding to the target test cases according to the equipment interaction association information and generating equipment interaction execution scripts corresponding to the target test cases according to the equipment interaction script variables;
And the second script generation module is used for determining the instrument interaction script variable corresponding to the target test case according to the instrument interaction association information and generating an instrument interaction execution script corresponding to the target test case according to the instrument interaction script variable.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the test case management method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the test case management method of any one of claims 1-7 when executed.
CN202210677349.3A 2022-06-15 2022-06-15 Test case management method, device, equipment and medium Pending CN117271303A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210677349.3A CN117271303A (en) 2022-06-15 2022-06-15 Test case management method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210677349.3A CN117271303A (en) 2022-06-15 2022-06-15 Test case management method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117271303A true CN117271303A (en) 2023-12-22

Family

ID=89199601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210677349.3A Pending CN117271303A (en) 2022-06-15 2022-06-15 Test case management method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117271303A (en)

Similar Documents

Publication Publication Date Title
CN114816578A (en) Method, device and equipment for generating program configuration file based on configuration table
CN116975081A (en) Log diagnosis set updating method, device, equipment and storage medium
CN114722048B (en) Data processing method and device, electronic equipment and storage medium
CN117271303A (en) Test case management method, device, equipment and medium
CN116009847A (en) Code generation method, device, electronic equipment and storage medium
CN115309730A (en) Data auditing method and device, electronic equipment and storage medium
CN115269431A (en) Interface testing method and device, electronic equipment and storage medium
CN115168358A (en) Database access method and device, electronic equipment and storage medium
CN114996107A (en) Log file updating method, device, equipment, medium and product
CN114756468A (en) Test data creating method, device, equipment and storage medium
CN115017047A (en) Test method, system, equipment and medium based on B/S architecture
CN114706610A (en) Business flow chart generation method, device, equipment and storage medium
CN115860121B (en) Text reasoning method, device, equipment and storage medium
CN115293096B (en) Line generation method, device, electronic equipment and storage medium
CN117252180B (en) Report generation method and device, electronic equipment and storage medium
CN115934550A (en) Test method, test device, electronic equipment and storage medium
CN115794255A (en) Data processing method and device, electronic equipment and storage medium
CN116820656A (en) Large screen interface generation method, device, equipment and storage medium
CN117540718A (en) Intelligent inspection result statistical method based on document object model
CN115567624A (en) Message processing method and device, electronic equipment and medium
CN117278648A (en) Protocol dynamic adaptation method, device, electronic equipment and storage medium
CN115099435A (en) Work order processing method, work order processing device, electronic equipment and medium
CN117632120A (en) Processing system, method, equipment and storage medium for report data
CN116541187A (en) Buffer space management method, device, equipment and medium of electronic control unit
CN115951921A (en) Service processing method, device and storage medium

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