CN115102879A - 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
CN115102879A
CN115102879A CN202210860440.9A CN202210860440A CN115102879A CN 115102879 A CN115102879 A CN 115102879A CN 202210860440 A CN202210860440 A CN 202210860440A CN 115102879 A CN115102879 A CN 115102879A
Authority
CN
China
Prior art keywords
information
interface
parameter
target
node
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.)
Granted
Application number
CN202210860440.9A
Other languages
Chinese (zh)
Other versions
CN115102879B (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

Images

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 test method, electronic equipment and a storage medium for a shared service platform, 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 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 the parameter exiting information of the 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. In the embodiment of the application, the parameter input information and the parameter output information of the target interface can be automatically acquired according to the target interface selected by the tester, the link dependency relationship among the target interfaces is determined according to the parameter input information and the parameter output information of the target interfaces, and the 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 test method, an electronic device, and a storage medium for a shared service platform.
Background
The shared service platform is used for helping enterprises to use shared products provided by remote digital talents (non-enterprise employees) in a large scale, and provides a series of tools and services around matching, delivery, settlement and guarantee in the process, so that the enterprises are helped to quickly solve the problems encountered in production and operation. Both the merchant and the free-job owner may register as users of the shared service platform. The free caretaker can also receive and complete the task issued by the merchant to obtain corresponding reward.
In order to ensure stable and reliable operation of the shared service platform, the shared service platform generally needs to be tested. The method comprises the steps of testing each specific service in the shared service platform and testing an interface in the shared service platform.
However, the number of interfaces in the shared service platform is large, different interfaces have different requirements for testing, and different interfaces have interdependencies, and in the process of testing the interfaces, testers need to continuously edit or adjust test scripts to adapt to the requirements of different interfaces, which wastes manpower and has low testing efficiency.
Disclosure of Invention
In view of this, the present application provides a testing method, an electronic device, and a storage medium for sharing a service platform, so as to solve the problems that in the prior art, in the process of testing an interface, a tester needs to continuously edit or adjust a test script to meet the requirements of different interfaces, manpower is wasted, and testing efficiency is low.
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 parameter exiting information of the target interface according to the identification information of the target interface;
determining a link dependency relationship of at least two target interfaces according to the parameter entering information and the parameter exiting information of at least two target interfaces, wherein the link dependency relationship is used for representing an incidence relationship of the at least two target interfaces in the test process;
and testing the at least two target interfaces according to the link dependency relationship of the at least two target interfaces.
In a possible implementation manner, the obtaining of the parameter entry information and the parameter exit 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 rotating linked list according to the identification information of the target interface, wherein the rotating linked list comprises a plurality of nodes, and each node corresponds to one interface;
rotating the rotating linked list according to the node position of the target interface in the rotating linked list, and rotating the node corresponding to the target interface to a head node;
and acquiring the parameter entering information and parameter exiting information of the interface corresponding to the head node, wherein the parameter entering information and parameter exiting information of the interface corresponding to the head node are the parameter entering information and parameter exiting information of the target interface.
In a possible implementation manner, the rotating linked list according to the node position of the target interface in the rotating linked list, and rotating the node corresponding to the target interface to a 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 rotating chain table;
determining the number k of the mobile nodes of the first pointer according to the node position of the target interface in the rotating chain table;
according to the number k of the mobile nodes of the first pointer, moving the first pointer backwards by k nodes;
moving the first pointer and the second pointer backwards by the same node number at the same time, and moving the first pointer to the last node of the rotating chain table;
and taking a 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.
In a possible implementation manner, the obtaining of the parameter entry information and the parameter exit information of the interface corresponding to the head node includes:
determining a parameter entering information and parameter exiting information acquiring strategy according to the interface type of the interface corresponding to the head node;
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 acquiring strategy.
In a possible implementation manner, if the interface type of the interface corresponding to the head node is an http interface, determining the access information and the access information obtaining policy according to the interface type of the interface corresponding to the head node includes: determining a parameter entering information and parameter exiting information acquiring strategy corresponding to the http interface according to the interface type of the interface corresponding to the head node;
the 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 acquiring strategy comprises the following steps: according to the access information and access information acquisition strategy corresponding to the http interface, sending a first access information and access information request message to a server; and receiving the parameter entering information and parameter exiting information of the interface corresponding to the head node, which are sent by the server.
In a possible implementation manner, if the interface type of the interface corresponding to the head node is an rpc interface, the determining, according to the interface type of the interface corresponding to the head node, a parameter entering information and parameter leaving information obtaining policy includes: determining rpc an access information and an access information acquisition strategy corresponding to the interface according to the interface type of the interface corresponding to the head node;
the 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 acquiring strategy comprises the following steps: sending a second participation information and participation information request message to a server according to the participation information and participation information acquisition strategy corresponding to the rpc interface, wherein the second participation information and participation information request message comprises signature information; and if the signature information passes the verification of the server, receiving the access information and the access information of the interface corresponding to the head node, which are sent by the server.
In a 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 sequentially carrying out performance test on at least two target interfaces according to a pressure test protocol and a transmission protocol corresponding to each target interface and the link dependence of at least two target interfaces.
In a possible implementation manner, the determining a pressure measurement protocol and a transmission protocol corresponding to each of the at least two target interfaces includes:
invoking the pressure test protocol and the transmission protocol embedded in the micro-benchmark test framework JMH;
determining, in the JMH embedded pressure measurement protocol and transport protocol, a pressure measurement protocol and transport protocol corresponding to each of the at least two target interfaces.
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 the program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the method in any one of the first aspects.
In the embodiment of the application, the entry-parameter information and the exit-parameter information of the target interface can be automatically acquired according to the target interface selected by the tester, the link dependency relationship among the target interfaces is determined according to the entry-parameter information and the exit-parameter information of the target interfaces, and the target interfaces are automatically tested according to the link dependency relationship among the 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 required to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a shared service platform according to an embodiment of the present disclosure;
fig. 2 is a block diagram illustrating a structure of a shared service platform according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a testing method for a shared service platform according to an embodiment of the present disclosure;
FIGS. 4A-4E are schematic diagrams of a linked list according to an embodiment of the present disclosure;
FIG. 5 is a flowchart illustrating a method for rotating a linked list according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For better understanding of the technical solutions of the present application, the following detailed descriptions of the embodiments of the present application are provided with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of 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 type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., A and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Referring to fig. 1, a schematic view of an application scenario of a shared service platform provided in an embodiment of the present application is shown. As shown in fig. 1, the application scenario includes a server 110, a merchant terminal 120, a free occupational terminal 130, and a tester terminal 140. The merchant terminal 120, the discretionary worker terminal 130 and the tester terminal 140 are respectively in communication connection with the server 110. The communication connection may be a wired communication connection or a wireless communication connection, which is not limited in the embodiments of the present application.
The server 110 may carry a shared service platform and a test platform, and the shared service platform and the test platform are coupled. A merchant may register with the shared service platform through a merchant terminal 120 to issue a task; the free-job operator can register on the shared service platform through the free-job operator terminal 130 to receive and complete the task issued by the merchant so as to obtain corresponding reward; the tester can log in the test platform through the tester terminal 140, and the shared service platform is tested through the test platform, so that stable and reliable operation of the shared service platform is ensured.
The merchant terminal 120 is a terminal device used by a merchant, the free employee terminal 130 is a terminal device used by a free employee, and the tester terminal 140 is a terminal used by a tester. It should be noted that, the following description of sending information or instruction to the merchant by the shared service platform refers to sending information or instruction to the merchant terminal 120 by the shared service platform; the shared service platform receives information or an instruction sent by the merchant, which means that the shared service platform receives the information or the instruction sent by the merchant terminal 120; the shared service platform sends information or instructions to the free occupational, namely the shared service platform sends information or instructions to the free occupational terminal 130; the shared service platform receives the information or the instruction sent by the free occupational operator, which means that the shared service platform receives the information or the instruction sent by the free occupational operator terminal 130; the shared service platform sends information or instructions to the testers, namely the shared service platform sends the information or instructions to the testers terminal 140; the test platform receives the information or the instruction sent by the tester, which means that the test platform receives the information or the instruction sent by the tester terminal 140. The embodiments of the present application do not specifically limit the types of the merchant terminal 120, the discretionary actor terminal 130, and the tester terminal 140. For example, merchant terminal 120, discretionary person terminal 130, and tester terminal 140 may be cell phones, tablets, 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 a limitation of the scope of the present application. For example, a merchant a and a merchant B, a free employee a and a free employee B, a tester a and a tester B are shown in fig. 1. It is understood that, in the shared service platform, a greater number of merchants and free employees may be registered, and a greater number of testers may be configured, and the number of merchants and free employees 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 disclosure is provided. As shown in fig. 2, the shared service platform includes a plurality of service units, such as a subscription service unit, an account splitting service unit, an issuing service unit, and an invoicing service unit. The different service units can exchange information 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 a limitation of the scope of the present application. For example, there may be other business units in the shared services platform, or a greater or lesser granularity of partitioning of the business units in the shared services platform. In addition, the interface related to the embodiment of the present application may be, in addition to an interface between different service units, an interface between different systems in a shared service platform, an interface between the shared service platform and the outside, or an interface inside a service unit, and the like, which is not specifically limited in the embodiment of the present application.
In the embodiment of the present application, the test on the shared service platform includes a test on each specific service in the shared service platform and a test on an interface in the shared service platform.
However, the number of interfaces in the shared service platform is large, different interfaces have different requirements for testing, and different interfaces have interdependencies, so that in the process of testing the interfaces, testers need to continuously edit or adjust test scripts to adapt to the requirements of different interfaces, which wastes manpower, and has low testing efficiency. Illustratively, the parameter information of the interface a is the parameter information of the interface B, that is, the test on the interface B needs to rely on the parameter information of the interface a. Therefore, when testing the interface B, a tester needs to search the parameter information of the interface a, and correspondingly 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 test method for a shared service platform, which can automatically obtain entry information and exit information of a target interface according to the target interface selected by a tester, determine a link dependency relationship between multiple target interfaces according to the entry information and the exit information of the multiple target interfaces, and automatically test the multiple target interfaces according to the link dependency relationship between the multiple target interfaces, thereby saving manpower and improving test efficiency. The following detailed description is made with reference to the accompanying drawings.
Referring to fig. 3, a schematic flowchart of a testing method for a shared service platform provided in the embodiment of the present application is shown. The method can be applied to a test platform, as shown in fig. 3, which mainly includes the following steps.
Step S301: 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 interface testing, a tester may first input target interface selection information in a front-end page of a testing platform, that is, determine an interface to be tested. In specific implementation, all interfaces can be displayed in a front-end page of the test platform, a tester can screen out a target interface from all the interfaces, and input of target interface selection information is achieved by clicking a control corresponding to the target interface. Or, a target interface input window exists on the front 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, there may be other input modes of the target interface selection information, and the embodiment of the present application does not limit this.
In addition, the target interface selection information includes identification information of the target interface, and the test platform can know which interface or interfaces selected by the tester are the target interface according to the identification information of the target interface. In other words, the test platform can know 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 entry information and the exit information of each interface, and after the test platform obtains the identification information of the target interface, the entry information and the exit information of the target interface can be obtained in the database of the server according to the identification information of the target interface.
In one possible implementation manner, the test platform stores the interface information in a manner of a rotating linked list. The rotating chain table comprises a plurality of nodes, and each node in the rotating chain table corresponds to one interface. For example, the 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. Step S302 specifically includes: determining the node position of the target interface in the rotating chain table according to the identification information of the target interface; rotating the rotating linked list according to the node position of the target interface in the rotating linked list, and rotating the node corresponding to the target interface to a head node; and acquiring the parameter entering information and parameter exiting information of the interface corresponding to the head node. It can be understood that the parameter entering information and parameter exiting information of the interface corresponding to the head node are parameter entering information and parameter exiting information of the target interface. The following describes in detail a method for rotating a rotating link table to rotate a node corresponding to a target interface to a head node.
Referring to fig. 5, a schematic flow chart of a method for rotating a linked list according to an embodiment of the present disclosure is shown. As shown in fig. 5, it mainly includes the following steps.
Step S3021: and setting a first pointer and a second pointer, wherein the first pointer and the second pointer both point to the head node of the rotating linked list.
Illustratively, in fig. 4B, a first pointer former and a second pointer are set, and both the first pointer former and the second pointer are known to point to the head node of the linked list, i.e., the 1 st node in the 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 rotating chain table.
The node position of the target interface in the rotating chain table, namely the target interface, corresponds to the several nodes in the rotating chain table. For example, if the target interface is interface C, the node position of the target interface in the rotating link table is the 3 rd node, and the number k of the mobile nodes of the first pointer is determined to be 3. That is, the number of moving nodes k of the first pointer matches the node location of the target interface in the rotating linked list.
Step S3023: and according to the number k of the moving nodes of the first pointer, moving the first pointer backwards by k nodes.
For example, after moving the first pointer former shown in fig. 4B backward by 3 nodes, the first pointer former points to the 4 th node, as shown in fig. 4C.
Step S3024: and 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 rotating chain table.
It can be understood that in the state shown in fig. 4C, if the first pointer former is moved to the last node (5 th node) of the twiddle list, the first pointer former only needs to be moved backward by one node, and the second pointer later also needs to be moved backward by one node. At this time, the first pointer former points to the 5 th node, and the second pointer later points to the 2 nd node, as shown in FIG. 4D.
Step S3025: and taking a node behind the second pointer as a new head node to obtain a rotated rotating linked list, wherein the new head node is a node corresponding to the target interface.
Specifically, after step S3024 is completed, the second pointer, the +1 node, is taken as the new head node. For example, in fig. 4D, if the second pointer, the pointer, points to the 2 nd node, the 3 rd node is used as the new head node, and the rotated twiddle list is obtained, as shown in fig. 4E. It will be appreciated that in the rotating linked list shown in FIG. 4E, the new head node is the node corresponding to the target interface.
In addition, for different types of interfaces, the manner of obtaining the access information and the access information in the database of the server may be different. Therefore, the obtaining of the entry parameter information and the exit parameter information of the interface corresponding to the head node in the above step may specifically include: determining a parameter entering information and parameter exiting information acquiring strategy according to the interface type of the interface corresponding to the head node; 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 acquiring strategy. The access information and the access information acquisition strategy can be understood as an information interaction mode between the test platform and the server.
Illustratively, the interfaces in the shared services platform may include an http interface and an rcp interface. The http interface is usually an external access interface of a web page, and has a low requirement on security, so that the http interface can directly access the server to obtain corresponding access information and access information. Specifically, according to the interface type of the interface corresponding to the head node, determining a parameter entering information and parameter exiting information acquiring strategy corresponding to the http interface; sending first access information and access information request messages to a server according to access information and access information acquisition strategies corresponding to the http interface; and after receiving the first parameter entering information and parameter exiting information request message, the server acquires parameter entering information and parameter exiting information of the interface corresponding to the head node from the 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 requirements for security, and therefore, related signature verification is typically required for the rcp interface. Specifically, determining rpc an entry parameter information and an exit parameter information acquisition strategy corresponding to the interface according to the interface type of the interface corresponding to the head node; according to the access information and access information acquisition strategy corresponding to the rpc interface, sending a second access information and access information request message to the server, wherein the second access information and access information request message comprises signature information; after receiving the second entry information and the exit information request message, the server can verify the signature information in the second entry information and the exit information request message, if the verification is passed, the server acquires the entry information and the exit information of the interface corresponding to the head node from the database, and sends the entry information and the exit information of the interface corresponding to the head node to the test platform; if the verification fails, the parameter entering information and the parameter exiting information of the interface corresponding to the head node are not sent to the test platform, so that the information security of the rpc interface is improved. In a specific implementation, a person skilled in the art may define a setting rule of the signature information according to an actual need, and the embodiment of the present application does not specifically limit this.
In some possible implementations, the test platform and the database may be located in the same server or may be located in different servers, which is not limited in this embodiment of the present application. When the test platform and the database are possibly located in the same server, information interaction between the test platform and the server can be understood as information interaction between the test platform and a control unit in the server; when the test platform and the database are located in different servers, information interaction between the test platform and the server can be understood as information interaction between the test platform and the database server.
Step S303: and determining the link dependence 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 dependence relationship is used for representing the incidence 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 may automatically obtain the parameter entry information and the parameter exit information corresponding to the target interface by using the steps S301 to S303.
In a specific implementation, a tester may select a plurality of target interfaces (i.e., at least two target interfaces), and the target interfaces have a link dependency relationship. For example, if a tester knows that interface a, interface B, and interface C have a link dependency relationship based on experience or based on an existing test reference file, interface a, interface B, and interface C may be sequentially or simultaneously selected as target interfaces in the above steps. After the test platform sequentially obtains the parameter entering information and the 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 incidence relationship of the interface A, the interface B and the interface C in the test process. Illustratively, if the parameter output information of the interface a is matched with the parameter input information of the interface C, the interface C depends on the interface a; if the parameter information of the interface C is matched with the parameter information of the interface B, the interface B depends on the interface C.
That is to say, in the embodiment of the present application, after the tester selects a plurality of target interfaces with link dependency, the test platform may automatically determine the link dependency between the plurality of target interfaces. In other words, the tester only needs to know the link dependency relationship among certain 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 this embodiment of the present application, after determining the link dependency relationship between the at least two target interfaces, the test platform may test the at least two target interfaces according to the link dependency relationship between the at least two target interfaces. For example, for the interface a, the interface B, and the interface C, the egress parameter of the interface a may be configured as the ingress parameter of the interface C, the egress parameter of the interface C may be configured as the ingress parameter of the interface B, and the interface a, the interface C, and the interface B may be sequentially tested to implement testing of a plurality of 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 specific implementation, the multiple target interfaces can correspond to the same test script, and automatic testing of the multiple target interfaces is achieved. Because the testing personnel are not required to edit or adjust the testing script corresponding to each target interface in the testing process, the labor is saved, and the testing efficiency is improved.
In the embodiment of the application, the entry-parameter information and the exit-parameter information of the target interface can be automatically acquired according to the target interface selected by the tester, the link dependency relationship among the target interfaces is determined according to the entry-parameter information and the exit-parameter information of the target interfaces, and the target interfaces are automatically tested according to the link dependency relationship among the target interfaces, so that the labor is saved, and the testing efficiency is improved.
In one possible implementation, the performance of the interface in the shared service platform may be tested. In the process of testing the performance of the interface, the pressure test protocol and the transmission protocol of the interface need to be used, 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 target interface in at least two target interfaces; and sequentially carrying out performance test on the at least two target interfaces according to the pressure test protocol and the transmission protocol corresponding to each target interface and the link dependency relationship of the at least two target interfaces. In specific implementation, a micro reference test frame (Java micro benchmark library, JMH) may be embedded in the test platform, JMH includes a pressure test protocol and a transmission protocol corresponding to each interface, and the pressure test protocol and the transmission protocol embedded in the micro reference test frame JMH may be called in the test process; at JMH, a pressure measurement protocol and a transport protocol corresponding to each of the at least two target interfaces is determined.
In one possible implementation, after the testing of the target interface is completed, the test result may be transmitted to a front-end page and/or sent to a tester through a mailbox so that the tester can view the test result. In specific implementation, the information or the field concerned in the test result can be configured to ant, and the test result is transmitted to a front-end page through ant and/or is sent to a tester through a mailbox. Wherein ant is a tool for linking steps of software compiling, testing, deploying and the like together for automation. Of course, other tools can be adopted by those skilled in the art according to actual needs, and the embodiments of the present application are not limited to this.
It can be understood that, in the test process, test cases may also be used. However, in the prior art, due to the fact that maintenance and management of the test cases are incomplete, the test cases are in danger of being missed or lost. For example, in the process of editing the test cases online by a tester, if the edited test cases cannot be stored in time due to exit from outside the system or other reasons, the edited test cases may be lost.
Aiming at the problems, the embodiment of the application adopts an enterprise knowledge management and collaborative software (confluence) tool to build the test case, and the confluence can solve the problem that data cannot be stored due to exit outside a program or other reasons. Specifically, the confluence tool can automatically save data to redis through two mechanisms, namely a one-key copy script (backup. sh) and a timed configuration (crontab), set the data expiration time to regularly clear the cache data, and ensure that the data is updated in time and the redis cannot have the problems of cache breakdown and the like. In addition, RDB techniques of redis may also be employed to address performance and concurrency issues, as well as for post-disaster data recovery issues.
Corresponding to the embodiment, the application further provides the electronic equipment. It is understood that the electronic device may be the server shown in fig. 1.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 6, the electronic device 600 may include: a processor 610, a memory 620, and a communication unit 660. The components communicate over one or more buses, and those skilled in the art will appreciate that the configuration of the servers shown in the figures are not meant to limit embodiments of the present invention, and may be in the form of buses, stars, more or fewer components than those shown, some components in combination, or a different arrangement of components.
The communication unit 660 is configured to establish a communication channel so that the storage device can communicate with other devices. Receiving the user data sent by other devices or sending the 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, and performs various functions of the electronic device and/or processes data by operating or executing software programs and/or modules stored in the memory 620 and calling data stored in the memory. A processor may be composed of Integrated Circuits (ICs), for example, a single packaged IC, or multiple packaged ICs connected to the same or different functions. For example, processor 610 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
Memory 620 for storing instructions for execution by processor 610, memory 620 may be implemented by any type of volatile or non-volatile memory device or combination thereof, 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 or optical disk.
The execution instructions in memory 620, when executed by processor 610, enable electronic device 600 to perform some or all of the steps in the above-described method embodiments.
In a specific implementation, the present invention further provides a computer storage medium, where the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments of the calling method provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be essentially or partially implemented in the form of software products, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method in the embodiments or some parts of the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, as for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above are merely exemplary embodiments of the present invention, which can be understood and implemented by those skilled in the art. 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 invention. Thus, the present invention 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 and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
The above embodiments of the present application do not limit the scope of the present application.

Claims (10)

1. A test method for a shared service platform is characterized by comprising 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, and the target interface is an interface to be tested selected by the tester;
acquiring the parameter entering information and parameter exiting information of the target interface according to the identification information of the target interface;
determining a link dependency relationship of at least two target interfaces according to the parameter entering information and the parameter exiting information of at least two target interfaces, wherein the link dependency relationship is used for representing an incidence relationship of the at least two target interfaces in the test process;
and testing the at least two target interfaces according to the link dependency relationship of the at least two target interfaces.
2. The method according to claim 1, wherein the obtaining of the entry information and the exit information of the target interface according to the identification information of the target interface comprises:
determining the node position of the target interface in a rotating linked list according to the identification information of the target interface, wherein the rotating linked list comprises a plurality of nodes, and each node corresponds to one interface;
rotating the rotating linked list according to the node position of the target interface in the rotating linked list, and rotating the node corresponding to the target interface to a head node;
and acquiring the parameter entering information and parameter exiting information of the interface corresponding to the head node, wherein the parameter entering information and parameter exiting information of the interface corresponding to the head node are the parameter entering information and parameter exiting information of the target interface.
3. The method of claim 2, wherein rotating the rotating linked list according to the node position of the target interface in the rotating linked list to rotate 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 rotating chain table;
determining the number k of the mobile nodes of the first pointer according to the node position of the target interface in the rotating chain table;
according to the number k of the mobile nodes of the first pointer, moving the first pointer backwards by k nodes;
moving the first pointer and the second pointer backwards by the same node number at the same time, and moving the first pointer to the last node of the rotating chain table;
and taking a 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.
4. The method of claim 2, wherein the obtaining the ingress and egress information of the interface corresponding to the head node comprises:
determining a parameter entering information and parameter exiting information acquiring strategy according to the interface type of the interface corresponding to the head node;
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 acquiring strategy.
5. The method according to claim 4, wherein if the interface type of the interface corresponding to the head node is an http interface, the determining the access information and the access information acquisition policy according to the interface type of the interface corresponding to the head node includes: determining a parameter access information and parameter access information acquisition strategy corresponding to the http interface according to the interface type of the interface corresponding to the head node;
the 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 acquiring strategy comprises the following steps: according to the access information and access information acquisition strategy corresponding to the http interface, sending a first access information and access information request message to a server; and receiving the parameter entering information and parameter exiting information of the interface corresponding to the head node, which are sent by the server.
6. The method according to claim 4, wherein if the interface type of the interface corresponding to the head node is rpc, the determining the access information and the access information obtaining policy according to the interface type of the interface corresponding to the head node comprises: determining rpc an access information and an access information acquisition strategy corresponding to the interface according to the interface type of the interface corresponding to the head node;
the acquiring the parameter entering information and the parameter leaving information of the interface corresponding to the head node according to the parameter entering information and parameter leaving information acquiring strategy comprises the following steps: sending a second access information and access information request message to a server according to the access information and access information acquisition strategy corresponding to the rpc interface, wherein the second access information and access information request message comprises signature information; and if the signature information passes the verification of the server, receiving the access information and the access information of the interface corresponding to the head node, which are sent by the server.
7. The method according to claim 1, wherein said testing at least two of the 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 sequentially carrying out performance test on at least two target interfaces according to a pressure test protocol and a transmission protocol corresponding to each target interface and the link dependence of at least two target interfaces.
8. The method of claim 7, wherein the determining the pressure measurement protocol and the transmission protocol corresponding to each of the at least two target interfaces comprises:
invoking the pressure test protocol and the transmission protocol embedded in the micro-benchmark test framework JMH;
determining, in the JMH embedded pressure measurement protocol and transport protocol, a pressure measurement protocol and transport protocol corresponding to each of the at least two target interfaces.
9. 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 which, when executed by the electronic device, cause the electronic device to perform the method of any of claims 1 to 8.
10. A computer-readable storage medium, comprising a stored program, wherein the program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the method of any one of claims 1 to 8.
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 true CN115102879A (en) 2022-09-23
CN115102879B 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 (12)

* 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
US20160321167A1 (en) * 2013-02-12 2016-11-03 Focus IP Inc. Developer Channel Compliance
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

Patent Citations (12)

* 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
US20160321167A1 (en) * 2013-02-12 2016-11-03 Focus IP Inc. Developer Channel Compliance
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
JIACHEN SUN等: "A New Transmission Scheme for Additional Bits with Rotated LDPC Coded Signals", 2021 IEEE WIRELESS COMMUNICATIONS AND NETWORKING CONFERENCE (WCNC) *
张佐中;周策;钱明芝;: "OSS4.0网络编排系统接口自动化测试", 电信技术, no. 04 *
方睿;廖勇;方欣;周敏;吴强;: "外包数据中基于链表的B+树数据完整性检测算法研究", 成都信息工程大学学报, no. 04 *
谢业欣;: "一个基于数据共享的接口开发平台", 软件, no. 08 *

Also Published As

Publication number Publication date
CN115102879B (en) 2023-11-21

Similar Documents

Publication Publication Date Title
EP2572294B1 (en) System and method for sql performance assurance services
CN107241315B (en) Access method and device of bank gateway interface and computer readable storage medium
US20080244555A1 (en) Bundling software updates
US11086696B2 (en) Parallel cloned workflow execution
CN113448862B (en) Software version testing method and device and computer equipment
US9823999B2 (en) Program lifecycle testing
CN112182089B (en) Report generation method, device and equipment based on data warehouse model
CN113961332A (en) Method and device for realizing workflow engine, electronic equipment and storage medium
JP5989194B1 (en) Test management system and program
CN112506771A (en) Message comparison method and device
US9569516B2 (en) Method and device for executing an enterprise process
CN115102879A (en) Test method of shared service platform, electronic equipment and storage medium
CN112132544B (en) Inspection method and device of business system
CN115390861A (en) Resource deployment method, device and equipment and storage medium
CN114936152A (en) Application testing method and device
CN115543491A (en) Microservice processing method and device
CN112765188A (en) Configuration information processing method, configuration management system, electronic device, and storage medium
US20160196136A1 (en) Method and system for monitoring quality control activities during development of a software application
CN112650815A (en) Method and device for synchronizing environmental data, storage medium and electronic device
CN112749948A (en) Information processing method and device for project management
US20200097870A1 (en) Work task commitment manager
CN113448931B (en) Data processing method, business transaction platform and business providing platform
CN116485585B (en) Digital concrete management system
CN112988555B (en) Interface testing method, device, equipment and storage medium
US20220343240A1 (en) System and method for parallel object modification in an enterprise resource planning application

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