CN111338947A - Test method, test device, storage medium and electronic equipment - Google Patents

Test method, test device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111338947A
CN111338947A CN202010112469.XA CN202010112469A CN111338947A CN 111338947 A CN111338947 A CN 111338947A CN 202010112469 A CN202010112469 A CN 202010112469A CN 111338947 A CN111338947 A CN 111338947A
Authority
CN
China
Prior art keywords
test case
service
link
interface
update service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010112469.XA
Other languages
Chinese (zh)
Inventor
李文博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lazas Network Technology Shanghai Co Ltd
Original Assignee
Lazas Network Technology Shanghai 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 Lazas Network Technology Shanghai Co Ltd filed Critical Lazas Network Technology Shanghai Co Ltd
Priority to CN202010112469.XA priority Critical patent/CN111338947A/en
Publication of CN111338947A publication Critical patent/CN111338947A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a test method, a test device, a storage medium and electronic equipment. In the embodiment of the invention, when the system has the updating service, the link related to the updating service is called, and the test case in the link is operated. Therefore, the stability of the relevant link of the update service can be ensured, and the condition that the upstream and downstream can not be called due to the release of the update service is avoided.

Description

Test method, test device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computers, and in particular, to a test method, an apparatus, a storage medium, and an electronic device.
Background
And after the service in the issuing system is executed and issued, running a smoking case of the system to verify whether the function of the system is normal. The term "smoke test" describes the process of verifying code changes before embedding them into the source tree of a product. Smoke testing is the most cost effective method of identifying and repairing software defects. The smoke test is designed to confirm that changes in the code will run as expected and not break the stability of the entire version. However, existing smoke tests only focus on whether an interface associated with a service is available, and there is no verification of links upstream and downstream of the service, resulting in upstream and downstream unavailability after the service is released.
Disclosure of Invention
In view of this, embodiments of the present invention provide a testing method, an apparatus, a storage medium, and an electronic device, which can improve the accuracy of testing and ensure smooth operation after service release.
In a first aspect, an embodiment of the present invention provides a testing method, where the method includes:
determining an update service, wherein the update service is a changed service;
determining at least one relevant link and at least one connected interface of the update service;
acquiring at least one link test case corresponding to the link related to the update service;
acquiring at least one interface test case of an interface connected with the updating service;
and performing smoke test according to the at least one link test case and the at least one interface test case.
Preferably, the determining at least one relevant link and at least one connected interface of the update service is specifically: all relevant links and all connected interfaces of the update service are determined.
Preferably, the method further comprises:
and responding to the smoke test passing of the at least one link test case and the at least one interface test case, and issuing the updating service.
Preferably, the method further comprises:
and responding to the failure of the smoke test of at least one link test case or at least one interface test case, and sending the information of the failed link test case or interface test case.
Preferably, the link test case and the interface test case have corresponding importance parameters;
the method further comprises the following steps:
and issuing the updating service in response to the importance parameter of the failed link test case or the failed interface test case being smaller than a first threshold value.
Preferably, the method further comprises:
and in response to the importance parameter of the failed link test case or the failed interface test case being greater than or equal to a first threshold value, not issuing the update service.
Preferably, each link includes at least one use case;
the obtaining of at least one link test case of a link related to the service includes:
determining a target link;
acquiring a test case set of a target link, wherein the test case set comprises at least one test case;
and in the test case set, determining the test case with the corresponding importance parameter larger than a second threshold value as the link test case.
Preferably, the importance parameter of the use case is determined according to the use frequency of the use case.
Preferably, the connected interface is an interface between an upstream service directly connected to the update service or an interface between a downstream service directly connected to the update service.
Preferably, the update service is a transaction; the connected interface of the update service comprises:
"upstream service-transaction" and "transaction-downstream service";
wherein the upstream service comprises one or more services; the downstream service includes one or more services.
Preferably, the related links include links of an upstream service and a downstream service having a call relationship with the update service.
Preferably, the update service is a transaction; the relevant links of the update service include:
"upstream service-transaction-downstream service";
wherein the upstream service comprises one or more services; the downstream service includes one or more services.
In a second aspect, an embodiment of the present invention provides a testing apparatus, including:
an update service determination unit configured to determine an update service, where the update service is a changed service;
a link and interface determination unit for determining at least one relevant link and at least one connected interface of the update service;
a link test case obtaining unit, configured to obtain at least one link test case corresponding to the update service-related link;
an interface test case obtaining unit, configured to obtain at least one interface test case of an interface connected to the update service; and
and the test unit is used for performing smoke test according to the at least one link test case and the at least one interface test case.
Preferably, the link and interface determining unit includes:
and the link and interface determining module is used for determining all relevant links and all connected interfaces of the updating service.
Preferably, the apparatus further comprises:
and the first issuing unit is used for responding to the smoke test passing of the at least one link test case and the at least one interface test case and issuing the updating service.
Preferably, the apparatus further comprises:
and the information sending unit is used for responding to the failure of the smoke test of at least one link test case or at least one interface test case and sending the information of the failed link test case or interface test case.
Preferably, the link test case and the interface test case have corresponding importance parameters;
the device further comprises:
and the second issuing unit is used for issuing the updating service in response to the fact that the importance parameter of the failed link test case or the failed interface test case is smaller than a first threshold value.
Preferably, the apparatus further comprises:
and the rollback unit is used for responding to the condition that the importance parameter of the failed link test case or the failed interface test case is greater than or equal to a first threshold value and not issuing the updating service.
Preferably, each link includes at least one use case;
the link test case acquisition unit includes:
a target link determining module for determining a target link;
the system comprises a test case set determining module, a link state determining module and a link state determining module, wherein the test case set determining module is used for acquiring a test case set of a target link, and the test case set comprises at least one test case; and
and the link test case determining module is used for determining the test case of which the corresponding importance parameter is greater than the second threshold value in the test case set as the link test case.
Preferably, the importance parameter of the use case is determined according to the use frequency of the use case.
Preferably, the connected interface is an interface between an upstream service directly connected to the update service or an interface between a downstream service directly connected to the update service.
Preferably, the update service is a transaction; the connected interface of the update service comprises:
"upstream service-transaction" and "transaction-downstream service";
wherein the upstream service comprises one or more services; the downstream service includes one or more services.
Preferably, the related links include links of an upstream service and a downstream service having a call relationship with the update service.
Preferably, the update service is a transaction; the relevant links of the update service include:
"upstream service-transaction-downstream service";
wherein the upstream service comprises one or more services; the downstream service includes one or more services.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium on which computer program instructions are stored, which when executed by a processor implement the method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory is used to store one or more computer program instructions, and the processor executes the one or more computer program instructions to implement the method according to the first aspect.
In the embodiment of the invention, when the system has the updating service, the link related to the updating service is called, and the test case in the link is operated. Therefore, the stability of the relevant link of the update service can be ensured, and the condition that the upstream and downstream can not be called due to the release of the update service is avoided.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
FIG. 1 is a schematic flow chart of a testing method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a service architecture of a takeaway platform of a first embodiment of the present invention;
FIG. 3 is a flow chart of a testing method according to a second embodiment of the present invention;
FIG. 4 is a schematic view of a testing apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic view of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the present invention.
Further, those of ordinary skill in the art will appreciate that the drawings provided herein are for illustrative purposes and are not necessarily drawn to scale.
Unless the context clearly requires otherwise, throughout the description, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, what is meant is "including, but not limited to".
In the description of the present invention, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
With the continuous development of network technology, the quality requirements of operators on software or micro services are gradually increased, and the testing process must continuously improve the fault discovery capability and analysis capability to meet the increasing demands.
Each service in the micro-service architecture has a calling relationship with each other, and each service serves as a service end to provide interface service and also serves as a client request service. The development and deployment of each service is relatively independent. Generally, after a service is released, a Remote Procedure Call (RPC) interface of the service is called to verify whether the service interface is normal. However, this method can only solve whether a single service is available, and does not concern whether the upstream and downstream can be called, which results in a failure after the service is released and insufficient stability of the system.
In view of this, the embodiment of the present invention provides a testing method, which can comprehensively detect whether an interface and a link related to an update service are available, so as to improve the accuracy of the test, and further ensure the stability of a service system after the update service is issued. In the following embodiments, a selling platform is taken as an example for explanation, but it is easily understood by those skilled in the art that the solution of the embodiments of the present invention may also be applied to different selling platforms such as an online supermarket and different payment scenarios such as express delivery.
Fig. 1 is a schematic flow chart of a testing method according to a first embodiment of the present invention, and as shown in fig. 1, the method of the present embodiment includes the following steps:
step S100, determining an update service. The update service is a changed service.
FIG. 2 is a schematic diagram of a service architecture of a takeaway platform. As shown in fig. 2, the service architecture includes "first upstream service", "second upstream service", "third upstream service", "update service", "first downstream service", and "second downstream service", etc.
In an alternative implementation, the "update service" in the service framework may be a "transaction". The "first upstream service", "second upstream service", and "third upstream service" may be "general dining", "non-meal retail", and "group dining", respectively. The "first downstream service" and the "second downstream service" may be "payment" and "account", respectively. Specifically, during a transaction, a user can complete a purchase on the takeaway platform through a series of operations of selecting a commodity, determining to place an order, paying an order and the like. When the service of the "transaction" changes. The "transaction" is determined to be an update service. Wherein, the ordinary catering, the non-catering retail and the group catering are different service modules in the takeout platform respectively, and the ordinary catering can be ordinary takeout business. The group catering can be that the number of the ordered dishes is more than a certain value or more than a certain amount. "non-meal retail" may be self-service shopping or the like.
Step S200, determining at least one relevant link and at least one connected interface of the update service.
In particular, the server determines at least one relevant link and at least one connected interface of the update service. The related link is a service link having an upstream and downstream call relationship with the update service. The connected interface is an upstream service directly connected to the update service or a downstream service directly connected to the update service.
At least one relevant link and at least one connected interface of the update service are determined. The link to be tested may be determined according to the importance of the relevant link. Therefore, the testing efficiency can be improved, and the testing time can be saved. Further, all relevant links and all connected interfaces of the update service may be determined. The accuracy of the test is improved, and the system can stably and smoothly operate after the service is released.
In an optional implementation manner, a service call relation table in the service architecture is published in advance, a service call link from the beginning to the end of each service is stored in the table, and a call relation of an upstream interface and a downstream interface in the service architecture is stored in the table. When the update service in the service architecture is determined, all links involved in the update service are invoked. For example, in the service architecture shown in fig. 2, there are 3 upstream transaction services and 2 downstream transaction services in the service architecture. The "first upstream service", "second upstream service", and "third upstream service" are upstream of the "update service", and a payment interface is requested. The "first downstream service" and the "second downstream service" are downstream of the "update service", which requires an interface to request "payment" and "account".
In an alternative implementation, the "update service" is a "transaction". "general dining", "non-dining retail", "group dining" are upstream of the transaction service, requesting a payment interface. "Payment" and "account" are downstream of the transaction service, which requires an interface to request "payment" and "account".
Links related to "transaction" include six links of "ordinary catering — transaction-payment-third party payment", "non-catering retail-transaction-payment-third party payment", "group catering — transaction-payment-third party payment", "ordinary catering — transaction-account", "non-catering retail-transaction-account" and "group catering — transaction-account". 6 link data are saved in the table. Meanwhile, the interface table stores interface data of 3 transaction services called upstream and interface data of 2 downstream transaction services called by the transaction services.
Step S300, obtaining a test case of at least one link corresponding to the link related to the update service.
Specifically, each link includes at least one use case. The obtaining of at least one link test case of a link related to the service comprises the following steps:
step S301, a target link is determined.
In particular, the link involved in the update service is determined. The target link may be an upstream service-an update service-a downstream service.
In an alternative implementation, "update service" is "transaction", and the corresponding target link is "general dining-transaction-payment".
Step S302, a test case set of the target link is obtained. The test case set comprises at least one test case.
The update service includes at least one sub-service. In an alternative implementation, as shown in fig. 2, the update service includes a plurality of sub-services.
In an alternative implementation manner, the "update service" is "transaction", and the corresponding "transaction" includes payment-related services such as "balance payment", "hybrid payment", and "third party payment". A "balance payment" may be a payment with an account balance. The third party payment may be a common payment platform such as "pay for Bao" or "WeChat Payment", etc. The "mixed payment" may be a mixed payment mode of "balance payment" and "third party payment". Therefore, the test cases corresponding to the link of "ordinary catering, transaction, payment and third party payment" include "ordinary catering, balance payment, payment", "ordinary catering, mixed payment, third party payment" and "ordinary catering, third party payment, payment and third party payment".
In another alternative implementation, services related to the account, such as "inquiry balance" and "refund", are also included in the transaction service. The link of 'ordinary catering, transaction and account' comprises two test cases of 'ordinary catering, refund, account' and 'ordinary catering, balance inquiry and account'.
Step S303, in the test case set, determining the test case with the corresponding importance parameter larger than the second threshold as the link test case.
Specifically, the importance of the use case is determined according to the use frequency of the use case. Wherein the second threshold may be a preset value.
Step S400, at least one interface test case of the interface connected with the updating service is obtained.
Generally speaking, for each interface, at least one use case is preset to test different operations, different calling manners, or different functions of the interface.
When the interface with the updated service vector includes at least one interface, step S400 may include the steps of:
step S401, a target interface is determined.
In particular, the interface involved in the update service is determined. In an alternative implementation, the target interface is "general dining — transaction".
Step S402, a test case set of the target interface is obtained. The test case set comprises at least one test case.
In an alternative implementation, "transactions" may include services such as "refund," "balance payment," "hybrid payment," and "third party payment. Therefore, the interface of ' ordinary catering-transaction ' can comprise at least one interface test case of ' ordinary catering-refund, ' ordinary catering-balance payment ', ' ordinary catering-mixed payment ' and ' ordinary catering-third party payment ', and the like.
Step S403, in the test case set, determining the test case with the corresponding importance parameter greater than the third threshold as the interface test case.
Specifically, the importance of the use case may be determined according to the use frequency of the use case, or may be preset when the use case is set. Wherein the third threshold may be a preset value. The greater the importance parameter is, the more important the test case is.
It should be understood that the execution order of step S300 and step S400 may be interchanged.
Specifically, for example, in the service architecture shown in fig. 2, the "update service" in the service architecture is "transaction", and there are 3 upstream and 2 downstream of the "transaction". The interfaces connected with the "transaction" include 5 interfaces of "general dining", "non-dining retail", "group dining", "payment" and "account". The corresponding transactions may include services such as "refund," "balance payment," "hybrid payment," and "third party payment. Thus, each interface includes at least one test case. Taking the interface of 'ordinary catering-transaction' as an example, the interface test case can comprise at least one interface test case of 'ordinary catering-refund', 'ordinary catering-balance payment', 'ordinary catering-mixed payment' and 'ordinary catering-third party payment'. And finally, determining the test case with the corresponding importance parameter larger than the third threshold value as the interface test case.
And S500, performing a smoke test according to the at least one link test case and the at least one interface test case.
Specifically, all test cases in each link are run and all test cases in each interface are run.
In the embodiment of the invention, when the system has the updating service, the link related to the updating service is called, and the test case in the link is operated. Therefore, the stability of the relevant link of the update service can be ensured, and the condition that the upstream and downstream can not be called due to the release of the update service is avoided.
FIG. 3 is a flowchart illustrating a testing method according to a second embodiment of the present invention. As shown in fig. 3, in a second embodiment of the present invention, a test method includes:
step S301, determining an update service, wherein the update service is a changed service.
Referring to step S100 specifically, details are not repeated here.
Step S302, at least one relevant link and at least one connected interface of the update service are determined.
Referring to step S200 specifically, details are not repeated here.
Step S303, at least one link test case corresponding to the link related to the update service is obtained.
Referring to step S300 specifically, details are not repeated here.
Step S304, at least one interface test case of the interface connected with the updating service is obtained.
Referring to step S400 specifically, details are not repeated here.
Step S305, performing a smoke test according to the at least one link test case and the at least one interface test case.
Referring to step S500 specifically, details are not repeated here.
And step S306, judging whether the smoking test is passed or not.
Specifically, the server determines whether the smoking test passed. If the smoking test is passed, step S307 is executed. If the smoking test is not passed, step S308 and step S309 are executed.
Step S307, the update service is issued.
Specifically, if the smoking test of the test cases of all the links and interfaces passes, the update service is issued.
And step S308, sending the failed use case information.
Specifically, in response to that the smoking test of at least one link test case or at least one interface test case fails, information of the failed link test case or interface test case is sent. And sending the information of the interface calling exception to a preset terminal device or a server and the like. The information of the interface call exception may include an interface location, an importance parameter of the exception interface, and the like.
Step S309, determine whether the importance parameter of the use case is greater than the first threshold.
The first threshold may be predetermined. If the importance parameter of the case failing the test is smaller than the first threshold, step S310 is executed. If the importance parameter of the case that fails the test is greater than the first threshold, step S311 is executed.
Step S310, the update service is released.
Specifically, the update service is issued in response to the importance parameter of the failed link test case or interface test case being smaller than a first threshold.
The link test case and the interface test case have corresponding importance parameters. And when the importance parameter of the failed link test case or the failed interface test case is smaller, issuing the updating service.
Step S311, roll back to the previous version.
Specifically, the update service is not issued in response to the importance parameter of the failed link test case or the failed interface test case being greater than or equal to a first threshold, where the first threshold may be preset. And when the importance parameter of the failed link test case or the failed interface test case is larger, the updating service is not released and the version before the updating service is recovered.
And subsequently repairing the updating service and the abnormal interface or the abnormal link. The test method of the present embodiment was repeated.
If the type and the number of the parameters of the transaction are changed, the problem generally cannot be verified in the single-system smoking test, but the link test case is tested from the upstream, so that the verification of the whole system is more comprehensive, the condition that the single-system smoking test passes the verification and the upstream and downstream calls are abnormal is avoided, the problems existing in the system architecture can be found in time, and the stability of the architecture can be further ensured.
FIG. 4 is a schematic diagram of a testing apparatus according to a third embodiment of the present invention. As shown in fig. 4, the test apparatus includes: an update service determination unit 410, a link and interface determination unit 420, a link test case acquisition unit 430, an interface test case acquisition unit 440, and a test unit 450.
The update service determination unit 410 is configured to determine an update service, where the update service is a changed service.
The link and interface determination unit 420 is configured to determine at least one relevant link and at least one connected interface of the update service.
The link and interface determining unit 420 includes a link and interface determining module 421.
The link and interface determining module 421 is used to determine all relevant links and all connected interfaces of the update service.
The link test case obtaining unit 430 is configured to obtain at least one link test case corresponding to the link related to the update service.
Each link includes at least one use case. The link test case obtaining unit 430 includes: a target link determination module 431, a test case set determination module 432, and a link test case determination module 433.
The target link determination module 431 is used to determine the target link.
The test case set determining module 432 is configured to obtain a test case set of the target link, where the test case set includes at least one test case.
The link test case determining module 433 is configured to determine, in the test case set, a test case with a corresponding importance parameter larger than a second threshold as the link test case.
And determining the importance parameter of the use case according to the use frequency of the use case.
The interface test case obtaining unit 440 is configured to obtain at least one interface test case of an interface connected to the update service.
The test unit 450 is configured to perform a smoke test according to the at least one link test case and the at least one interface test case.
The first issuing unit 460 is configured to issue the update service in response to a smoke test of the at least one link test case and the at least one interface test case passing.
The information sending unit 470 is configured to send information of the failed link test case or the failed interface test case in response to that the smoking test of the at least one link test case or the at least one interface test case fails.
The second issuing unit 480 is configured to issue the update service in response to the importance parameter of the failed link test case or the failed interface test case being smaller than the first threshold.
The link test case and the interface test case have corresponding importance parameters.
The rollback unit 490 is configured to not issue the update service in response to the importance parameter of the failed link test case or the interface test case being greater than or equal to a first threshold.
Fig. 5 is a schematic view of an electronic device according to a fourth embodiment of the present invention. As shown in fig. 5, the electronic device: at least one processor 501; and a memory 502 communicatively coupled to the at least one processor 501; and a communication component 503 in communicative connection with the scanning device, the communication component 503 receiving and transmitting data under the control of the processor 501; wherein the memory 502 stores instructions executable by the at least one processor 501, the instructions being executable by the at least one processor 501 to implement a method of testing, the method comprising:
determining an update service, wherein the update service is a changed service;
determining at least one relevant link and at least one connected interface of the update service;
acquiring at least one link test case corresponding to the link related to the update service;
acquiring at least one interface test case of an interface connected with the updating service;
and performing smoke test according to the at least one link test case and the at least one interface test case.
Preferably, the determining at least one relevant link and at least one connected interface of the update service is specifically: all relevant links and all connected interfaces of the update service are determined.
Preferably, the method further comprises:
and responding to the smoke test passing of the at least one link test case and the at least one interface test case, and issuing the updating service.
Preferably, the method further comprises:
and responding to the failure of the smoke test of at least one link test case or at least one interface test case, and sending the information of the failed link test case or interface test case.
Preferably, the link test case and the interface test case have corresponding importance parameters;
the method further comprises the following steps:
and issuing the updating service in response to the importance parameter of the failed link test case or the failed interface test case being smaller than a first threshold value.
Preferably, the method further comprises:
and in response to the importance parameter of the failed link test case or the failed interface test case being greater than or equal to a first threshold value, not issuing the update service.
Preferably, each link includes at least one use case;
the obtaining of at least one link test case of a link related to the service includes:
determining a target link;
acquiring a test case set of a target link, wherein the test case set comprises at least one test case;
and in the test case set, determining the test case with the corresponding importance parameter larger than a second threshold value as the link test case.
Preferably, the importance parameter of the use case is determined according to the use frequency of the use case.
Preferably, the connected interface is an interface between an upstream service directly connected to the update service or an interface between a downstream service directly connected to the update service.
Preferably, the update service is a transaction; the connected interface of the update service comprises:
"upstream service-transaction" and "transaction-downstream service";
wherein the upstream service comprises one or more services; the downstream service includes one or more services.
Preferably, the related links include links of an upstream service and a downstream service having a call relationship with the update service.
Preferably, the update service is a transaction; the relevant links of the update service include:
"upstream service-transaction-downstream service";
wherein the upstream service comprises one or more services; the downstream service includes one or more services.
Optionally, the electronic device comprises: one or more processors 501 and a memory 502, with one processor 501 being an example in fig. 5. The processor 501 and the memory 502 may be connected by a bus or other means, and fig. 5 illustrates the connection by the bus as an example. Memory 502, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor 501 executes various functional applications of the device and data processing by running nonvolatile software programs, instructions, and modules stored in the memory 502, that is, implements the above-described test method.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store a list of options, etc. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 502 may optionally include memory located remotely from processor 501, which may be connected to an external device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The or at least one module is stored in the memory 502 and when executed by the or at least one processor 501 performs the testing method of any of the method embodiments described above.
The product can execute the method provided by the embodiment of the application, has corresponding functional modules and beneficial effects of the execution method, and can refer to the method provided by the embodiment of the application without detailed technical details in the embodiment.
A fifth embodiment of the invention is directed to a non-volatile storage medium storing a computer-readable program for causing a computer to perform some or all of the above-described method embodiments. Thereby having corresponding beneficial effects.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.
The embodiment of the invention provides A1 and a test method, wherein the method comprises the following steps:
determining an update service, wherein the update service is a changed service;
determining at least one relevant link and at least one connected interface of the update service;
acquiring at least one link test case corresponding to the link related to the update service;
acquiring at least one interface test case of an interface connected with the updating service; and
and performing smoke test according to the at least one link test case and the at least one interface test case.
A2, the method according to A1, wherein the determining at least one relevant link and at least one connected interface of the update service is specifically: all relevant links and all connected interfaces of the update service are determined.
A3, the method according to A1, wherein the method further comprises:
and responding to the smoke test passing of the at least one link test case and the at least one interface test case, and issuing the updating service.
A4, the method according to A1, wherein the method further comprises:
and responding to the failure of the smoke test of at least one link test case or at least one interface test case, and sending the information of the failed link test case or interface test case.
A5, the method according to A4, wherein the link test case and the interface test case have corresponding importance parameters;
the method further comprises the following steps:
and issuing the updating service in response to the importance parameter of the failed link test case or the failed interface test case being smaller than a first threshold value.
A6, the method according to A4, wherein the method further comprises:
and in response to the importance parameter of the failed link test case or the failed interface test case being greater than or equal to a first threshold value, not issuing the update service.
A7, the method according to A1, wherein each link includes at least one use case;
the obtaining of at least one link test case of a link related to the service includes:
determining a target link;
acquiring a test case set of a target link, wherein the test case set comprises at least one test case; and
and in the test case set, determining the test case with the corresponding importance parameter larger than a second threshold value as the link test case.
A8, the method according to any one of A4-A7, wherein the importance parameter of the use case is determined according to the use frequency of the use case.
A9, the method according to A1, wherein the connected interface is an interface between an upstream service directly connected to the update service or an interface between a downstream service directly connected to the update service.
A10, the method according to A9, wherein the update service is a transaction; the connected interface of the update service comprises:
"upstream service-transaction" and "transaction-downstream service";
wherein the upstream service comprises one or more services; the downstream service includes one or more services.
A11, the method according to A1, wherein the related links include links of upstream and downstream services having a call relation with an update service.
A12, the method according to A11, wherein the update service is a transaction; the relevant links of the update service include:
"upstream service-transaction-downstream service";
wherein the upstream service comprises one or more services; the downstream service includes one or more services.
The embodiment of the invention provides B1 and a testing device, wherein the testing device comprises:
an update service determination unit configured to determine an update service, where the update service is a changed service;
a link and interface determination unit for determining at least one relevant link and at least one connected interface of the update service;
a link test case obtaining unit, configured to obtain at least one link test case corresponding to the update service-related link;
an interface test case obtaining unit, configured to obtain at least one interface test case of an interface connected to the update service; and
and the test unit is used for performing smoke test according to the at least one link test case and the at least one interface test case.
B2, the apparatus according to B1, wherein the link and interface determining unit includes:
and the link and interface determining module is used for determining all relevant links and all connected interfaces of the updating service.
B3, the apparatus according to B1, wherein the apparatus further comprises:
and the first issuing unit is used for responding to the smoke test passing of the at least one link test case and the at least one interface test case and issuing the updating service.
B4, the apparatus according to B1, wherein the apparatus further comprises:
and the information sending unit is used for responding to the failure of the smoke test of at least one link test case or at least one interface test case and sending the information of the failed link test case or interface test case.
B5, the device according to B4, wherein the link test case and the interface test case have corresponding importance parameters;
the device further comprises:
and the second issuing unit is used for issuing the updating service in response to the fact that the importance parameter of the failed link test case or the failed interface test case is smaller than a first threshold value.
B6, the apparatus according to B4, wherein the apparatus further comprises:
and the rollback unit is used for responding to the condition that the importance parameter of the failed link test case or the failed interface test case is greater than or equal to a first threshold value and not issuing the updating service.
B7, the apparatus of B1, wherein each link includes at least one use case;
the link test case acquisition unit includes:
a target link determining module for determining a target link;
the system comprises a test case set determining module, a link state determining module and a link state determining module, wherein the test case set determining module is used for acquiring a test case set of a target link, and the test case set comprises at least one test case; and
and the link test case determining module is used for determining the test case of which the corresponding importance parameter is greater than the second threshold value in the test case set as the link test case.
B8, the device according to any one of B4-B7, wherein the importance parameter of the use case is determined according to the use frequency of the use case.
B9, the apparatus according to B1, wherein the connected interface is an interface between an upstream service directly connected to the update service or an interface between a downstream service directly connected to the update service.
B10, the method according to B9, wherein the update service is a transaction; the connected interface of the update service comprises:
"upstream service-transaction" and "transaction-downstream service";
wherein the upstream service comprises one or more services; the downstream service includes one or more services.
B11, the method according to B1, wherein the relevant links include links of upstream and downstream services having a calling relationship with an update service.
B12, the method according to B11, wherein the update service is a transaction; the relevant links of the update service include:
"upstream service-transaction-downstream service";
wherein the upstream service comprises one or more services; the downstream service includes one or more services.
Embodiments of the present invention provide C1, a computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method as defined in any one of a1-a 12.
An embodiment of the invention provides D1, an electronic device comprising a memory and a processor, wherein the memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions, when executed by the processor, implement the method according to any of a1-a 12.

Claims (10)

1. A method of testing, the method comprising:
determining an update service, wherein the update service is a changed service;
determining at least one relevant link and at least one connected interface of the update service;
acquiring at least one link test case corresponding to the link related to the update service;
acquiring at least one interface test case of an interface connected with the updating service; and
and performing smoke test according to the at least one link test case and the at least one interface test case.
2. The method according to claim 1, wherein the determining at least one relevant link and at least one connected interface of the update service is in particular: all relevant links and all connected interfaces of the update service are determined.
3. The method of claim 1, further comprising:
and responding to the smoke test passing of the at least one link test case and the at least one interface test case, and issuing the updating service.
4. The method of claim 1, further comprising:
and responding to the failure of the smoke test of at least one link test case or at least one interface test case, and sending the information of the failed link test case or interface test case.
5. The method of claim 1, wherein each link comprises at least one use case;
the obtaining of at least one link test case of a link related to the service includes:
determining a target link;
acquiring a test case set of a target link, wherein the test case set comprises at least one test case; and
and in the test case set, determining the test case with the corresponding importance parameter larger than a second threshold value as the link test case.
6. The method of claim 1, wherein the connected interface is an interface between an upstream service directly connected to the update service or an interface between a downstream service directly connected to the update service.
7. The method of claim 1, wherein the related links comprise links of an upstream service and a downstream service having a call relationship with an update service.
8. A test apparatus, the apparatus comprising:
an update service determination unit configured to determine an update service, where the update service is a changed service;
a link and interface determination unit for determining at least one relevant link and at least one connected interface of the update service;
a link test case obtaining unit, configured to obtain at least one link test case corresponding to the update service-related link;
an interface test case obtaining unit, configured to obtain at least one interface test case of an interface connected to the update service; and
and the test unit is used for performing smoke test according to the at least one link test case and the at least one interface test case.
9. A computer-readable storage medium on which computer program instructions are stored, which, when executed by a processor, implement the method of any one of claims 1-7.
10. An electronic device comprising a memory and a processor, wherein the memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions, when executed by the processor, implement the method of any of claims 1-7.
CN202010112469.XA 2020-02-24 2020-02-24 Test method, test device, storage medium and electronic equipment Pending CN111338947A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010112469.XA CN111338947A (en) 2020-02-24 2020-02-24 Test method, test device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010112469.XA CN111338947A (en) 2020-02-24 2020-02-24 Test method, test device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111338947A true CN111338947A (en) 2020-06-26

Family

ID=71185523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010112469.XA Pending CN111338947A (en) 2020-02-24 2020-02-24 Test method, test device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111338947A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704112A (en) * 2021-08-30 2021-11-26 浙江网商银行股份有限公司 Data processing method and system
CN115550214A (en) * 2022-08-17 2022-12-30 青岛海尔科技有限公司 Task monitoring method and device, storage medium and electronic device
CN113704112B (en) * 2021-08-30 2024-09-24 浙江网商银行股份有限公司 Data processing method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120266135A1 (en) * 2011-01-03 2012-10-18 Ebay Inc. On-demand software test environment generation
CN106407100A (en) * 2015-07-29 2017-02-15 中兴通讯股份有限公司 Method and apparatus for realizing continuous integration testing
CN109002397A (en) * 2018-07-25 2018-12-14 北京新能源汽车股份有限公司 Controller smoking test system and test method
CN109062809A (en) * 2018-09-20 2018-12-21 北京奇艺世纪科技有限公司 Method for generating test case, device and electronic equipment on a kind of line

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120266135A1 (en) * 2011-01-03 2012-10-18 Ebay Inc. On-demand software test environment generation
CN106407100A (en) * 2015-07-29 2017-02-15 中兴通讯股份有限公司 Method and apparatus for realizing continuous integration testing
CN109002397A (en) * 2018-07-25 2018-12-14 北京新能源汽车股份有限公司 Controller smoking test system and test method
CN109062809A (en) * 2018-09-20 2018-12-21 北京奇艺世纪科技有限公司 Method for generating test case, device and electronic equipment on a kind of line

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704112A (en) * 2021-08-30 2021-11-26 浙江网商银行股份有限公司 Data processing method and system
CN113704112B (en) * 2021-08-30 2024-09-24 浙江网商银行股份有限公司 Data processing method and system
CN115550214A (en) * 2022-08-17 2022-12-30 青岛海尔科技有限公司 Task monitoring method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN108346028B (en) Business approval processing method, device and system
CN104834602B (en) A kind of program dissemination method, device and program delivery system
CN108243404B (en) Method, device and equipment for verifying binding state of mobile phone number
CN110244965A (en) Gray scale method for release management, device, equipment and computer readable storage medium
CN110264171B (en) Distributed bill processing method, device, equipment and computer readable storage medium
CN113726890B (en) Federal prediction method and system for block chain data service
US20230409453A1 (en) Computer and conduit for system testing
CN107886428B (en) Method for determining payment clearing exchange rate and payment clearing system
CN111338947A (en) Test method, test device, storage medium and electronic equipment
CN117114787B (en) Supply chain management method, system and terminal based on electronic invoice
CN112905492B (en) Verification method and device
CN111444105B (en) Method, system and device for simulating payment
CN106910055A (en) A kind of payment data treating method and apparatus based on mobile terminal
CN112990871A (en) Document processing method and related equipment
CN112882957A (en) Test task validity checking method and device
CN111192034B (en) Method and device for processing service request data
CN110740178A (en) application service processing system and application service processing method
CN115390861A (en) Resource deployment method, device and equipment and storage medium
CN113485930B (en) Business process verification method, device, computer system and readable storage medium
CN114170027A (en) Processing method and device for public accumulation fund payment account, electronic equipment and storage medium
CN113885842A (en) Application program generation method and device
CN112636954A (en) Server upgrading method and device
CN112990811A (en) Block chain-based warehouse receipt processing method and warehouse receipt processing system
CN115082191A (en) Risk assessment method, device and equipment and storage medium
CN115952099A (en) Mock testing method, device and equipment based on intelligent routing strategy

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200626

RJ01 Rejection of invention patent application after publication