CN111475401A - Test method and related equipment - Google Patents

Test method and related equipment Download PDF

Info

Publication number
CN111475401A
CN111475401A CN202010180489.0A CN202010180489A CN111475401A CN 111475401 A CN111475401 A CN 111475401A CN 202010180489 A CN202010180489 A CN 202010180489A CN 111475401 A CN111475401 A CN 111475401A
Authority
CN
China
Prior art keywords
test case
target
test
module
function module
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
CN202010180489.0A
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 International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City 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 Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202010180489.0A priority Critical patent/CN111475401A/en
Publication of CN111475401A publication Critical patent/CN111475401A/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 embodiment of the application discloses a test method and related equipment, wherein the method is applied to the technical field of data acquisition and comprises the following steps: when the target function module in the at least one function module is detected to be updated, determining at least one test case associated with the target function module according to a preset test case management map, outputting identification information of each test case in the at least one test case, determining the target test case from the at least one test case based on control operation aiming at the target identification information in the identification information of each test case, and running the target test case to test the service system. By implementing the embodiment of the application, when the target function corresponding to the service system is updated, the test can be performed based on the test case associated with the target function, so that the test accuracy of the service system is improved, and the online accidents of the service system are reduced.

Description

Test method and related equipment
Technical Field
The invention relates to the technical field of data acquisition, in particular to a testing method and related equipment.
Background
Software testing for a service system is an important means for ensuring the operation quality of the service system. In the automatic test process aiming at the business system, firstly, a test machine executes a test case to obtain an operation result corresponding to the test case; and then, the test machine calculates the operation success rate of the preset batch according to the operation result corresponding to each test case.
The management of the test cases is generally based on files (such as excel, csv) or a relational database, and is grouped by an interface or a corresponding functional module of the test system and other rules, so that the test cases are only concentrated on a single function, and the test cases cannot play the maximum role of the cases in the test process. For example, a is a test case set, B is another test case set, and when the change of the functional module covered by A, B affects other functional modules in the business system, if the test case set separately covering the changed functional point in the testing process generates a missing problem, thereby causing an online accident of the business system.
Disclosure of Invention
The embodiment of the application provides a testing method and related equipment, which can perform testing based on a test case associated with a target function when the target function corresponding to the service system is updated, and are beneficial to improving the testing accuracy of the service system and reducing online accidents of the service system.
In a first aspect, an embodiment of the present application provides a testing method, where the method is applied to a terminal device, and the method includes:
when a preset trigger event of a service system is detected, detecting whether each functional module in at least one functional module corresponding to the service system is updated;
when the target function module in the at least one function module is detected to be updated, determining at least one test case associated with the target function module according to a preset test case management map, wherein the preset test case management map records the association relationship among the function modules and the association relationship between the function modules and the test cases;
outputting identification information of each test case in the at least one test case;
determining a target test case from the at least one test case based on a control operation for target identification information in the identification information of each test case, wherein the target identification information is any one of the identification information of each test case;
and running the target test case to test the service system.
In an embodiment, before determining at least one test case associated with the target function module according to a preset test case management map, a map editing window may be further displayed, where the map editing window includes a map editing area, a first component list area corresponding to a function module and a second component list area corresponding to a test case, the first component list area includes first components corresponding to the function templates, and the second component list area includes second components corresponding to the test cases; respectively determining a first target component from each first component and a second target component from each second component based on a first management operation input for the first component list area and a second management operation input for the second component list area; adding the first target component and the second target component to the graph edit region; and typesetting the first target assembly and the second target assembly in the map editing area based on the typesetting operation aiming at the first target assembly and the second target assembly to obtain a test case management map.
In one embodiment, before determining at least one test case associated with the target function module according to a preset test case management map, an association relationship between each function module in the at least one function module and the test case may also be created; acquiring the calling relation of interfaces among the functional modules through a performance management tool; determining the incidence relation among the functional modules according to the calling relation; and generating a test case management map based on the incidence relation between each functional module and the test case and the incidence relation between each functional module.
In an embodiment, the specific implementation manner of detecting whether each functional module in at least one functional module corresponding to the service system is updated is as follows: acquiring a program code corresponding to the service system submitted by a user; acquiring a historical program code corresponding to the service system from a preset code management area; and comparing the program codes with the historical program codes, and determining whether each functional module in at least one functional module corresponding to the business system is updated or not based on the comparison result.
In one embodiment, before obtaining a historical program code corresponding to the business system from a preset code management area, whether a function update tag exists in the program code may also be detected; and if the program code is detected to have no function updating label, triggering and executing the step of acquiring the historical program code corresponding to the service system from a preset code management area.
In an embodiment, after detecting whether the function update tag exists in the program code, if it is detected that the function update tag exists in the program code, it may also be determined that a target function module corresponding to the function update tag in at least one function module corresponding to the service system is updated.
In an embodiment, the specific implementation manner of determining at least one test case associated with the target function module according to a preset test case management map is as follows: determining a first test case associated with the target function module and an associated function module associated with the target function module according to an association relation among all function modules recorded in a preset test case management map; determining a second test case associated with the associated function module according to the association relationship between each function module and each test case recorded in a preset test case management map; and determining the first test case and the second test case as at least one test case associated with the target function module.
In a second aspect, the present application provides a test apparatus, which includes means for performing the method of the first aspect.
In a third aspect, an embodiment of the present application provides a terminal device, where the terminal device includes a processor, an output device, and a memory, where the processor, the output device, and the memory are connected to each other, where the memory is used to store a computer program that supports the terminal device to execute the method described above, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method described above in the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program, the computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method of the first aspect.
In the embodiment of the application, when the target function module in the at least one function module is detected to be updated, the at least one test case associated with the target function module is determined according to a preset test case management map, the identification information of each test case in the at least one test case is output, the target test case is determined from the at least one test case based on the control operation aiming at the target identification information in the identification information of each test case, and the target test case is operated to test the service system. By implementing the embodiment of the application, when the target function corresponding to the service system is updated, the test can be performed based on the test case associated with the target function, so that the test accuracy of the service system is improved, and the online accidents of the service system are reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a testing method provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart of another testing method provided in the embodiments of the present application;
FIG. 3a is a schematic diagram of a page of a graph editing window provided in an embodiment of the present application;
FIG. 3b is a diagram illustrating a test case management map according to an embodiment of the present application;
FIG. 3c is a diagram illustrating another example test case management map according to an embodiment of the present application;
FIG. 4 is a schematic block diagram of a testing apparatus provided in an embodiment of the present application;
fig. 5 is a schematic block diagram of a terminal device according to an embodiment of the present application.
Detailed Description
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 some, but not all, embodiments of the present invention. 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 invention.
Referring to fig. 1, fig. 1 is a schematic flowchart of a testing method provided in this embodiment, where the method may be applied to a terminal device or a server, the terminal device may run or access a service system, and the server is a background server corresponding to the service system, as shown in the figure, the testing method may include:
s101: when a preset trigger event of a service system is detected, whether each functional module in at least one functional module corresponding to the service system is updated is detected.
The preset trigger event includes version update of the service system, the time when the system time reaches the time indicated by the preset test period, or a test instruction for triggering the test.
In an embodiment, the terminal device or the server may detect a version update state of the service system, and may determine that a preset trigger event is detected if it is detected that the version of the service system is in a to-be-updated state. In another embodiment, the terminal device may detect the system time, and may determine that the predetermined trigger event is detected if the detected system time is the time indicated by the predetermined test period. In another embodiment, when the user wants to test the service system, a test instruction (e.g., an operation of clicking or pressing a test button) for triggering the test may be input through the terminal device, and when the terminal device detects the test operation, it may be determined that the preset trigger event is detected.
In one implementation, when the user performs version alternation on the service system, the program code corresponding to the service system after the version alternation may be uploaded to the terminal device or the server, and the terminal device or the server may store the program code after the version alternation and mark the version after the alternation as the state to be updated.
In an embodiment, the terminal device or the server may invoke a code manager to monitor a coding behavior of the developer in the designated area, and specifically, may obtain, in real time or according to a preset code obtaining period, a program code input by the developer in the designated area, and store the obtained program code in the preset code management area. Further, the terminal device or the server may obtain a program code corresponding to the service system submitted by the user (for example, a program code corresponding to the service system after the version is changed), obtain a historical program code corresponding to the service system from the preset code management area, compare the program code with the historical program code, and determine whether each function module in at least one function module corresponding to the service system is updated based on the comparison result.
In an embodiment, the determining whether each of the at least one functional module corresponding to the service system is updated based on the comparison result includes: if the comparison result indicates that the program codes of any one or more functional modules are different from the historical program codes, the update of any one or more functional modules in at least one functional module corresponding to the business system can be determined based on the comparison result.
In one embodiment, at least one function update tag is added to the program code corresponding to the business system submitted by the developer, and each function update tag is used for indicating that the program code corresponding to the corresponding function template is updated. In this case, after acquiring the program code corresponding to the service system submitted by the user, the terminal device or the server may detect whether the program code includes a function update tag, and if it is detected that the program code includes the function update tag, may determine that a target function module corresponding to the function update tag in at least one function module corresponding to the service system is updated. If not, it may be determined that each functional module of the at least one functional module corresponding to the service system is not updated.
In an embodiment, before acquiring the historical program code corresponding to the service system from the preset code management area, the terminal device or the server may further detect whether a function update tag exists in the program code submitted by the user, and if it is detected that the function update tag does not exist in the program code, trigger execution of the step of acquiring the historical program code corresponding to the service system from the preset code management area.
Or, in another embodiment, if it is detected that a function update tag exists in the program code, it is determined that a target function module corresponding to the function update tag in at least one function module corresponding to the business system is updated.
S102: and when the target function module in the at least one function module is detected to be updated, determining at least one test case associated with the target function module according to a preset test case management map.
In one embodiment, the preset test case management map records the association relationship between each functional module and each test case. In this case, when the terminal device or the server detects that the target function module in the at least one function module is updated, the at least one test case associated with the target function module may be determined based on the association relationship between the function modules and the association relationship between each function module and each test case recorded by the test case management map. The test cases associated with the target function module include not only the test cases corresponding to the self function module, but also the test cases corresponding to the function module associated with the target function module (hereinafter referred to as an associated function module).
In one implementation, after the terminal device or the server determines the at least one test case associated with the target function module, the at least one test case associated with the target function module may be executed to test the service system.
S103: and outputting the identification information of each test case in at least one test case. The identification information of the test case may be a case name, a case number, and the like, which uniquely identify the test case.
S104: and determining a target test case from the at least one test case based on the control operation of the target identification information in the identification information of each test case, and running the target test case to test the service system. The target identification information is any one of the identification information of the test cases. The input mode of the control operation may include clicking, pressing, sliding, or voice input, for example, the control operation may be a clicking operation for one or more target identification information.
In an embodiment, after the terminal device determines the at least one test case associated with the target function module, the terminal device may further output, in a display device (for example, a display screen of the terminal device or a display device connected to the terminal device), identification information of each test case in the at least one test case. Furthermore, after the user views the identification information of each test case, the test case to be tested can be selected from the identification information. Specifically, a user inputs a click operation (i.e., a control operation) to target identification information of a test case to be tested, and after detecting the click operation, the terminal device may determine the test case corresponding to the click operation (i.e., the test case corresponding to the target identification information) as a target test case, and run the target test case to test the service system. By adopting the mode, the reusability and the coverage of the test cases are improved, when the target function module is updated, the test can be performed based on the test cases associated with the target function, the test accuracy of the service system is improved, and the online accidents of the service system are reduced.
Or, when the embodiment of the application is executed by the server, after the server determines at least one test case associated with the target function module, the server may output identification information of each test case in the at least one test case to the terminal device or the client that establishes the communication connection in advance, and the terminal device or the client displays the identification information of each test case.
In an embodiment, after the terminal device or the server runs the target test case to test the service system, the running result of each target test case may be recorded, and whether the program code corresponding to the service system is correct is determined based on the running result, and if so, the program code may be automatically deployed to the server corresponding to the service system.
In the embodiment of the application, when the target function module in the at least one function module is detected to be updated, the at least one test case associated with the target function module is determined according to a preset test case management map, the identification information of each test case in the at least one test case is output, the target test case is determined from the at least one test case based on the control operation aiming at the target identification information in the identification information of each test case, and the target test case is operated to test the service system. By implementing the embodiment of the application, when the target function corresponding to the service system is updated, the test can be performed based on the test case associated with the target function, so that the test accuracy of the service system is improved, and the online accidents of the service system are reduced.
Referring to fig. 2, fig. 2 is a schematic view of another testing method provided in this embodiment, where the method is applied to a terminal device corresponding to a service system, and may be executed by the terminal device, and as shown in the figure, the testing method may include:
s201: when a preset trigger event of a service system is detected, whether each functional module in at least one functional module corresponding to the service system is updated is detected. For a specific implementation of step S201, reference may be made to the related description of step S101 in the foregoing embodiment, and details are not described here again.
S202: when the target function module in at least one function module is detected to be updated, a first test case associated with the target function module and an associated function module associated with the target function module are determined according to the association relationship among the function modules recorded in a preset test case management map.
S203: and determining a second test case associated with the associated function module according to the association relationship between each function module and each test case recorded in the preset test case management map.
In an embodiment, before the terminal device determines the first test case associated with the target function module according to the association relationship among the function modules recorded in the preset test case management map, the test case management map may be generated and stored in advance. The test cases are managed in the form of the map, so that the context is clearer compared with the current mode of maintaining the test cases by files or relationship data, and the management efficiency of the test cases is improved.
In one embodiment, the specific implementation of generating the test case management map includes: and displaying the map editing window, wherein the map editing window comprises a map editing area, a first component list area corresponding to the functional module and a second component list area corresponding to the test case, the first component list area comprises first components corresponding to the functional templates, and the second component list area comprises second components corresponding to the test cases. Further, based on a first management operation input for the first component list area and a second management operation input for the second component list area, a first target component is determined from each first component, a second target component is determined from each second component, the first target component and the second target component are added to the map editing area, and the first target component and the second target component are typeset in the map editing area based on the typesetting operation for the first target component and the second target component, so that the test case management map is obtained.
The first management operation is used to add the first component in the first component list area to the map editing area, for example, may be a pull operation to pull the first component to the map editing area, and the second management operation is used to add the second component in the second component list area to the map editing area, for example, may be a pull operation to pull the second component to the map editing area. The typesetting operation is used for establishing an association relationship between the first target component and between the first target component and the second target component, and may be, for example, a connection operation between the first target component and the first target component or a connection operation between the first target component and the second target component.
Illustratively, the map editing window may be as shown in fig. 3a, and the map editing region includes a map editing region, a first component list region and a second component list region, the first component list region includes first components 30 corresponding to each function module, and the second component list region includes second components 31 corresponding to each test case.
In an embodiment, before the terminal device determines at least one test case associated with the target function module according to a preset test case management map, an association relationship between each function module in the at least one function module and the test case may also be created, a call relationship of an interface between each function module is obtained through a performance management tool, the association relationship between each function module is determined according to the call relationship, and then the test case management map is generated based on the association relationship between each function module and the test case and the association relationship between each function module.
Illustratively, the performance management tool may be, for example, a distributed performance monitoring tool PinPoint, and PinPoint may obtain a call relationship of interfaces between the functional modules. If the functional module 1 and the functional module 2 call the same interface, it may be determined that the functional module 1 and the functional module 2 are related to each other.
In an embodiment, after the terminal device generates the test case management map based on the association relationship between each function module and the test case and the association relationship between each function module, the test case management map may be displayed, and after the user views the test case management map, the user may adjust the test case management map, for example, increase or decrease the test case corresponding to any function module, or adjust the association relationship between each function module, and the like.
In one embodiment, the test case management graph may be managed by Neo4j, where Neo4j is a high performance NOSQ L graph database that may store structured data on a network rather than in tables, an embedded, disk-based Java persistence engine with full transactional features, but stores structured data on a network (mathematically called a graph) rather than in tables.
Exemplarily, assuming that the preset test case management map is shown in fig. 3b, when it is detected that the functional module 1 (i.e. the target functional module is the functional module 1) is updated, determining the first test case associated with the functional module 1 through the association relationship among the functional modules recorded in fig. 3b includes: the system comprises a test case 1, a test case 2 and a test case 3, wherein a related function module related to a target function module is a function module 2; further, according to the association relationship between each function module and each test case recorded in fig. 3b, it may be determined that the second test case associated with the function module 2 includes: test case 3, test case 4, and test case 5.
S204: and determining the first test case and the second test case as at least one test case associated with the target function module.
S205: and outputting the identification information of each test case in at least one test case.
S206: and determining a target test case from the at least one test case based on the control operation of the target identification information in the identification information of each test case, and running the target test case to test the service system. For specific implementation of steps S205 to S206, reference may be made to the related description of steps S103 to S104 in the foregoing embodiment, and details are not described here again.
In an embodiment, the test type of each test case can be further marked in the test case management diagram, and the test types include performance test, functional test, safety test, parameter test and the like, so that the method is beneficial to assisting a user to quickly know the test type of each test case. Illustratively, a test case management diagram labeling test types may be as shown in FIG. 3 c.
In one embodiment, when the terminal device outputs the identification information of each test case in at least one test case, the terminal device may also output the test type of each test case, which is beneficial to assisting a user to select a target test case from each test case and input a control operation for the target test case.
In one embodiment, when a new test case is detected, the test type of the new test case may be detected and output, and a user may add a component corresponding to the new test case in a test case management diagram based on the test type.
In the embodiment of the application, when it is detected that a target function module in at least one function module is updated, a first test case associated with the target function module and an associated function module associated with the target function module are determined according to an association relationship between each function module recorded in a preset test case management map, a second test case associated with the associated function module is determined according to an association relationship between each function module and each test case recorded in the preset test case management map, and the first test case and the second test case are determined as at least one test case associated with the target function module. And further, outputting identification information of each test case in the at least one test case, determining a target test case from the at least one test case based on the control operation aiming at the target identification information in the identification information of each test case, and running the target test case to test the service system. By adopting the mode, the reusability and the coverage of the test cases are improved, when the target function module is updated, the test can be performed based on the test cases associated with the target function, the test accuracy of the service system is improved, and the online accidents of the service system are reduced.
The embodiment of the application also provides a testing device. The apparatus includes a module configured to execute the method described in fig. 1 or fig. 2, and is configured to a terminal device. Specifically, refer to fig. 4, which is a schematic block diagram of a testing apparatus provided in the embodiments of the present application. The test device of the embodiment comprises:
the detection module 40 is configured to detect whether each functional module in at least one functional module corresponding to a service system is updated when a preset trigger event of the service system is detected;
the processing module 41 is configured to determine, when the detection module detects that a target function module in the at least one function module is updated, at least one test case associated with the target function module according to a preset test case management map, where the preset test case management map records an association relationship between the function modules and an association relationship between each function module and each test case;
an output module 42, configured to output identification information of each test case in the at least one test case;
the processing module 41 is further configured to determine a target test case from the at least one test case based on a control operation on target identification information in the identification information of each test case, and run the target test case to test the service system, where the target identification information is any one of the identification information of each test case.
In one embodiment, the output module 42 is further configured to display a map editing window, where the map editing window includes a map editing area, a first component list area corresponding to a function module and a second component list area corresponding to a test case, where the first component list area includes a first component corresponding to each function template, and the second component list area includes a second component corresponding to each test case; the processing module 41 is further configured to determine a first target component from each first component and a second target component from each second component based on a first management operation input for the first component list area and a second management operation input for the second component list area; adding the first target component and the second target component to the graph edit region; and typesetting the first target assembly and the second target assembly in the map editing area based on the typesetting operation aiming at the first target assembly and the second target assembly to obtain a test case management map.
In an embodiment, the processing module 41 is further configured to create an association relationship between each functional module in the at least one functional module and a test case; acquiring the calling relation of interfaces among the functional modules through a performance management tool; determining the incidence relation among the functional modules according to the calling relation; and generating a test case management map based on the incidence relation between each functional module and the test case and the incidence relation between each functional module.
In an embodiment, the detection module 40 is specifically configured to obtain a program code corresponding to the service system submitted by a user; acquiring a historical program code corresponding to the service system from a preset code management area; and comparing the program codes with the historical program codes, and determining whether each functional module in at least one functional module corresponding to the business system is updated or not based on the comparison result.
In one embodiment, the detecting module 40 is further configured to detect whether a function update tag exists in the program code; and if the program code is detected to have no function updating label, executing the historical program code corresponding to the service system acquired from a preset code management area.
In an embodiment, the detecting module 40 is further configured to determine that a target function module corresponding to the function update tag in at least one function module corresponding to the service system is updated if it is detected that the function update tag exists in the program code.
In an embodiment, the processing module 41 is specifically configured to determine, according to an association relationship among the functional modules recorded in a preset test case management map, a first test case associated with the target functional module and an associated functional module associated with the target functional module; determining a second test case associated with the associated function module according to the association relationship between each function module and each test case recorded in a preset test case management map; and determining the first test case and the second test case as at least one test case associated with the target function module.
It should be noted that the functions of the functional modules of the test apparatus described in the embodiment of the present application may be specifically implemented according to the method in the embodiment of the method described in fig. 1 or fig. 2, and the specific implementation process may refer to the description related to the embodiment of the method in fig. 1 or fig. 2, which is not described herein again.
Referring to fig. 5, fig. 5 is a schematic block diagram of a terminal device according to an embodiment of the present disclosure, and as shown in fig. 5, the terminal device includes a processor 501, a memory 502, and an output device 503. The processor 501, the memory 502 and the output device 503 may be connected by a bus or other means, and in fig. 5 shown in the embodiment of the present application, the bus connection is taken as an example. Wherein the memory 502 is adapted to store a computer program comprising program instructions and the processor 501 is adapted to execute the program instructions stored by the memory 502. Wherein the processor 501 is configured to call the program instruction to perform: when a preset trigger event of a service system is detected, detecting whether each functional module in at least one functional module corresponding to the service system is updated; when the target function module in the at least one function module is detected to be updated, determining at least one test case associated with the target function module according to a preset test case management map, wherein the preset test case management map records the association relationship among the function modules and the association relationship between the function modules and the test cases; outputting identification information of each test case in the at least one test case through an output device 503; and determining a target test case from the at least one test case based on the control operation of the target identification information in the identification information of each test case, and running the target test case to test the service system, wherein the target identification information is any one of the identification information of each test case.
In one embodiment, the output device 503 is further configured to display a map editing window, where the map editing window includes a map editing area, a first component list area corresponding to a function module and a second component list area corresponding to a test case, where the first component list area includes a first component corresponding to each function template, and the second component list area includes a second component corresponding to each test case; the processor 501 is further configured to determine a first target component from each first component and a second target component from each second component based on a first management operation input for the first component list area and a second management operation input for the second component list area; adding the first target component and the second target component to the graph edit region; and typesetting the first target assembly and the second target assembly in the map editing area based on the typesetting operation aiming at the first target assembly and the second target assembly to obtain a test case management map.
In an embodiment, the processor 501 is further configured to create an association relationship between each functional module in the at least one functional module and a test case; acquiring the calling relation of interfaces among the functional modules through a performance management tool; determining the incidence relation among the functional modules according to the calling relation; and generating a test case management map based on the incidence relation between each functional module and the test case and the incidence relation between each functional module.
In an embodiment, the processor 501 is specifically configured to obtain a program code corresponding to the service system submitted by a user; acquiring a historical program code corresponding to the service system from a preset code management area; and comparing the program codes with the historical program codes, and determining whether each functional module in at least one functional module corresponding to the business system is updated or not based on the comparison result.
In one embodiment, the processor 501 is further configured to detect whether a function update tag exists in the program code; and if the program code is detected to have no function updating label, executing the historical program code corresponding to the service system acquired from a preset code management area.
In an embodiment, the processor 501 is further configured to determine, if it is detected that the function update tag exists in the program code, that a target function module corresponding to the function update tag in at least one function module corresponding to the service system is updated.
In an embodiment, the processor 501 is specifically configured to determine, according to an association relationship among functional modules recorded in a preset test case management map, a first test case associated with the target functional module and an associated functional module associated with the target functional module; determining a second test case associated with the associated function module according to the association relationship between each function module and each test case recorded in a preset test case management map; and determining the first test case and the second test case as at least one test case associated with the target function module.
It should be understood that, in the embodiment of the present Application, the Processor 501 may be a Central Processing Unit (CPU), and the Processor 501 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The output device 503 may include a speaker, a display screen, and the like.
The memory 502 may include both read-only memory and random access memory, and provides instructions and data to the processor 501. A portion of the memory 502 may also include non-volatile random access memory. For example, the memory 502 may also store device type information.
In a specific implementation, the processor 501, the memory 502, and the output device 503 described in this embodiment of the present application may execute the implementation described in the method embodiment described in fig. 1 or fig. 2 provided in this embodiment of the present application, and may also execute the implementation of the test apparatus described in this embodiment of the present application, which is not described herein again.
In another embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program comprising program instructions that when executed by a processor implement: when a preset trigger event of a service system is detected, detecting whether each functional module in at least one functional module corresponding to the service system is updated; when the target function module in the at least one function module is detected to be updated, determining at least one test case associated with the target function module according to a preset test case management map, wherein the preset test case management map records the association relationship among the function modules and the association relationship between the function modules and the test cases; outputting identification information of each test case in the at least one test case; and determining a target test case from the at least one test case based on the control operation of the target identification information in the identification information of each test case, and running the target test case to test the service system, wherein the target identification information is any one of the identification information of each test case.
The computer-readable storage medium may be an internal storage unit of the terminal device according to any of the foregoing embodiments, for example, a hard disk or a memory of the terminal device. The computer-readable storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash memory Card (FlashCard), and the like, provided on the terminal device. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the terminal device. The computer-readable storage medium is used for storing the computer program and other programs and data required by the terminal device. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a number of embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method of testing, the method comprising:
when a preset trigger event of a service system is detected, detecting whether each functional module in at least one functional module corresponding to the service system is updated;
when the target function module in the at least one function module is detected to be updated, determining at least one test case associated with the target function module according to a preset test case management map, wherein the preset test case management map records the association relationship among the function modules and the association relationship between the function modules and the test cases;
outputting identification information of each test case in the at least one test case;
determining a target test case from the at least one test case based on a control operation for target identification information in the identification information of each test case, wherein the target identification information is any one of the identification information of each test case;
and running the target test case to test the service system.
2. The method of claim 1, wherein before determining at least one test case associated with the target function module according to a preset test case management map, the method further comprises:
displaying a map editing window, wherein the map editing window comprises a map editing area, a first component list area corresponding to a function module and a second component list area corresponding to a test case, the first component list area comprises first components corresponding to the function templates, and the second component list area comprises second components corresponding to the test cases;
respectively determining a first target component from each first component and a second target component from each second component based on a first management operation input for the first component list area and a second management operation input for the second component list area;
adding the first target component and the second target component to the graph edit region;
and typesetting the first target assembly and the second target assembly in the map editing area based on the typesetting operation aiming at the first target assembly and the second target assembly to obtain a test case management map.
3. The method of claim 1, wherein before determining at least one test case associated with the target function module according to a preset test case management map, the method further comprises:
creating an incidence relation between each functional module in the at least one functional module and the test case;
acquiring the calling relation of interfaces among the functional modules through a performance management tool;
determining the incidence relation among the functional modules according to the calling relation;
and generating a test case management map based on the incidence relation between each functional module and the test case and the incidence relation between each functional module.
4. The method according to claim 1, wherein the detecting whether each functional module in at least one functional module corresponding to the service system is updated comprises:
acquiring a program code corresponding to the service system submitted by a user;
acquiring a historical program code corresponding to the service system from a preset code management area;
and comparing the program codes with the historical program codes, and determining whether each functional module in at least one functional module corresponding to the business system is updated or not based on the comparison result.
5. The method according to claim 4, wherein before the obtaining of the historical program code corresponding to the service system from the preset code management area, the method further comprises:
detecting whether a function updating label exists in the program code;
and if the program code is detected to have no function updating label, triggering and executing the step of acquiring the historical program code corresponding to the service system from a preset code management area.
6. The method of claim 5, wherein after detecting whether the function update tag exists in the program code, the method further comprises:
and if the program code is detected to have the function updating label, determining that a target function module corresponding to the function updating label in at least one function module corresponding to the business system is updated.
7. The method according to claim 1, wherein the determining at least one test case associated with the target function module according to a preset test case management map comprises:
determining a first test case associated with the target function module and an associated function module associated with the target function module according to an association relation among all function modules recorded in a preset test case management map;
determining a second test case associated with the associated function module according to the association relationship between each function module and each test case recorded in a preset test case management map;
and determining the first test case and the second test case as at least one test case associated with the target function module.
8. A test apparatus, the apparatus comprising:
the system comprises a detection module, a processing module and a processing module, wherein the detection module is used for detecting whether each functional module in at least one functional module corresponding to a service system is updated or not when a preset trigger event of the service system is detected;
the processing module is used for determining at least one test case associated with the target function module according to a preset test case management map when the detection module detects that the target function module in the at least one function module is updated, wherein the preset test case management map records the association relationship among the function modules and the association relationship between the function modules and the test cases;
the output module is used for outputting the identification information of each test case in the at least one test case;
the processing module is further configured to determine a target test case from the at least one test case based on a control operation for target identification information in the identification information of each test case, where the target identification information is any one of the identification information of each test case, and run the target test case to test the service system.
9. A terminal device comprising a processor and a memory, the processor and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, and wherein the processor is configured to invoke the program instructions to perform the method of any one of claims 1-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-7.
CN202010180489.0A 2020-03-19 2020-03-19 Test method and related equipment Pending CN111475401A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010180489.0A CN111475401A (en) 2020-03-19 2020-03-19 Test method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010180489.0A CN111475401A (en) 2020-03-19 2020-03-19 Test method and related equipment

Publications (1)

Publication Number Publication Date
CN111475401A true CN111475401A (en) 2020-07-31

Family

ID=71747457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010180489.0A Pending CN111475401A (en) 2020-03-19 2020-03-19 Test method and related equipment

Country Status (1)

Country Link
CN (1) CN111475401A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181825A (en) * 2020-09-26 2021-01-05 建信金融科技有限责任公司 Test case library construction method and device, electronic equipment and medium
CN113157558A (en) * 2021-03-10 2021-07-23 建信金融科技有限责任公司 System testing method and device
CN113238930A (en) * 2021-04-26 2021-08-10 南方电网电力科技股份有限公司 Software system testing method and device, terminal equipment and storage medium
CN113672514A (en) * 2021-08-24 2021-11-19 平安国际智慧城市科技股份有限公司 Test method, test device, server and storage medium
CN113704112A (en) * 2021-08-30 2021-11-26 浙江网商银行股份有限公司 Data processing method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181825A (en) * 2020-09-26 2021-01-05 建信金融科技有限责任公司 Test case library construction method and device, electronic equipment and medium
CN113157558A (en) * 2021-03-10 2021-07-23 建信金融科技有限责任公司 System testing method and device
CN113157558B (en) * 2021-03-10 2023-05-26 建信金融科技有限责任公司 System testing method and device
CN113238930A (en) * 2021-04-26 2021-08-10 南方电网电力科技股份有限公司 Software system testing method and device, terminal equipment and storage medium
CN113672514A (en) * 2021-08-24 2021-11-19 平安国际智慧城市科技股份有限公司 Test method, test device, server and storage medium
CN113704112A (en) * 2021-08-30 2021-11-26 浙江网商银行股份有限公司 Data processing method and system

Similar Documents

Publication Publication Date Title
CN111475401A (en) Test method and related equipment
US9489292B2 (en) Devices and methods for acquiring abnormal information
CN107545181B (en) Program operating method, terminal, and computer-readable storage medium
CN111240994A (en) Vulnerability processing method and device, electronic equipment and readable storage medium
CN114168222B (en) Method and device for acquiring time consumption during starting, terminal equipment and storage medium
CN113448862B (en) Software version testing method and device and computer equipment
CN111158741A (en) Method and device for monitoring change of dependency relationship of business module on third-party class library
CN110908702A (en) Version switching method, version switching device, computer equipment and storage medium
US11422917B2 (en) Deriving software application dependency trees for white-box testing
CN114020432A (en) Task exception handling method and device and task exception handling system
CN112328602B (en) Method, device and equipment for writing data into Kafka
JP5006824B2 (en) Test program management system
CN111400245B (en) Art resource migration method and device
CN111143305B (en) Data storage method, device, equipment and medium based on distributed storage system
CN110231921B (en) Log printing method, device, equipment and computer readable storage medium
CN109240906B (en) Database configuration information adaptation method and device, computer equipment and storage medium
CN112558982A (en) Code detection method and device and computer equipment
CN112346994A (en) Test information correlation method and device, computer equipment and storage medium
CN112363944A (en) Method and equipment for comparing return values of multiple environment interfaces
CN111722886A (en) Tool starting method and device, computer equipment and computer readable storage medium
CN111813757B (en) Characteristic information storage method, device, equipment and readable storage medium
CN112699015B (en) Log output method, device, server and computer readable storage medium
CN117707609B (en) Method and device for managing script tasks based on container arrangement management tool
CN117742897B (en) Method for realizing automatic repair of vulnerability based on container mirror image
CN111966387B (en) Firmware upgrading method, device, equipment and storage medium of NTB card

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