CN117493208A - Software testing method and device, electronic equipment and storage medium - Google Patents

Software testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117493208A
CN117493208A CN202311567144.0A CN202311567144A CN117493208A CN 117493208 A CN117493208 A CN 117493208A CN 202311567144 A CN202311567144 A CN 202311567144A CN 117493208 A CN117493208 A CN 117493208A
Authority
CN
China
Prior art keywords
interface
target
determining
information
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311567144.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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202311567144.0A priority Critical patent/CN117493208A/en
Publication of CN117493208A publication Critical patent/CN117493208A/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/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/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Abstract

The disclosure provides a software testing method, a device, electronic equipment and a storage medium, which can be applied to the technical field of artificial intelligence and the technical field of finance. The method comprises the following steps: determining a target interface from the changed interfaces according to the calling relation of the changed program requests, wherein the changed interfaces are determined according to the changed program requests; determining a target interface call chain according to the target interface; determining a target test case from the test case set according to the target interface call chain; executing the target test case and determining target test information; and determining and outputting a test result according to the target test information.

Description

Software testing method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of artificial intelligence and the technical field of finance, in particular to a software testing method, a device, electronic equipment and a storage medium.
Background
With the development of distributed and digital architecture transformation, the requirements of financial institutions on platform services are continuously improved, and software technology is applied to various industrial fields, so that the testing requirements of the financial institutions on software systems are also increasingly improved. Because the program iteration speed in the software system is high, a tester cannot ensure to know all changed test branches and test scripts, so that part of the test branches and the test scripts are not tested in time.
In carrying out the above inventive concept, the inventors found that: when testing the change program, the related technology has the technical problems that the test personnel does not know the test branches and the test scripts fully, the automatic test can not cover all the test scripts and the test program branches, and the error reporting program can not be analyzed in time.
Disclosure of Invention
In view of the above, the present disclosure provides a software testing method, apparatus, electronic device, and storage medium.
According to a first aspect of the present disclosure, there is provided a software testing method comprising:
determining a target interface from the changed interfaces according to the calling relation of the changed program requests, wherein the changed interfaces are determined according to the changed program requests;
determining a target interface call chain according to the target interface;
determining a target test case from the test case set according to the target interface call chain;
executing the target test case and determining target test information; and
and determining and outputting a test result according to the target test information.
According to an embodiment of the present disclosure, the determining, according to the call relation of the change program request, the target interface from the change interfaces, where the change interfaces are determined according to the change program request, includes:
Acquiring a change program list according to the change program request;
determining the change interface according to the change program list;
according to the matching rule, matching the changed interface with an interface in a preset calling relation list to obtain a matching result; and
and determining the target interface from the call relation list according to the matching result.
According to an embodiment of the disclosure, the preset call relationship list includes at least one call relationship sub-list, the call relationship sub-list has first matching information, and the first matching information includes information representing an interface name corresponding to the test case set;
the matching of the changed interface with the interface in the preset call relation list according to the matching rule to obtain a matching result comprises the following steps:
and matching the interface name information corresponding to the changed interface with the first matching information to obtain the matching result.
According to an embodiment of the disclosure, the call relation sub-list further has second matching information, where the second matching information is information representing interface parameters corresponding to the test case set;
the matching of the changed interface with the interface in the preset call relationship list according to the matching rule to obtain a matching result, and the method further comprises the following steps:
In the case that the interface name information corresponding to the changed interface is identical to the first matching information,
and matching the interface parameter information corresponding to the variation interface with the second matching information to obtain the matching result.
According to an embodiment of the present disclosure, determining a target interface call chain according to the target interface includes:
and determining the target interface call chain according to the interface name information corresponding to the target interface and the interface parameter information corresponding to the target interface.
According to an embodiment of the present disclosure, the above method further includes:
under the condition of updating the test cases, acquiring a test case interface call chain; and
and updating the call relation sub-list according to the test case interface call chain.
According to an embodiment of the present disclosure, the anomalies include a first anomaly, which is a parametric anomaly, and a second anomaly, which is a different anomaly from the first anomaly;
the determining and outputting the test result according to the target test information includes:
under the condition that the first abnormality exists, the target test case is adjusted and re-executed according to the parameter table, and the target test information is determined;
Determining and outputting a first test result according to the target test information; and
acquiring abnormality information in the presence of a second abnormality;
and determining and outputting a second test result according to the target test information and the abnormal information.
A second aspect of the present disclosure provides a test apparatus applied to a variable program, including:
the first determining module is used for determining a target interface from the changed interfaces according to the received changed program request from the application, wherein the changed interfaces are interfaces determined according to the changed program request, and the target interface is an interface with a calling relation corresponding to the changed program request;
the second determining module is used for determining a target interface call chain according to the target interface;
the third determining module is used for determining a target test case from the test case set according to the target interface call chain;
a fourth determining module, configured to execute the target test case and determine target test information; and
and a fifth determining module, configured to test the target test information, and determine and output a test result according to the target test information when the target test information is abnormal.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
According to the software testing method, device, electronic equipment, medium and program product provided by the disclosure, as the server invokes the change interface and determines the target interface according to the call relation of the change program request, the target interface call chain corresponding to the target interface is determined according to the determined target interface, and the target test case finally applied to the test is determined from the test case set in the system according to the target interface call chain, the target test case obtained by executing the change program to be tested is tested, the target test information is obtained, the final test result to be output is determined according to the target test information, the test coverage of the test script and the change program in all aspects is improved, the test of missing change program branches is avoided, the test analysis of the change program and the test script can be performed in time, the test result is obtained, the working efficiency is improved, the research by the research personnel is avoided under the condition that the test program branches to be tested are omitted, the time cost is saved, and the waste of manpower resources is reduced.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a software testing method, apparatus, electronic device, and storage medium according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a software testing method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of determining a target interface for a software testing method according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a schematic diagram of a system architecture of a software testing method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a block diagram of a software testing apparatus according to an embodiment of the present disclosure;
fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a software testing method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the invention, the related user information (including but not limited to user personal information, user image information, user equipment information, such as position information and the like) and data (including but not limited to data for analysis, stored data, displayed data and the like) are information and data authorized by a user or fully authorized by all parties, and the processing of the related data such as collection, storage, use, processing, transmission, provision, disclosure, application and the like are all conducted according to the related laws and regulations and standards of related countries and regions, necessary security measures are adopted, no prejudice to the public welfare is provided, and corresponding operation inlets are provided for the user to select authorization or rejection.
In the practical application process, because the requirements of the financial institutions on the application platform are continuously improved, the software technology is applied to the fields of multiple industries, in order to enable users to have good experience of the application platform of financial business, research and development personnel need to test an upgraded software system, and the research and development personnel comprehensively and timely test the changed software program branches and software scripts to obtain analysis results, so that the software system is subjected to targeted operation.
However, since the tester cannot know all test branches and test scripts, it is difficult for the automated test to cover all test scripts and test program branches, and at the same time, since all test scripts and test program branches cannot be covered, the problem that the abnormal situation of part of the program cannot be tested in time easily occurs, thereby affecting the user feeling of the customer. Therefore, the related art has the technical problems that the test personnel cannot fully know the test branches and the test scripts, the automatic test cannot cover all the test scripts and the test program branches, and the error reporting program cannot be analyzed in time.
In view of this, an embodiment of the present disclosure provides a software testing method, including: determining a target interface from the changed interfaces according to the calling relation of the changed program requests, wherein the changed interfaces are determined according to the changed program requests; determining a target interface call chain according to the target interface; determining a target test case from the test case set according to the target interface call chain; executing the target test case and determining target test information; and determining and outputting a test result according to the target test information.
Fig. 1 schematically illustrates an application scenario diagram of a software testing method, an apparatus, an electronic device and a storage medium according to an embodiment of the disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
For example, the user may send a service request to the server 105 equipped with the service system using a bank client installed in the first terminal device 101, the second terminal device 102, the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
For example, server 105 may be a distributed server, a cloud server, and a centralized server. The server 105 may be installed with both the old version service system and the new version service server and test the storage method of the service data.
It should be noted that the simulation test method provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the simulation test apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The simulation test method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the simulation test apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The software testing method of the disclosed embodiment will be described in detail with reference to fig. 2 to 6 based on the scenario described in fig. 1.
Fig. 2 schematically illustrates a flow chart of a software testing method according to an embodiment of the present disclosure.
As shown in fig. 2, the software testing method 200 may include operations S210 to S250.
In operation S210, a target interface is determined from among the variant interfaces according to the call relationship of the variant program request.
According to embodiments of the present disclosure, the change program may be a program that characterizes the user's changing needs for the software function. The shift program may include a series of instruction sets that can be identified and executed by the computer.
According to an embodiment of the present disclosure, the change interface is an interface determined according to a change program request.
In accordance with embodiments of the present disclosure, a change program request may be characterized as a request to test a change program for a change program that has been modified in the system.
According to the embodiment of the disclosure, the call relation of the change program request can be characterized in that in the case of executing the change program process, the system can acquire the call information of the interface corresponding to the change program and can acquire the information transmitted in the interface corresponding to the change program.
For example, the interface of the change program to be tested is A, B, C, and according to the calling relationship, the interface a can be called.
According to embodiments of the present disclosure, the target interface may be characterized as a program interface that determines the test.
According to the embodiment of the disclosure, in the process of executing the change program, the system can determine the interface corresponding to the instruction by calling the instruction in the instruction set included in the change program, acquire the information in the interface corresponding to the instruction through the interface corresponding to the instruction, and further complete the information processing operation corresponding to the instruction according to the information in the interface so as to find the target interface.
In operation S220, a target interface call chain is determined according to the target interface.
According to embodiments of the present disclosure, a target interface call chain may be characterized as a call chain generated for a target interface of a variant program.
For example, the call chain generated for the target interface a of the change program is "msgtype; jzaccno; funtype).
According to the embodiment of the disclosure, a call chain table exists in the system, and the table contains all call chains, so that corresponding target interface call chains can be obtained in the call chain table according to the target interfaces.
In operation S230, a target test case is determined from the test case set according to the target interface call chain.
According to the embodiment of the disclosure, an example set table exists in the system, and the table contains all test example sets, and according to a target interface call chain, a corresponding target test example can be queried in the example set table.
According to embodiments of the present disclosure, the target test case may be characterized as a finalized test case generated for the variant program.
For example, an interface call chain msgtype represents different message types, an interface call chain jzaccno represents an account number and an account number type, and an interface call chain funtype represents that transaction is being performed, and then "msgtype" is used; jzaccno; the target test case queried by the funtype from the example set table is MT103;9098× × × 7230;1".
For example, a case generation module may be included in the system that may be used for the generation of case classes and test classes. Through the entry parameters provided by the case data source in the data source device, the corresponding script template is selected, and the parameters thereof are configured, including the message type, the request header, the access address, the dependent script and the like, to form a test class script, and the test class is downloaded to the case composition module.
For example, a case composition module may be included in the system that provides corresponding case data to the corresponding test class by retrieving the test class script generated by the case generation module and the test case data source in the data source device, and combines the corresponding case data with the case class script into an executable script.
In operation S240, the target test case is executed, and the target test information is determined.
According to embodiments of the present disclosure, the target test information may be characterized as a basic test result obtained after testing the variant program.
In operation S250, a test result is determined and output according to the target test information.
According to the embodiment of the disclosure, according to the obtained basic test result, the final result is obtained and confirmed as the test result.
According to the embodiment of the disclosure, as the server invokes the change interface and determines the target interface according to the call relation of the change program request, determines the target interface call chain corresponding to the target interface according to the determined target interface, determines the target test case finally applied to the test from the test case set in the system according to the target interface call chain, tests the target test case obtained by executing the change program to be tested, obtains target test information, determines the final test result to be output according to the target test information, improves the test coverage of the whole aspects of the test script and the change program, avoids testing the missing change program branches, realizes test analysis on the change program and the test script in time, obtains the test result, improves the working efficiency, avoids the research personnel from examining each line under the condition of the test program branches to be tested, saves the time cost, and reduces the waste of manpower resources.
Fig. 3 schematically illustrates a flow chart of determining a target interface of a software testing method according to an embodiment of the disclosure.
As shown in fig. 3, the software testing method 300 may include operations S310 to S340.
According to an embodiment of the present disclosure, determining a target interface from among the variant interfaces according to a call relation of the variant program request includes:
in operation S310, a change program list is acquired according to the change program request.
According to embodiments of the present disclosure, a change program list may be characterized as a list containing all change records of the change program and its interfaces.
According to an embodiment of the present disclosure, the variant program list may include a modification record of the program, a change in the number of lines of code of the interface, a time of the program modification, the number of times of the program modification, and a deadline of the program modification, but is not limited to the above.
For example, the change program list includes: the modification record of the program is 'guija# - > kihcl@'; the number of code lines of the interface is '5-9'; program modified deadline "xx: yy: zz).
For example, a program change monitoring module is provided in the system, and is mainly used for monitoring a change program of each application current version Git branch, for example, a normal branch of 2023 month 3 version is 2303_b, a gray branch is 2303-gray, when a program of a corresponding branch changes, a program name P is downloaded to a data source device, and the data source device matches a test case containing the change program name in a script according to the program name P, so that a test case related to the program is automatically executed, and the correctness of the program related branch is ensured.
In operation S320, a change interface is determined according to the change program list.
In operation S330, the change interface is matched with the interface in the preset call relationship list according to the matching rule, so as to obtain a matching result.
According to an embodiment of the present disclosure, the matching rule may be characterized as a rule for determining, for the variant interface, a matching degree of an interface corresponding to the variant interface in a preset calling relationship class, where the matching rule may be preset in the system.
According to embodiments of the present disclosure, the preset call relationship list may be characterized as a preset interface call relationship list.
According to the embodiment of the disclosure, according to the matching rule, the system matches the changed interfaces with all interfaces in the preset calling relationship category one by one according to the rule, and the matching degree of each interface in the preset calling relationship category is obtained.
For example, the change interface is a, the preset call relationship list includes interfaces a, A1, a26 and C, the matching degree of the change interface a and the interface a in the preset call relationship category is 100%, the matching degree of the change interface a and the interface A1 in the preset call relationship category is 50%, the matching degree of the change interface a and the interface a26 in the preset call relationship category is 33.3%, and the matching degree of the change interface a and the interface C in the preset call relationship category is 0%.
According to the embodiment of the disclosure, a matching result can be obtained according to the obtained matching degree.
In operation S340, a target interface is determined from the call relationship list according to the matching result.
For example, if the Git in the system monitors that the interface and the program have new modification and submission records and the number of line codes of the interface changes, the program monitoring module can firstly judge whether the interface is the interface of the interface program data source LY or not when the interface is changed, and obtain a judging result, if the interface is matched, the judging result is downloaded to the next module for testing.
According to the embodiment of the disclosure, after a server acquires a change program request, a change program list corresponding to a program is acquired from a system, a change interface corresponding to the change program is determined according to the content recorded in the change program list, the change interface is matched with the interface in the preset call relation list according to a preset matching rule in the system, a matching result is obtained according to the matching degree obtained after the matching with each interface, and then a target interface is determined from the interfaces in the call relation list according to the matching result, so that the target interface corresponding to a non-change interface can be eliminated, the matching degree of the target interface corresponding to the change interface is accurately judged, and the working efficiency of the system is improved.
According to the embodiment of the disclosure, the preset call relation list may include at least one call relation sub-list, and the call relation sub-list has first matching information, where the first matching information includes information representing an interface name corresponding to the test case set.
For example, the first matching information may include an interface name Bhj monitoring interface corresponding to the test case set.
According to an embodiment of the present disclosure, according to a matching rule, matching a change interface with an interface in a preset call relationship list to obtain a matching result, including:
according to the embodiment of the disclosure, the interface name information corresponding to the changed interface is matched with the first matching information, and a matching result is obtained.
According to an embodiment of the disclosure, the matching rule may be characterized as matching the first matching information in the sub-list of the preset call relationship with the variable interface, that is, the program name of the interface, to obtain a matching result.
According to the embodiment of the disclosure, the matching degree obtained by matching the variable interface with the first matching information in the preset call relation sub-list according to the matching rule is determined to be matched with the matching result of the interface with the highest matching degree and the variable interface.
According to the embodiment of the disclosure, the interface name information corresponding to the change interface is matched with the first matching information according to the preset matching rule to obtain the matching result, so that the accuracy of determining the target interface can be improved, omission of the interface of the change program is reduced, and the working efficiency is improved.
According to the embodiment of the disclosure, the call relation sub-list further has second matching information, wherein the second matching information is information representing interface parameters corresponding to the test case set.
According to an embodiment of the present disclosure, according to a matching rule, matching a change interface with an interface in a preset call relationship list to obtain a matching result, and further including:
according to an embodiment of the present disclosure, in a case where interface name information corresponding to a variant interface is the same as first matching information.
According to the embodiment of the disclosure, the interface parameter information corresponding to the changed interface is matched with the second matching information, so that a matching result is obtained.
According to an embodiment of the present disclosure, the call relationship sub-list includes second matching information, which may be characterized as interface parameter information data corresponding to the test case set.
According to the embodiment of the disclosure, the interface parameter information corresponding to the changed interface is matched with the second matching information one by one to obtain the matching degree of the parameter information, and the matching result of the interface of the parameter information with the highest matching degree and the changed interface is determined to be matched.
According to the embodiment of the disclosure, when the matching result of the interface parameter information corresponding to the changed interface and the second matching information is matching, the consistency of the interface parameter information is confirmed, so that the target interface is more accurately determined, and the interface corresponding to the changed interface is eliminated.
For example, if the change interface is judged to be the interface of the interface program data source LY, the method in the interface is continuously judged, if the change interface is the method corresponding to the interface in the interface program data source LY, the change program P, the application name AP corresponding to the change program and the program branch FZ are downloaded to the program name matching module for matching the subsequent program names, and if the change interface is not the method corresponding to the interface in the interface program data source LY, the method is directly skipped and is not downloaded to the program name matching module.
For example, the program name matching module in the system can receive the change program P returned by the change program monitoring module, the application name AP corresponding to the change program and the program branch FZ, and download the three to the data source device, the data source device matches the application name AP corresponding to the change program with the interface call chain data source, finds out the interface call chain L containing the change program P in the interface call chain data source, if matching, marks the test cases according to the mapping relation between the test cases and the interface call chain, and gathers the test cases marked with the T after cyclic matching; for program branch FZ, the first four digits are intercepted as version, such as program branch 2303_b, then intercept 2303 as current version, download the T-tagged test case and current version to an automated test case running device, and the automated test case running device automatically executes the current version of T-tagged test case according to the downloaded version.
According to the embodiment of the disclosure, the matching rule further comprises matching the interface parameter information corresponding to the changed interface with the second matching information under the condition that the interface name information corresponding to the changed interface is the same as the first matching information, so that a matching result is obtained, further matching is carried out on the changed interface and the interface in the call relation list, and the accuracy of the target interface is further ensured.
According to an embodiment of the present disclosure, determining a target interface call chain according to a target interface includes:
according to the embodiment of the disclosure, a target interface call chain is determined according to interface name information corresponding to a target interface and interface parameter information corresponding to the target interface.
According to the embodiment of the disclosure, the system searches a target interface call chain from an interface call chain data source in the system according to interface name information corresponding to the target interface and interface parameter information corresponding to the target interface.
According to embodiments of the present disclosure, an interface call chain data source may be characterized as comprising a collection of call chains for all interfaces.
According to embodiments of the present disclosure, the interface call chain data source stored in the system may include a mapping relationship of the interface and the interface call chain, but is not limited to the above one mapping relationship.
For example, the interface call chain data source includes a mapping relationship of test cases and interface call chains, a mapping relationship of program names and application names. The interface call chain data source part is responsible for receiving the interface call chain L returned by the holographic monitoring platform and updating the interface call chain data source.
According to the embodiment of the disclosure, the target interface call chain is determined according to the interface name information corresponding to the target interface and the interface parameter information corresponding to the target interface, so that the accuracy of the target interface call chain is improved.
According to an embodiment of the present disclosure, in the case of test case update, a test case interface call chain is acquired.
According to the embodiment of the disclosure, the system can update the test cases in the test case sets periodically or aperiodically so as to ensure the comprehensiveness and instantaneity of the test case sets.
According to an embodiment of the present disclosure, a call relationship sub-list is updated according to a test case interface call chain.
According to an embodiment of the disclosure, according to a test case interface call chain, a call relation sub-list in a preset call relation of a test case interface is updated, including updating first matching information and second matching information.
For example, for the script running on the test platform for the first time, after the script runs, the ID in the log is uploaded to the holographic monitoring platform, and the interface call chain L is acquired by using the log ID on the holographic monitoring platform, so that the function can be utilized, through the call information acquired on the platform, the call information is converted into the call chain L and the association relationship between the program name and the application name, and the association relationship is downloaded and registered to the data source device, so that the correctness of the changed program is ensured for monitoring the program change in the subsequent interface call chain L and for the automatic execution of the related test script after the program change.
For example, in the 3 rd edition of 2023, a test case a and B are newly added, by running the script on the test platform, the log IDs of the test cases a and B are obtained as P1 and P2, respectively, and according to the P1 and P2, the interface call chains L1 and L2 are obtained, the call chain of the a case registers the program C1 of the public settlement product service application, the program D1 of the F-SCMS clearing business management application, the call chain of the B case registers the program B2 of the F-CBCS cross-border clearing application, the program C2 of the F-CAS accounting service application, and the program D2 of the F-GUCP unified clearing application in the format of (interface call chains, (script name, call application- > call program)), and the test case a registers (L1, (a, F-CBCS- > B1, F-NASE- > C1, F-SCMS- > D1)), and the test case a (L2, F-CBCS- > C2, F-P2- > C2 are registered.
According to the embodiment of the disclosure, under the condition of updating the test cases, the test case interface call chain is acquired, and the call relation sub-list is updated according to the test case interface call chain, so that the real-time updating of the test case set is realized, and the timeliness of the test cases in the test case set is ensured.
According to an embodiment of the present disclosure, the anomalies include a first anomaly that is a parameter anomaly and a second anomaly that is a different anomaly than the first anomaly.
According to an embodiment of the present disclosure, determining and outputting a test result according to target test information includes:
according to an embodiment of the present disclosure, in the case where there is a first abnormality, the target test case is adjusted and re-executed according to the parameter table, and the target test information is determined.
According to the embodiment of the disclosure, if the target test case is wrong, the first abnormal condition is judged, and the target test case can be readjusted according to the parameter table stored in the system, and the target test case is executed to obtain the target test information.
For example, for the test case with error reporting, if the first abnormal condition is judged to be a parameter problem, the script is automatically repaired, and the parameter table is reloaded according to the parameter table applied correspondingly, so that the coverage rate of the test scene is improved.
According to the embodiment of the disclosure, a first test result is determined and output according to target test information.
According to the embodiment of the disclosure, according to the target test case with the adjusted parameters, the final first test result is determined according to the obtained target test information, and the final first test result is output.
According to an embodiment of the present disclosure, in the case where there is a second abnormality, abnormality information is acquired.
According to the embodiment of the disclosure, if the target test case is in error and is judged to be the second abnormal case, the abnormal information needs to be acquired.
According to the embodiment of the disclosure, the second test result is determined and output according to the target test information and the abnormality information.
For example, if the second abnormal condition is judged to be an environmental problem, the environmental information of the application is automatically acquired and returned to the test case operation platform, and the platform updates the environmental information, so that the coverage rate of the test scene is improved.
For example, if the second abnormal condition is determined to be a program problem or is still reported to be wrong after the program is repaired, maintenance personnel of the test case and developers corresponding to the changed program are timely notified in a mail mode, so that the condition that the related test case is missed due to the change of the program is avoided, and the coverage rate of the test scene is improved.
According to the embodiment of the disclosure, since the test case may report errors, the test environment may be abnormal, and the program may be abnormal, the abnormality is divided into a first abnormality and a second abnormality, the first abnormality is a parameter abnormality, the second abnormality is an abnormality different from the first abnormality, in the case that the first abnormality exists, the target test case is adjusted and re-executed according to the parameter table, the target test information is determined, the first test result is determined and output according to the target test information, and in the case that the second abnormality exists, the abnormality information is acquired, the second test result is determined and output according to the target test information and the abnormality information, monitoring of the abnormal state is realized, and different output results are determined according to different abnormal states, so that the accuracy is improved.
Fig. 4 schematically shows a schematic diagram of a system architecture of a software testing method according to an embodiment of the present disclosure.
As shown in fig. 4, a system architecture 400 of a software testing method of an embodiment of the present disclosure includes: a data source device 401, an automated test case composition device 402, an automated test case execution device 403, and a program change monitoring device 405, wherein the automated test case composition device 402 comprises a case generation module and a case composition module, the case generation module comprising: the case generation module is used for generating case types and test types. Through entering the parameters provided by the case data source in the data source device, selecting a corresponding script template, configuring parameters of the script template, including a message type, a request header, an access address, a dependent script and the like, forming a test class script, and downloading the test class to a case composition module, wherein the case composition module comprises: and providing the corresponding case data to the corresponding test class by acquiring the test class script generated by the case generation module and the test case data source in the data source device, and combining the test class script with the case class script to form an executable script. The automated test case composition device 402 provides a configurable case execution platform, and according to the configured script call type, the corresponding script template is called from the code library of the case execution platform, and then the call parameters are configured through the parameter entering information and the message information maintained in the test case data source in the data source device, so as to generate the corresponding test case name, thereby running the test case script in the platform.
Fig. 5 schematically shows a block diagram of a software testing apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, the software testing apparatus 500 may include: the first determination module 510, the second determination module 520, the third determination module 530, the fourth determination module 540, and the fifth determination module 550.
The first determining module 510 is configured to determine, according to a call relation of a change program request, a target interface from change interfaces, where the change interfaces are interfaces determined according to the change program request. The first determining module 510 may complete the above operation S210, which is not described herein.
The second determining module 520 is configured to determine a target interface call chain according to the target interface. The second determining module 520 may complete the above operation S220, which is not described herein.
A third determining module 530 is configured to determine a target test case from the set of test cases according to the target interface call chain. The third determining module 530 may complete the above operation S230, which is not described herein.
The fourth determining module 540 is configured to execute the target test case and determine target test information. The fourth determining module 540 may complete the above operation S250, which is not described herein.
And a fifth determining module 550, configured to determine and output a test result according to the target test information. The fifth determining module 550 may complete the above operation S250, which is not described herein.
According to an embodiment of the present disclosure, the first determining module 510 may include: the system comprises a first acquisition sub-module, a first determination sub-module, a second acquisition sub-module and a second determination sub-module.
The first acquisition sub-module is used for acquiring a change program list according to the change program request.
And the first determining submodule is used for determining a change interface according to the change program list.
And the second acquisition sub-module is used for matching the changed interfaces with interfaces in a preset call relation list according to the matching rule to obtain a matching result.
And the second determining submodule is used for determining a target interface from the changed interfaces according to the matching result.
According to an embodiment of the disclosure, the preset call relationship list includes at least one call relationship sub-list, the call relationship sub-list has first matching information, and the first matching information includes information representing an interface name corresponding to the test case set.
According to an embodiment of the present disclosure, the second acquisition sub-module may include: a first acquisition unit.
The first obtaining unit is used for matching the interface name information corresponding to the changed interface with the first matching information to obtain a matching result.
According to the embodiment of the disclosure, the call relation sub-list also has second matching information, wherein the second matching information is information representing interface parameters corresponding to the test case set.
According to an embodiment of the present disclosure, the second acquisition sub-module may further include: and a second acquisition unit.
And the second acquisition unit is used for matching the interface parameter information corresponding to the changed interface with the second matching information to obtain a matching result when the interface name information corresponding to the changed interface is the same as the first matching information.
According to an embodiment of the present disclosure, the second determining module 520 may include: and a third determining sub-module.
And the third determining submodule is used for determining a target interface call chain according to the interface name information corresponding to the target interface and the interface parameter information corresponding to the target interface.
According to an embodiment of the present disclosure, the software testing apparatus 500 may further include: an acquisition module and an update module.
And the acquisition module is used for acquiring the test case interface call chain under the condition of test case updating.
And the updating module is used for updating the calling relation sub-list according to the test case interface calling chain.
According to an embodiment of the present disclosure, the anomalies include a first anomaly that is a parameter anomaly and a second anomaly that is a different anomaly than the first anomaly.
According to an embodiment of the present disclosure, the fifth determining module 550 may include: the fourth determination sub-module, the fifth determination sub-module, the third acquisition sub-module, and the sixth determination sub-module.
And the fourth determining submodule is used for adjusting and re-executing the target test case according to the parameter table under the condition that the first abnormality exists, and determining the target test information.
And the fifth determining submodule is used for determining and outputting a first test result according to the target test information.
And the third acquisition sub-module is used for acquiring the abnormal information under the condition that the second abnormality exists.
And the sixth determining submodule is used for determining and outputting a second test result according to the target test information and the abnormal information.
Fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement an evaluation method of a search system, according to an embodiment of the disclosure.
As shown in fig. 6, an electronic device 600 according to an embodiment of the present disclosure includes a processor 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 605 into a Random Access Memory (RAM) 603. The processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 601 may also include on-board memory for caching purposes. The processor 601 may comprise a single processing unit or a plurality of processing units for performing different actions according to the method flows of embodiments of the present disclosure according to embodiments of the present disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or the RAM 603. Note that the program may be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.
According to an embodiment of the present disclosure, the electronic device 600 may also include an input/output (I/O) interface 605, the input/output (I/O) interface 605 also being connected to the bus 604. The electronic device 600 may also include one or more of the following components connected to an input/output (I/O) interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 605 including a hard disk or the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to an input/output (I/O) interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 610 as needed, so that a computer program read out therefrom is installed into the storage section 605 as needed.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium described above carries one or more programs which, when executed, implement methods according to embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: 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), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 602 and/or RAM 603 and/or one or more memories other than ROM 602 and RAM 603 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to implement the item recommendation method provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and/or installed from the removable medium 611. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (10)

1. A software testing method, comprising:
determining a target interface from the changed interfaces according to the calling relation of the changed program requests, wherein the changed interfaces are determined according to the changed program requests;
determining a target interface call chain according to the target interface;
determining a target test case from the test case set according to the target interface call chain;
executing the target test case and determining target test information; and
and determining and outputting a test result according to the target test information.
2. The method of claim 1, wherein the determining the target interface from among the variant interfaces according to the calling relationship of the variant program request comprises:
Acquiring a change program list according to the change program request;
determining the change interface according to the change program list;
according to the matching rule, matching the changed interface with an interface in a preset calling relation list to obtain a matching result; and
and determining the target interface from the call relation list according to the matching result.
3. The method of claim 2, wherein the preset call relationship list comprises at least one call relationship sub-list, the call relationship sub-list having first matching information, the first matching information comprising information characterizing interface names corresponding to a test case set;
and matching the changed interface with an interface in a preset call relation list according to a matching rule to obtain a matching result, wherein the matching result comprises the following steps:
and matching the interface name information corresponding to the changed interface with the first matching information to obtain the matching result.
4. The method of claim 3, wherein the call relationship sub-list further has second matching information, the second matching information being information characterizing interface parameters corresponding to the test case set;
the step of matching the changed interface with the interface in the preset call relation list according to the matching rule to obtain a matching result, and the step of:
In the case that the interface name information corresponding to the variant interface is identical to the first matching information,
and matching the interface parameter information corresponding to the changed interface with the second matching information to obtain the matching result.
5. The method according to claim 1 or 4, wherein said determining a target interface call chain from said target interface comprises:
and determining the target interface call chain according to the interface name information corresponding to the target interface and the interface parameter information corresponding to the target interface.
6. The method of claim 4, further comprising:
under the condition of updating the test case, acquiring a test case interface call chain; and
and updating the call relation sub-list according to the test case interface call chain.
7. The method of claim 1, the anomalies comprising a first anomaly and a second anomaly, the first anomaly being a parametric anomaly, the second anomaly being a different anomaly than the first anomaly;
the determining and outputting the test result according to the target test information comprises the following steps:
under the condition that a first abnormality exists, adjusting and re-executing the target test case according to a parameter table, and determining the target test information;
Determining and outputting a first test result according to the target test information; and
acquiring abnormality information in the presence of a second abnormality;
and determining and outputting a second test result according to the target test information and the abnormal information.
8. A software testing apparatus comprising:
the first determining module is used for determining a target interface from the changed interfaces according to the calling relation of the changed program requests, wherein the changed interfaces are interfaces determined according to the changed program requests;
the second determining module is used for determining a target interface call chain according to the target interface;
the third determining module is used for determining a target test case from the test case set according to the target interface call chain;
the fourth determining module is used for executing the target test case and determining target test information; and
and the fifth determining module is used for determining and outputting a test result according to the target test information.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-7.
CN202311567144.0A 2023-11-22 2023-11-22 Software testing method and device, electronic equipment and storage medium Pending CN117493208A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311567144.0A CN117493208A (en) 2023-11-22 2023-11-22 Software testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311567144.0A CN117493208A (en) 2023-11-22 2023-11-22 Software testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117493208A true CN117493208A (en) 2024-02-02

Family

ID=89672546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311567144.0A Pending CN117493208A (en) 2023-11-22 2023-11-22 Software testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117493208A (en)

Similar Documents

Publication Publication Date Title
US20200241872A1 (en) Systems and Methods for Automating and Monitoring Software Development Operations
CN111221727B (en) Test method, test device, electronic equipment and computer readable medium
CN112463729A (en) Data file storage method and device, electronic equipment and medium
CN115357761A (en) Link tracking method and device, electronic equipment and storage medium
CN113918864A (en) Website page testing method, testing system, testing device, electronic equipment and medium
CN117493208A (en) Software testing method and device, electronic equipment and storage medium
CN115965474A (en) Service processing method, device, equipment and storage medium
CN111581431B (en) Data exploration method and device based on dynamic evaluation
CN114281704A (en) Website testing method and device, electronic equipment and medium
CN113434382A (en) Database performance monitoring method and device, electronic equipment and computer readable medium
CN115687083A (en) Business system testing method and device, electronic equipment and storage medium
CN114840435A (en) Method, device, equipment, storage medium and program product for determining data flow direction
CN114860597A (en) Method, device, equipment and storage medium for determining code coverage rate
CN117234910A (en) Information processing method, device, equipment and storage medium
CN114911770A (en) Method, device, equipment and medium for evaluating database migration
CN113568657A (en) Icon configuration method, icon configuration system, electronic device, and medium
CN117193879A (en) Pipeline configuration detection method and device for application
CN114066407A (en) Service processing method, processing device, electronic equipment and readable storage medium
CN115658541A (en) Hierarchical regression testing method, apparatus, device, storage medium, and program product
CN113849185A (en) Program management method, program management apparatus, electronic device, and storage medium
CN115470150A (en) Batch program testing method, device, equipment and storage medium
CN116414600A (en) Data automatic checking method, device, equipment and storage medium
CN113360380A (en) Method and device for generating data case based on flow chart
CN117170767A (en) Index acquisition method, device, equipment and storage medium
CN116166558A (en) Transaction testing method, device, equipment 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