CN115102879B - Test method of shared service platform, electronic equipment and storage medium - Google Patents

Test method of shared service platform, electronic equipment and storage medium Download PDF

Info

Publication number
CN115102879B
CN115102879B CN202210860440.9A CN202210860440A CN115102879B CN 115102879 B CN115102879 B CN 115102879B CN 202210860440 A CN202210860440 A CN 202210860440A CN 115102879 B CN115102879 B CN 115102879B
Authority
CN
China
Prior art keywords
information
parameter
interface
target
interfaces
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.)
Active
Application number
CN202210860440.9A
Other languages
Chinese (zh)
Other versions
CN115102879A (en
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.)
Side Cloud Beijing Information Service Co ltd
Original Assignee
Side Cloud Beijing Information Service 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 Side Cloud Beijing Information Service Co ltd filed Critical Side Cloud Beijing Information Service Co ltd
Priority to CN202210860440.9A priority Critical patent/CN115102879B/en
Publication of CN115102879A publication Critical patent/CN115102879A/en
Application granted granted Critical
Publication of CN115102879B publication Critical patent/CN115102879B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a testing method of a shared service platform, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving target interface selection information input by a tester, wherein the target interface selection information comprises identification information of a target interface; acquiring the parameter entering information and the parameter exiting information of the target interface according to the identification information of the target interface; determining the link dependency relationship of at least two target interfaces according to the parameter entering information and parameter exiting information of at least two target interfaces; and testing the at least two target interfaces according to the link dependency relationship of the at least two target interfaces. According to the embodiment of the application, the parameter entering information and parameter exiting information of the target interfaces can be automatically acquired according to the target interfaces selected by the testers, the link dependency relationship among the plurality of target interfaces is determined according to the parameter entering information and parameter exiting information of the plurality of target interfaces, and the plurality of target interfaces are automatically tested according to the link dependency relationship, so that the labor is saved, and the testing efficiency is improved.

Description

Test method of shared service platform, electronic equipment and storage medium
Technical Field
The present application relates to the field of shared service technologies, and in particular, to a method for testing a shared service platform, an electronic device, and a storage medium.
Background
The shared service platform is used for helping enterprises to use shared products provided by remote digital talents (non-enterprise staff) in a large scale, and provides a series of tools and services around matching, delivering, settling and guaranteeing in the process, so that the enterprises are helped to quickly solve the problems encountered in production and management. Both merchants and free professionals may register as users of the shared services platform. The business can issue the tasks of the enterprise through the shared service platform, and the free professional can also pick up and complete the tasks issued by the business so as to acquire corresponding rewards.
In order to ensure stable and reliable operation of the shared service platform, it is often necessary to test the shared service platform. The method comprises the step of testing each specific service in the shared service platform and the step of testing an interface in the shared service platform.
However, the number of interfaces in the shared service platform is large, the requirements of different interfaces on the test are different, and the different interfaces have an interdependence relationship, so that in the test process of the interfaces, the tester needs to continuously edit or adjust the test script to adapt to the requirements of the different interfaces, the manpower is wasted, and the test efficiency is low.
Disclosure of Invention
In view of this, the present application provides a testing method, an electronic device and a storage medium for a shared service platform, so as to solve the problems in the prior art that in the testing process of interfaces, a tester needs to continuously edit or adjust test scripts to adapt to the requirements of different interfaces, which wastes manpower and has lower testing efficiency.
In a first aspect, an embodiment of the present application provides a method for testing a shared service platform, including:
receiving target interface selection information input by a tester, wherein the target interface selection information comprises identification information of a target interface, and the target interface is an interface to be tested selected by the tester;
acquiring the parameter entering information and the parameter exiting information of the target interface according to the identification information of the target interface;
determining the link dependency relationship of at least two target interfaces according to the input parameter information and the output parameter information of at least two target interfaces, wherein the link dependency relationship is used for representing the association relationship of the at least two target interfaces in the test process;
and testing at least two target interfaces according to the link dependency relationship of the at least two target interfaces.
In one possible implementation manner, the obtaining the parameter entering information and the parameter exiting information of the target interface according to the identification information of the target interface includes:
determining the node position of the target interface in a rotary linked list according to the identification information of the target interface, wherein the rotary linked list comprises a plurality of nodes, and each node corresponds to one interface;
rotating the rotating chain table according to the node position of the target interface in the rotating chain table, and rotating the node corresponding to the target interface to a head node;
and acquiring the parameter entering information and the parameter exiting information of the interface corresponding to the head node, wherein the parameter entering information and the parameter exiting information of the interface corresponding to the head node are the parameter entering information and the parameter exiting information of the target interface.
In one possible implementation manner, the rotating the rotary linked list according to the node position of the target interface in the rotary linked list, and rotating the node corresponding to the target interface to the head node includes:
setting a first pointer and a second pointer, wherein the first pointer and the second pointer both point to a head node of the rotary linked list;
determining the number k of moving nodes of the first pointer according to the node position of the target interface in the rotary linked list;
moving the first pointer backward by k nodes according to the number k of the moving nodes of the first pointer;
simultaneously moving the first pointer and the second pointer backwards by the same node number, and moving the first pointer to the last node of the rotary linked list;
and taking one node behind the second pointer as a new head node to obtain a rotated rotary linked list, wherein the new head node is the node corresponding to the target interface.
In a possible implementation manner, the obtaining the parameter-in information and parameter-out information of the interface corresponding to the head node includes:
determining parameter entering information and parameter exiting information acquisition strategies according to interface types of interfaces corresponding to the head nodes;
and acquiring the parameter entering information and the parameter exiting information of the interface corresponding to the head node according to the parameter entering information and parameter exiting information acquisition strategy.
In one possible implementation manner, if the interface type of the interface corresponding to the head node is an http interface, determining the parameter entering information and parameter exiting information obtaining policy according to the interface type of the interface corresponding to the head node includes: determining parameter entering information and parameter exiting information acquisition strategies corresponding to the http interface according to the interface type of the interface corresponding to the head node;
the step of obtaining the parameter entering information and the parameter exiting information of the interface corresponding to the head node according to the parameter entering information and parameter exiting information obtaining strategy comprises the following steps: sending first parameter entering information and parameter exiting information request information to a server according to parameter entering information and parameter exiting information obtaining strategies corresponding to the http interface; and receiving the parameter entering information and the parameter exiting information of the interface corresponding to the head node, which are sent by the server.
In one possible implementation manner, if the interface type of the interface corresponding to the head node is a rpc interface, the determining, according to the interface type of the interface corresponding to the head node, the parameter entering information and parameter exiting information obtaining policy includes: determining the parameter entering information and parameter exiting information acquisition strategy corresponding to the rpc interface according to the interface type of the interface corresponding to the head node;
the step of obtaining the parameter entering information and the parameter exiting information of the interface corresponding to the head node according to the parameter entering information and parameter exiting information obtaining strategy comprises the following steps: sending second parameter entering information and parameter exiting information request information to a server according to parameter entering information and parameter exiting information obtaining strategies corresponding to the rpc interface, wherein the second parameter entering information and parameter exiting information request information comprises signature information; and if the signature information passes the verification of the server, receiving the parameter entering information and the parameter exiting information of the interface corresponding to the head node, which are sent by the server.
In one possible implementation manner, the testing at least two target interfaces according to the link dependency relationship of the at least two target interfaces includes:
determining a pressure measurement protocol and a transmission protocol corresponding to each of at least two target interfaces;
and according to the pressure measurement protocol and the transmission protocol corresponding to each target interface and the link dependency relationship of at least two target interfaces, performing performance test on at least two target interfaces in sequence.
In one possible implementation manner, the determining a pressure measurement protocol and a transmission protocol corresponding to each of at least two target interfaces includes:
invoking a pressure measurement protocol and a transmission protocol embedded in the micro reference test framework JMH;
and determining the pressure measurement protocol and the transmission protocol corresponding to each target interface in at least two target interfaces in the pressure measurement protocol and the transmission protocol embedded in the JMH.
In a second aspect, an embodiment of the present application provides an electronic device, including:
a processor;
a memory;
and a computer program, wherein the computer program is stored in the memory, the computer program comprising instructions that, when executed by the electronic device, cause the electronic device to perform the method of any of the first aspects.
In a third aspect, an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium includes a stored program, where when the program runs, the program controls a device in which the computer readable storage medium is located to execute the method of any one of the first aspects.
According to the embodiment of the application, the parameter entering information and parameter exiting information of the target interfaces can be automatically acquired according to the target interfaces selected by the testers, the link dependency relationship among the plurality of target interfaces is determined according to the parameter entering information and parameter exiting information of the plurality of target interfaces, and the plurality of target interfaces are automatically tested according to the link dependency relationship among the plurality of target interfaces, so that the labor is saved, and the testing efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an application scenario of a shared service platform according to an embodiment of the present application;
fig. 2 is a block diagram of a shared service platform according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a testing method of a shared service platform according to an embodiment of the present application;
FIGS. 4A-4E are schematic diagrams of a rotary linked list according to embodiments of the present application;
FIG. 5 is a schematic flow chart of a method for rotating a linked list according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For a better understanding of the technical solution of the present application, the following detailed description of the embodiments of the present application refers to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one way of describing an association of associated objects, meaning that there may be three relationships, e.g., a and/or b, which may represent: the first and second cases exist separately, and the first and second cases exist separately. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
Referring to fig. 1, an application scenario schematic diagram of a shared service platform according to an embodiment of the present application is provided. As shown in fig. 1, the application scenario includes a server 110, a merchant terminal 120, a free professional terminal 130, and a tester terminal 140. The merchant terminal 120, the free professional terminal 130, and the tester terminal 140 are respectively communicatively connected to the server 110. The communication connection may be a wired or wireless communication connection, which is not limited by the embodiments of the present application.
The server 110 may carry a shared service platform and a test platform, where the shared service platform and the test platform are coupled. Merchants can register with the shared service platform through merchant terminals 120 to issue tasks; the free professional can register in the shared service platform through the free professional terminal 130 to receive and complete tasks issued by merchants so as to acquire corresponding rewards; the tester can log in the test platform through the tester terminal 140, and test the shared service platform through the test platform so as to ensure the stable and reliable operation of the shared service platform.
The merchant terminal 120 refers to a terminal device used by a merchant, the free professional terminal 130 refers to a terminal device used by a free professional, and the tester terminal 140 refers to a terminal used by a tester. It should be noted that, in the following, the sending of information or instructions to the merchant by the shared service platform refers to the sending of information or instructions to the merchant terminal 120 by the shared service platform; the receiving, by the shared service platform, information or instructions sent by the merchant means that the shared service platform receives information or instructions sent by the merchant terminal 120; the sharing service platform sending information or instructions to the free professional means that the sharing service platform sending information or instructions to the free professional terminal 130; the shared service platform receiving the information or instruction sent by the free professional means that the shared service platform receives the information or instruction sent by the free professional terminal 130; the shared service platform sending information or instructions to the testers means that the shared service platform sending information or instructions to the tester terminals 140; the test platform receiving the information or the instruction sent by the tester means that the test platform receives the information or the instruction sent by the tester terminal 140. The types of merchant terminal 120, free professional terminal 130, and tester terminal 140 are not particularly limited in embodiments of the present application. For example, merchant terminal 120, free professional terminal 130, and tester terminal 140 may be cell phones, tablet computers, desktop computers, wearable devices, and the like.
It should be noted that fig. 1 is only an exemplary illustration, and should not be taken as limiting the scope of the present application. For example, in FIG. 1, merchant A and merchant B, free professional A and free professional B, tester A and tester B are shown. It can be appreciated that a greater number of merchants and free professionals can be registered on the shared services platform, and a greater number of testers can be configured, and the number of merchants and free professionals is not particularly limited in the embodiments of the present application.
Referring to fig. 2, a block diagram of a shared service platform according to an embodiment of the present application is provided. As shown in fig. 2, a plurality of service units, for example, a subscription service unit, a billing service unit, an issuing service unit, and an invoicing service unit, are included in the shared service platform. Information interaction between different service units can be performed through a communication interface (hereinafter referred to as "interface").
It should be noted that fig. 2 is only an exemplary illustration, and should not be taken as limiting the scope of the present application. For example, other business units may also exist in the shared services platform or a greater or lesser granularity of partitioning of business units in the shared services platform may be employed. In addition, the interfaces related to the embodiments of the present application may be interfaces between different systems in the shared service platform, interfaces between the shared service platform and the outside, or interfaces inside the service units, in addition to interfaces between different service units, which are not particularly limited in the embodiments of the present application.
In the embodiment of the application, the test on the shared service platform comprises the test on each specific service in the shared service platform and the test on an interface in the shared service platform.
However, the number of interfaces in the shared service platform is large, the requirements of different interfaces on the test are different, and the different interfaces have an interdependence relationship, so that in the test process of the interfaces, the tester needs to continuously edit or adjust the test script to adapt to the requirements of the different interfaces, the manpower is wasted, and the test efficiency is low. For example, the parameter-out information of the interface a is parameter-in information of the interface B, that is, the test of the interface B needs to rely on the parameter-out information of the interface a. Therefore, when testing the interface B, a tester is required to search out the parameter information of the interface a, and edit or adjust the test script of the interface B according to the parameter information of the interface a.
In view of the above problems, an embodiment of the present application provides a method for testing a shared service platform, which may automatically obtain, according to a target interface selected by a tester, parameter entering information and parameter exiting information of the target interface, determine a link dependency relationship between a plurality of target interfaces according to the parameter entering information and parameter exiting information of the plurality of target interfaces, and automatically test the plurality of target interfaces according to the link dependency relationship between the plurality of target interfaces, thereby saving manpower and improving testing efficiency. The following detailed description refers to the accompanying drawings.
Referring to fig. 3, a flow chart of a testing method of a shared service platform according to an embodiment of the present application is shown. The method can be applied to a test platform, and as shown in fig. 3, mainly comprises the following steps.
Step S301: and receiving target interface selection information input by a tester, wherein the target interface selection information comprises identification information of a target interface, and the target interface is an interface to be tested selected by the tester.
In the embodiment of the application, before the interface test is carried out, a tester can firstly input target interface selection information in the front-end page of the test platform, namely, the interface to be tested is determined. In the specific implementation, all interfaces can be displayed in the front-end page of the test platform, a tester can screen out target interfaces from all interfaces, and the input of target interface selection information is realized by clicking a control corresponding to the target interface. Or, a target interface input window exists on the front end page of the test platform, and a tester can input relevant information (interface name, identification information and the like) of the target interface in the target interface input window to realize the input of target interface selection information. Of course, other ways of inputting the target interface selection information are also possible, and the embodiment of the present application is not limited thereto.
In addition, the target interface selection information includes identification information of the target interface, and the test platform can learn which interface or interfaces selected by the tester are the target interfaces according to the identification information of the target interface. In other words, the test platform can learn which interface or interfaces the tester desires to test according to the identification information of the target interface.
Step S302: and acquiring the parameter entering information and the parameter exiting information of the target interface according to the identification information of the target interface.
In the embodiment of the application, the database of the server stores the parameter entering information and parameter exiting information of each interface, and the test platform can acquire the parameter entering information and parameter exiting information of the target interface in the database of the server according to the identification information of the target interface after acquiring the identification information of the target interface.
In one possible implementation, the test platform stores the interface information in a rotationally linked list. The rotary linked list comprises a plurality of nodes, and each node in the rotary linked list corresponds to one interface. For example, the rotary linked list shown in fig. 4A includes 5 nodes, where the 1 st node corresponds to interface a, the 2 nd node corresponds to interface B, the 3 rd node corresponds to interface C, the 4 th node corresponds to interface D, and the 5 th node corresponds to interface E. The step S302 specifically includes: determining the node position of the target interface in the rotary linked list according to the identification information of the target interface; according to the node position of the target interface in the rotary linked list, rotating the rotary linked list, and rotating the node corresponding to the target interface to the head node; and acquiring the parameter entering information and the parameter exiting information of the interface corresponding to the head node. It can be understood that the parameter entering information and the parameter exiting information of the interface corresponding to the head node are the parameter entering information and the parameter exiting information of the target interface. The method of rotating the linked list to rotate the node corresponding to the target interface to the head node is described in detail below.
Referring to fig. 5, a flow chart of a rotation method of a rotation linked list according to an embodiment of the present application is shown. As shown in fig. 5, it mainly includes the following steps.
Step S3021: setting a first pointer and a second pointer, wherein the first pointer and the second pointer both point to a head node of the rotary linked list.
Illustratively, in FIG. 4B, a first pointer former and a second pointer former are set, and both the first pointer former and the second pointer former are known to point to the head node of the rotationally linked list, i.e., the 1 st node in the rotationally linked list.
Step S3022: and determining the number k of the mobile nodes of the first pointer according to the node position of the target interface in the rotary linked list.
The node position of the target interface in the rotary linked list, namely the node position of the target interface in the rotary linked list, corresponds to the node number in the rotary linked list. For example, if the target interface is interface C, the node position of the target interface in the rotary linked list is the 3 rd node, so as to determine the number k=3 of moving nodes of the first pointer. That is, the number of moving nodes k of the first pointer matches the node position of the target interface in the rotationally linked list.
Step S3023: the first pointer is moved back by k nodes according to the number of moved nodes k of the first pointer.
Illustratively, after the first pointer former shown in fig. 4B is moved backward by 3 nodes, the first pointer former points to the 4 th node, as shown in fig. 4C.
Step S3024: the first pointer and the second pointer are simultaneously moved backward by the same number of nodes, and the first pointer is moved to the last node of the rotary linked list.
It will be appreciated that in the state shown in fig. 4C, if the first pointer former is moved to the last node (the 5 th node) of the rotary linked list, then only the first pointer former is moved one node backward, and the second pointer former is also moved one node backward. At this time, the first pointer former points to the 5 th node, and the second pointer former points to the 2 nd node, as shown in fig. 4D.
Step S3025: and taking one node behind the second pointer as a new head node to obtain a rotated linked list, wherein the new head node is a node corresponding to the target interface.
Specifically, after step S3024 is completed, the second pointer table+1 nodes are set as new head nodes. For example, in fig. 4D, if the second pointer table points to the 2 nd node, the 3 rd node is taken as the new head node new head, and the rotated linked list is further obtained, as shown in fig. 4E. It will be appreciated that in the rotary linked list shown in fig. 4E, the new head node is the node corresponding to the target interface.
In addition, the manner in which the in-and out-of-reference information is obtained in the database of the server may be different for different types of interfaces. Therefore, the acquiring the parameter entering information and the parameter exiting information of the interface corresponding to the head node in the above steps may specifically include: determining parameter entering information and parameter exiting information acquisition strategies according to interface types of interfaces corresponding to the head nodes; and acquiring the parameter entering information and the parameter exiting information of the interfaces corresponding to the head nodes according to the parameter entering information and the parameter exiting information acquiring strategy. The parameter entering information and parameter exiting information acquiring strategy can be understood as an information interaction mode between the test platform and the server.
The interfaces in the shared service platform may include an http interface and an rcp interface, for example. The http interface is usually an external access interface of the web page, which has low security requirements, so that the http interface can directly access the server to obtain corresponding in-parameter information and out-parameter information. Specifically, according to the interface type of the interface corresponding to the head node, determining parameter entering information and parameter exiting information acquisition strategies corresponding to the http interface; according to the parameter entering information and parameter exiting information acquisition strategy corresponding to the http interface, sending first parameter entering information and parameter exiting information request information to a server; after receiving the first parameter entering information and parameter exiting information request message, the server acquires parameter entering information and parameter exiting information of an interface corresponding to the head node in a database, and sends the parameter entering information and parameter exiting information of the interface corresponding to the head node to the test platform.
The rcp interface is typically an internal interface of the shared service platform, which has high security requirements, and thus, related signature verification is typically required for the rcp interface. Specifically, according to the interface type of the interface corresponding to the head node, determining the parameter entering information and parameter exiting information acquisition strategy corresponding to the rpc interface; sending second parameter entering information and parameter exiting information request information to a server according to parameter entering information and parameter exiting information obtaining strategies corresponding to the rpc interface, wherein the second parameter entering information and parameter exiting information request information comprises signature information; after receiving the second parameter entering information and parameter exiting information request message, the server can verify the signature information in the second parameter entering information and parameter exiting information request message, if the signature information passes the verification, the parameter entering information and parameter exiting information of the interface corresponding to the head node are obtained in the database, and the parameter entering information and parameter exiting information of the interface corresponding to the head node are sent to the test platform; if the verification is not passed, the parameter entering information and parameter exiting information of the interface corresponding to the head node are not sent to the test platform, so that the safety of the information of the rpc interface is improved. In a specific implementation, a person skilled in the art may define a setting rule of signature information according to actual needs, which is not particularly limited in the embodiment of the present application.
In some possible implementations, the test platform and the database may be located in the same server or in different servers, which is not limited by the embodiment of the present application. When the test platform and the database are possibly located in the same server, the information interaction between the test platform and the server can be understood as the information interaction between the test platform and the control unit in the server; when the test platform and the database are located in different servers, the information interaction between the test platform and the server may be understood as the information interaction between the test platform and the database server.
Step S303: and determining the link dependency relationship of the at least two target interfaces according to the parameter entering information and the parameter exiting information of the at least two target interfaces, wherein the link dependency relationship is used for representing the association relationship of the at least two target interfaces in the test process.
It can be understood that, after the tester selects the target interface, the test platform can automatically obtain the parameter entering information and parameter exiting information corresponding to the target interface by adopting the steps S301-S303.
In a specific implementation, a tester may select multiple target interfaces (i.e., at least two target interfaces) that have link dependencies. For example, if the tester knows from experience or from the existing test reference that the interface a, the interface B and the interface C have link dependency relationships, in the above steps, the interface a, the interface B and the interface C may be sequentially or simultaneously selected as the target interfaces. After the test platform sequentially obtains the parameter entering information and parameter exiting information of the interface A, the interface B and the interface C, the link dependency relationship of the interface A, the interface B and the interface C can be determined according to the parameter entering information and the parameter exiting information of the interface A, the interface B and the interface C. The link dependency relationship is used for representing the association relationship of the interface A, the interface B and the interface C in the test process. For example, if the parameter outputting information of the interface a is matched with the parameter inputting information of the interface C, the interface C depends on the interface a; if the parameter outlet information of the interface C is matched with the parameter inlet information of the interface B, the interface B depends on the interface C.
That is, in the embodiment of the present application, after a tester selects a plurality of target interfaces having link dependency relationships, the test platform may automatically determine the link dependency relationships between the plurality of target interfaces. In other words, the tester only needs to know that a link dependency relationship exists among a plurality of interfaces, and does not need to determine what link dependency relationship exists among the interfaces, so that the convenience of operation of the tester is improved.
Step S304: and testing the at least two target interfaces according to the link dependency relationship of the at least two target interfaces.
In the embodiment of the application, after determining the link dependency relationship between at least two target interfaces, the test platform can test the at least two target interfaces according to the link dependency relationship between the at least two target interfaces. For example, for the above interface a, interface B and interface C, the output parameter of the interface a may be configured as the input parameter of the interface C, the output parameter of the interface C may be configured as the input parameter of the interface B, and the interface a, the interface C and the interface B may be tested in sequence, so as to implement testing of multiple target interfaces.
That is, in the embodiment of the present application, a plurality of target interfaces having a link dependency relationship may be tested as a whole. In a specific implementation, the multiple target interfaces can correspond to the same test script, so that automatic testing of the multiple target interfaces is realized. Because the test script corresponding to each target interface is not required to be edited or adjusted by a tester in the test process, the labor is saved, and the test efficiency is improved.
According to the embodiment of the application, the parameter entering information and parameter exiting information of the target interfaces can be automatically acquired according to the target interfaces selected by the testers, the link dependency relationship among the plurality of target interfaces is determined according to the parameter entering information and parameter exiting information of the plurality of target interfaces, and the plurality of target interfaces are automatically tested according to the link dependency relationship among the plurality of target interfaces, so that the labor is saved, and the testing efficiency is improved.
In one possible implementation, performance testing may be performed on interfaces in a shared services platform. In the performance test process of the interfaces, the pressure test protocol and the transmission protocol of the interfaces need to be utilized, and the pressure test protocol and the transmission protocol corresponding to each interface may be different. Therefore, the step S304 specifically includes: determining a pressure measurement protocol and a transmission protocol corresponding to each of at least two target interfaces; and according to the pressure measurement protocol and the transmission protocol corresponding to each target interface and the link dependency relationship of at least two target interfaces, performance test is sequentially carried out on the at least two target interfaces. In a specific implementation, the micro-reference test framework (Java Microbenchmark Harness, JMH) can be embedded into the test platform, and the JMH comprises a pressure test protocol and a transmission protocol corresponding to each interface, so that the pressure test protocol and the transmission protocol embedded into the micro-reference test framework JMH can be called in the test process; among the embedded pressure measurement protocols and transmission protocols of JMH, the pressure measurement protocol and transmission protocol corresponding to each of the at least two target interfaces is determined.
In one possible implementation, after testing of the target interface is completed, the test results may be transmitted to a front-end page and/or sent to a tester via a mailbox, so that the tester views the test results. In a specific implementation, the information or the field concerned in the test result can be configured to an ant, and the test result is transmitted to a front-end page through the ant and/or sent to a tester through a mailbox. Wherein ant is a tool for automating the steps of compiling, testing, deploying, etc. of software. Of course, those skilled in the art may use other tools according to actual needs, and the embodiment of the present application is not limited thereto.
It is understood that in the above test procedure, the test cases can also be used. However, in the prior art, the test cases are not maintained or managed perfectly, so that the test cases are lost or missing. For example, in the process of online editing test cases by a tester, if the tester exits outside the system or fails to save the edited test cases in time due to other reasons, the edited test cases may be lost.
Aiming at the problems, the embodiment of the application adopts an enterprise knowledge management and collaboration software (conflux) tool to build the test case, and the conflux can solve the problem that data cannot be stored due to exit outside a program or other reasons. Specifically, the conflux tool can automatically save data to redis through two mechanisms of a push-to-copy script (backup. Sh) and a timing configuration (crontab), and sets the expiration time of the data to clean the cache data at fixed time, so that the data is ensured to be updated in time and the problems of cache breakdown and the like of the redis are avoided. In addition, RDB techniques of redis may be employed to address performance and concurrency issues, as well as for post-disaster data recovery issues.
Corresponding to the embodiment, the application also provides electronic equipment. It will be appreciated that the electronic device may be the server shown in fig. 1.
Referring to fig. 6, a schematic structural diagram of an electronic device according to an embodiment of the present application is provided. As shown in fig. 6, the electronic device 600 may include: processor 610, memory 620, and communication unit 660. The components may communicate via one or more buses, and it will be appreciated by those skilled in the art that the configuration of the server as shown in the drawings is not limiting of the embodiments of the application, and that it may be a bus-like structure, a star-like structure, or include more or fewer components than shown, or may be a combination of certain components or a different arrangement of components.
Wherein the communication unit 660 is configured to establish a communication channel, so that the storage device can communicate with other devices. Receiving user data sent by other devices or sending user data to other devices.
The processor 610, which is a control center of the storage device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and/or processes data by running or executing software programs and/or modules stored in the memory 620, and invoking data stored in the memory. The processor may be comprised of integrated circuits (integrated circuit, ICs), such as a single packaged IC, or may be comprised of packaged ICs that connect multiple identical or different functions. For example, the processor 610 may include only a central processing unit (central processing unit, CPU). In the embodiment of the application, the CPU can be a single operation core or can comprise multiple operation cores.
The memory 620, for storing instructions for execution by the processor 610, the memory 620 may be implemented by any type or combination of volatile or nonvolatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
The execution of the instructions in memory 620, when executed by processor 610, enables electronic device 600 to perform some or all of the steps of the method embodiments described above.
In a specific implementation, the present application further provides a computer storage medium, where the computer storage medium may store a program, where the program may include some or all of the steps in each embodiment of the calling method provided by the present application when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (random access memory, RAM), or the like.
It will be apparent to those skilled in the art that the techniques of embodiments of the present application may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present application may be embodied essentially or in parts contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method of the embodiments or some parts of the embodiments of the present application.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and reference should be made to the description in the method embodiment for relevant points.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The foregoing is merely exemplary of embodiments of the present application to enable those skilled in the art to understand or practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the terminal embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference should be made to the description in the method embodiment for relevant points.
The above embodiments of the present application do not limit the scope of the present application.

Claims (9)

1. The method for testing the shared service platform is characterized by comprising the following steps of:
receiving target interface selection information input by a tester, wherein the target interface selection information comprises identification information of a target interface, and the target interface is an interface to be tested selected by the tester;
acquiring the parameter entering information and the parameter exiting information of the target interface according to the identification information of the target interface;
determining the link dependency relationship of at least two target interfaces according to the input parameter information and the output parameter information of at least two target interfaces, wherein the link dependency relationship is used for representing the association relationship of the at least two target interfaces in the test process;
testing at least two target interfaces according to the link dependency relationship of the at least two target interfaces;
the obtaining the parameter entering information and the parameter exiting information of the target interface according to the identification information of the target interface includes:
determining the node position of the target interface in a rotary linked list according to the identification information of the target interface, wherein the rotary linked list comprises a plurality of nodes, and each node corresponds to one interface;
rotating the rotating chain table according to the node position of the target interface in the rotating chain table, and rotating the node corresponding to the target interface to a head node;
and acquiring the parameter entering information and the parameter exiting information of the interface corresponding to the head node, wherein the parameter entering information and the parameter exiting information of the interface corresponding to the head node are the parameter entering information and the parameter exiting information of the target interface.
2. The method of claim 1, wherein rotating the rotation linked list according to the node position of the target interface in the rotation linked list, and rotating the node corresponding to the target interface to a head node, comprises:
setting a first pointer and a second pointer, wherein the first pointer and the second pointer both point to a head node of the rotary linked list;
determining the number k of moving nodes of the first pointer according to the node position of the target interface in the rotary linked list;
moving the first pointer backward by k nodes according to the number k of the moving nodes of the first pointer;
simultaneously moving the first pointer and the second pointer backwards by the same node number, and moving the first pointer to the last node of the rotary linked list;
and taking one node behind the second pointer as a new head node to obtain a rotated rotary linked list, wherein the new head node is the node corresponding to the target interface.
3. The method according to claim 1, wherein the obtaining the parameter-in information and the parameter-out information of the interface corresponding to the head node includes:
determining parameter entering information and parameter exiting information acquisition strategies according to interface types of interfaces corresponding to the head nodes;
and acquiring the parameter entering information and the parameter exiting information of the interface corresponding to the head node according to the parameter entering information and parameter exiting information acquisition strategy.
4. A method according to claim 3, wherein if the interface type of the interface corresponding to the head node is an http interface, determining the parameter-in information and parameter-out information acquisition policy according to the interface type of the interface corresponding to the head node includes: determining parameter entering information and parameter exiting information acquisition strategies corresponding to the http interface according to the interface type of the interface corresponding to the head node;
the step of obtaining the parameter entering information and the parameter exiting information of the interface corresponding to the head node according to the parameter entering information and parameter exiting information obtaining strategy comprises the following steps: sending first parameter entering information and parameter exiting information request information to a server according to parameter entering information and parameter exiting information obtaining strategies corresponding to the http interface; and receiving the parameter entering information and the parameter exiting information of the interface corresponding to the head node, which are sent by the server.
5. A method according to claim 3, wherein if the interface type of the interface corresponding to the head node is rpc interface, determining the parameter-in information and parameter-out information acquisition policy according to the interface type of the interface corresponding to the head node includes: determining the parameter entering information and parameter exiting information acquisition strategy corresponding to the rpc interface according to the interface type of the interface corresponding to the head node;
the step of obtaining the parameter entering information and the parameter exiting information of the interface corresponding to the head node according to the parameter entering information and parameter exiting information obtaining strategy comprises the following steps: sending second parameter entering information and parameter exiting information request information to a server according to parameter entering information and parameter exiting information obtaining strategies corresponding to the rpc interface, wherein the second parameter entering information and parameter exiting information request information comprises signature information; and if the signature information passes the verification of the server, receiving the parameter entering information and the parameter exiting information of the interface corresponding to the head node, which are sent by the server.
6. The method according to claim 1, wherein said testing at least two of said target interfaces according to their link dependencies comprises:
determining a pressure measurement protocol and a transmission protocol corresponding to each of at least two target interfaces;
and according to the pressure measurement protocol and the transmission protocol corresponding to each target interface and the link dependency relationship of at least two target interfaces, performing performance test on at least two target interfaces in sequence.
7. The method of claim 6, wherein determining a pressure measurement protocol and a transmission protocol corresponding to each of the at least two target interfaces comprises:
invoking a pressure measurement protocol and a transmission protocol embedded in the micro reference test framework JMH;
and determining the pressure measurement protocol and the transmission protocol corresponding to each target interface in at least two target interfaces in the pressure measurement protocol and the transmission protocol embedded in the JMH.
8. An electronic device, comprising:
a processor;
a memory;
and a computer program, wherein the computer program is stored in the memory, the computer program comprising instructions that, when executed by the electronic device, cause the electronic device to perform the method of any one of claims 1 to 7.
9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program, when run, controls a device in which the computer readable storage medium is located to perform the method of any one of claims 1 to 7.
CN202210860440.9A 2022-07-21 2022-07-21 Test method of shared service platform, electronic equipment and storage medium Active CN115102879B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210860440.9A CN115102879B (en) 2022-07-21 2022-07-21 Test method of shared service platform, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210860440.9A CN115102879B (en) 2022-07-21 2022-07-21 Test method of shared service platform, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115102879A CN115102879A (en) 2022-09-23
CN115102879B true CN115102879B (en) 2023-11-21

Family

ID=83298211

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210860440.9A Active CN115102879B (en) 2022-07-21 2022-07-21 Test method of shared service platform, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115102879B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130022708A (en) * 2011-08-26 2013-03-07 강원대학교산학협력단 Test case creating mehtod and running method of robot software component using specifications of required interface
CN108446221A (en) * 2018-03-05 2018-08-24 平安普惠企业管理有限公司 System detection method, device, computer equipment and storage medium
CN108763071A (en) * 2018-05-17 2018-11-06 平安科技(深圳)有限公司 A kind of webpage test method and terminal device
CN110377503A (en) * 2019-06-19 2019-10-25 平安银行股份有限公司 Method for testing pressure, device, computer equipment and storage medium
CN111797152A (en) * 2020-06-23 2020-10-20 北京自如信息科技有限公司 Data scene generation method and device and computer equipment
CN112162924A (en) * 2020-09-27 2021-01-01 平安信托有限责任公司 Interface automation test method and device, computer equipment and storage medium
CN112316442A (en) * 2020-11-12 2021-02-05 腾讯科技(深圳)有限公司 Live broadcast interaction method and device, computer equipment and storage medium
CN112433753A (en) * 2020-11-25 2021-03-02 平安普惠企业管理有限公司 Interface document generation method, device, equipment and medium based on parameter information
CN113760697A (en) * 2020-07-15 2021-12-07 北京沃东天骏信息技术有限公司 Interface testing method and device, electronic equipment and storage medium
CN113900936A (en) * 2021-09-30 2022-01-07 未鲲(上海)科技服务有限公司 Interface testing method, device, equipment and medium based on correlation characteristic analysis
CN113900933A (en) * 2021-09-29 2022-01-07 度小满科技(北京)有限公司 Test method and related device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10324826B2 (en) * 2013-02-12 2019-06-18 Focus IP Inc. Developer channel compliance

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130022708A (en) * 2011-08-26 2013-03-07 강원대학교산학협력단 Test case creating mehtod and running method of robot software component using specifications of required interface
CN108446221A (en) * 2018-03-05 2018-08-24 平安普惠企业管理有限公司 System detection method, device, computer equipment and storage medium
CN108763071A (en) * 2018-05-17 2018-11-06 平安科技(深圳)有限公司 A kind of webpage test method and terminal device
CN110377503A (en) * 2019-06-19 2019-10-25 平安银行股份有限公司 Method for testing pressure, device, computer equipment and storage medium
CN111797152A (en) * 2020-06-23 2020-10-20 北京自如信息科技有限公司 Data scene generation method and device and computer equipment
CN113760697A (en) * 2020-07-15 2021-12-07 北京沃东天骏信息技术有限公司 Interface testing method and device, electronic equipment and storage medium
CN112162924A (en) * 2020-09-27 2021-01-01 平安信托有限责任公司 Interface automation test method and device, computer equipment and storage medium
CN112316442A (en) * 2020-11-12 2021-02-05 腾讯科技(深圳)有限公司 Live broadcast interaction method and device, computer equipment and storage medium
CN112433753A (en) * 2020-11-25 2021-03-02 平安普惠企业管理有限公司 Interface document generation method, device, equipment and medium based on parameter information
CN113900933A (en) * 2021-09-29 2022-01-07 度小满科技(北京)有限公司 Test method and related device
CN113900936A (en) * 2021-09-30 2022-01-07 未鲲(上海)科技服务有限公司 Interface testing method, device, equipment and medium based on correlation characteristic analysis

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
A New Transmission Scheme for Additional Bits with Rotated LDPC Coded Signals;Jiachen Sun等;2021 IEEE Wireless Communications and Networking Conference (WCNC);全文 *
OSS4.0网络编排系统接口自动化测试;张佐中;周策;钱明芝;;电信技术(第04期);全文 *
一个基于数据共享的接口开发平台;谢业欣;;软件(第08期);全文 *
外包数据中基于链表的B+树数据完整性检测算法研究;方睿;廖勇;方欣;周敏;吴强;;成都信息工程大学学报(第04期);全文 *

Also Published As

Publication number Publication date
CN115102879A (en) 2022-09-23

Similar Documents

Publication Publication Date Title
CN107463362B (en) Method and system for continuous deployment based on multiple Jenkins
EP2541420A1 (en) Method and system for automated system migration
CN110928802B (en) Test method, device, equipment and storage medium based on automatic generation use case
CN107241315B (en) Access method and device of bank gateway interface and computer readable storage medium
CN113760697B (en) Interface testing method, device, electronic equipment and storage medium
CN110932918B (en) Log data acquisition method and device and storage medium
CN112015654A (en) Method and apparatus for testing
CN110019158A (en) A kind of method and apparatus of monitoring data quality
CN111221727A (en) Test method, test device, electronic equipment and computer readable medium
CN113360376A (en) Buried point testing method and device
CN112506771A (en) Message comparison method and device
US9569516B2 (en) Method and device for executing an enterprise process
CN115102879B (en) Test method of shared service platform, electronic equipment and storage medium
CN112036836A (en) Service opening method, system and equipment
CN115390861A (en) Resource deployment method, device and equipment and storage medium
CN112132544B (en) Inspection method and device of business system
CN114356781A (en) Software function testing method and device
CN114170006A (en) Information data acquisition method, device, equipment and medium based on state machine
CN112650815A (en) Method and device for synchronizing environmental data, storage medium and electronic device
CN115543491A (en) Microservice processing method and device
CN111159988A (en) Model processing method and device, computer equipment and storage medium
US20200097870A1 (en) Work task commitment manager
CN113176943B (en) Multi-environment consistency deployment method and device
CN110321132A (en) A kind of code dissemination method and device
CN113010424B (en) Interface automatic test processing method, system, computer 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
GR01 Patent grant
GR01 Patent grant