CN112597047A - Test method, test device, electronic equipment and computer readable medium - Google Patents

Test method, test device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN112597047A
CN112597047A CN202011603021.4A CN202011603021A CN112597047A CN 112597047 A CN112597047 A CN 112597047A CN 202011603021 A CN202011603021 A CN 202011603021A CN 112597047 A CN112597047 A CN 112597047A
Authority
CN
China
Prior art keywords
target
request
test
test case
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
CN202011603021.4A
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.)
Shanghai Ruijia Information Technology Co ltd
Original Assignee
Shanghai Ruijia Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Ruijia Information Technology Co ltd filed Critical Shanghai Ruijia Information Technology Co ltd
Priority to CN202011603021.4A priority Critical patent/CN112597047A/en
Publication of CN112597047A publication Critical patent/CN112597047A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

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 disclosure discloses a test method, a test device, electronic equipment and a computer readable medium. One embodiment of the method comprises: responding to the type of the currently executed test case which is the test case corresponding to the target service scene, and acquiring an access address of a service corresponding to the test case in the target service scene; respectively acquiring fixed parameters and configurable parameters of a test case; assembling the access address, the fixed parameters and the configurable parameters to generate a target request; acquiring an expected result corresponding to the target request based on the type, the access address, the fixed parameters and the configurable parameters of the test case; sending the target request to a server corresponding to the service to obtain a request result corresponding to the target request; and generating test result information according to the matching condition of the request result and the expected result. The embodiment realizes the automatic test of various service scenes.

Description

Test method, test device, electronic equipment and computer readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a test method, an apparatus, an electronic device, and a computer-readable medium.
Background
In various service scenarios, it is necessary to test policies composed of different periods, input conditions, and the like. Generally, a tester is required to traverse all policy classes to verify different combinations. However, this test method requires the tester to traverse all the strategy categories, and is labor-consuming and time-consuming.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Some embodiments of the present disclosure propose a testing method, apparatus, electronic device and computer readable medium to solve one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a method of testing, the method comprising: responding to the type of the currently executed test case which is the test case corresponding to the target service scene, and acquiring an access address of a service corresponding to the test case in the target service scene; respectively obtaining fixed parameters and configurable parameters of the test case, wherein the fixed parameters and the configurable parameters are determined based on a target service scene, the values of the configurable parameters are target variables to be verified which change in the target service scene, and the fixed parameters are environment variables which are correspondingly set based on the target variables to be verified in the target service scene; assembling the access address, the fixed parameters and the configurable parameters to generate a target request; acquiring an expected result corresponding to the target request based on the type, the access address, the fixed parameters and the configurable parameters of the test case; sending the target request to a server corresponding to the service to obtain a request result corresponding to the target request; and generating test result information according to the matching condition of the request result and the expected result.
In a second aspect, some embodiments of the present disclosure provide a test apparatus, the apparatus comprising: the address acquisition unit is configured to respond to the type of the currently executed test case being the test case corresponding to the target service scene, and acquire the access address of the service corresponding to the test case in the target service scene; the device comprises a parameter acquisition unit, a parameter analysis unit and a parameter analysis unit, wherein the parameter acquisition unit is configured to respectively acquire fixed parameters and configurable parameters of a test case, the fixed parameters and the configurable parameters are determined based on a target service scene, the values of the configurable parameters are target variables to be verified, which change in the target service scene, and the fixed parameters are environment variables which are correspondingly set based on the target variables to be verified in the target service scene; a splicing unit configured to splice the access address, the fixed parameters, and the configurable parameters to generate a target request; the expected result obtaining unit is configured to obtain an expected result corresponding to the target request based on the type of the test case, the access address, the fixed parameters and the configurable parameters; the sending unit is configured to send the target request to a server corresponding to the service so as to obtain a request result corresponding to the target request; and the generating unit is configured to generate the test result information according to the matching condition of the request result and the expected result.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method described in any of the implementations of the first aspect.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium on which a computer program is stored, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect.
The above embodiments of the present disclosure have the following advantages: and automatic testing of various service scenes is realized. In the process, the parameters are divided into fixed parameters and configurable parameters, so that various different service scenes can be simulated, the pertinence test on the variables is realized, the corresponding setting is not required to be carried out in each service scene, and the test cost is saved. For example, for the house source application, the user performs evaluation after looking at the house or making a reservation to look at the house, including evaluation of house source and evaluation of personnel. Aiming at different service scenes, the method can be realized by configuring related parameters without independently writing test cases.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
FIG. 1 is a schematic diagram of one application scenario of a testing method according to some embodiments of the present disclosure;
FIG. 2 is a flow diagram of some embodiments of a testing method according to the present disclosure;
FIG. 3 is a flow diagram of further embodiments of a testing method according to the present disclosure;
FIG. 4 is a schematic structural diagram of some embodiments of a testing device according to the present disclosure;
FIG. 5 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 is a schematic diagram of one application scenario of a testing method according to some embodiments of the present disclosure.
As shown in fig. 1, in response to the type of the currently executed test case 102 being a test case corresponding to the target business scenario, the computing device 101 may obtain an access address 103(URL) of a service corresponding to the test case in the target business scenario.
Then, the computing device 101 obtains fixed parameters 104 and configurable parameters 105 of the test case, respectively, where the fixed parameters and the configurable parameters are determined based on the target service scenario, the values of the configurable parameters are target variables to be verified that change in the target service scenario, and the fixed parameters are environment variables that are correspondingly set based on the target variables to be verified in the target service scenario.
On this basis, the computing device 101 may assemble the access address 103, the fixed parameters 104, and the configurable parameters 105 to generate the target request 106. Then, based on the type, access address, fixed parameters and configurable parameters of the test case, an expected result 107 corresponding to the target request is obtained. The target request 106 is sent to the service end 108 corresponding to the service to obtain a request result 109 corresponding to the target request. Test result information 110 is generated based on the matching of the requested results 109 and the expected results 107.
It is understood that the computing device 101 may be hardware or various software. When hardware, it may be various electronic devices with information processing capabilities, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When it is software, it can be installed in the electronic devices listed above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
With continued reference to fig. 2, a flow 200 of some embodiments of a testing method according to the present disclosure is shown. The test method comprises the following steps:
step 201, in response to that the type of the currently executed test case is the test case corresponding to the target service scenario, an access address of a service corresponding to the test case in the target service scenario is obtained.
In some embodiments, the execution subject of the test method may first determine whether the type of the currently executed test case is a test case corresponding to the target service scenario. The determination of the target service scene can be obtained by specification or screening under certain conditions. For example, the target business scenario may be a house source review scenario, a real house source verification scenario, and so on. Therefore, the test aiming at the target service scene can be realized. In practice, whether the type of the test case is the test case corresponding to the target service scenario can be determined through the identification information contained in the test case.
On this basis, in response to that the type of the currently executed test case is the test case corresponding to the target service scenario, the access address of the service corresponding to the test user case in the target service scenario can be acquired from the database. As an example, in a business scenario where testing is performed on a truthful house source, the price of the house source needs to be tested (false house sources generally deviate significantly from the market price). At this point, the service for testing prices may be invoked to complete the price test.
Step 202, fixed parameters and configurable parameters of the test case are respectively obtained.
In some embodiments, the fixed parameter and the configurable parameter are determined based on a target service scenario, the value of the configurable parameter is a target variable to be checked that changes in the target service scenario, and the fixed parameter is an environment variable that is set correspondingly based on the target variable to be checked in the target service scenario.
As an example, in a business scenario where the real house source is tested, the fixed parameters and the configurable parameters are different according to different test contents. For example, the truthful house source test includes a price test, a description test, a real image test, and the like, which are respectively used for testing whether the price, the description, and the image are real. At this time, for the price test, the configurable parameter is the price, and the other parameters are fixed parameters. For descriptive tests, the configurable parameters are descriptions and the other parameters are fixed parameters. Therefore, by configuring the fixed parameters and the configurable parameters, the target variable can be tested in a targeted manner, and inaccurate test caused by the fact that a single variable cannot be controlled is prevented.
Optionally, the configurable parameters include at least one of: service type information, user behavior data, terminal information and user attribute information. In practice, the configurable parameters can be configured correspondingly according to actual needs.
Step 203, the access address, the fixed parameters and the configurable parameters are assembled to generate a target request.
In some embodiments, the execution agent may assemble the access address, the fixed parameter, and the configurable parameter according to a certain protocol to obtain the target request.
And 204, acquiring an expected result corresponding to the target request based on the type, the access address, the fixed parameters and the configurable parameters of the test case.
In some embodiments, the execution agent may query the database for the corresponding expected result based on the type of the test case, the access address, the fixed parameters, and the configurable parameters.
Step 205, sending the target request to a server corresponding to the service to obtain a request result corresponding to the target request.
And step 206, generating test result information according to the matching condition of the request result and the expected result.
In some embodiments, test result information for characterizing a passing test may be generated, for example, if the requested result and the expected result match. Conversely, if the requested result and the expected result do not match, test result information characterizing the failed test may be generated.
In some embodiments, automated testing for various business scenarios is implemented. In the process, the parameters are divided into fixed parameters and configurable parameters, so that various different service scenes can be simulated, the pertinence test on the variables is realized, the corresponding setting is not required to be carried out in each service scene, and the test cost is saved. For example, for the house source application, the user performs evaluation after looking at the house or making a reservation to look at the house, including evaluation of house source and evaluation of personnel. Aiming at different service scenes, the method can be realized by configuring related parameters without independently writing test cases.
With further reference to fig. 3, a flow 300 of further embodiments of the testing method is shown. The process 300 of the test method includes the following steps:
step 301, in response to that the type of the currently executed test case is the test case corresponding to the target service scenario, obtaining an access address of a service corresponding to the test case in the target service scenario.
Step 302, fixed parameters and configurable parameters of the test case are respectively obtained, wherein the fixed parameters and the configurable parameters are determined based on a target service scene, the values of the configurable parameters are target variables to be verified which change in the target service scene, and the fixed parameters are environment variables which are correspondingly set based on the target variables to be verified in the target service scene.
Step 303, the access address, the fixed parameters and the configurable parameters are assembled to generate a target request.
And 304, acquiring an expected result corresponding to the target request based on the type, the access address, the fixed parameters and the configurable parameters of the test case.
In some embodiments, the specific implementation of steps 301 and 304 and the technical effects thereof may refer to those embodiments corresponding to fig. 2, which are not described herein again.
And 305, acquiring test auxiliary conditions corresponding to the test cases.
And step 306, configuring the running environment of the test case so that the running environment of the test case meets the test auxiliary conditions.
In some embodiments, by setting the test auxiliary condition, the test can be made to simulate the real running environment of the application as truly as possible. For example, the test assistance condition may be: the test time was 0 to 6 points per day. Then, the server time may be adjusted, for example, to meet the test time at a fixed time interval.
Step 307, obtaining the target execution times corresponding to the target request.
And 308, in response to determining that the current executed times of the test case are smaller than the target executed times, sending the target request to a server corresponding to the service to obtain a request result corresponding to the target request.
In practice, a scene in which a user performs a certain operation for multiple times needs to be tested, so that unknown errors possibly existing when the user performs the certain operation for multiple times are avoided, and normal operation of an application is not affected. For example, in a scene that a user watches house comments, whether an application normally runs when the user issues more than 10 comments can be tested.
In some embodiments, the scenes are simulated by setting the execution times corresponding to the target requests, and developers are not required to manually service a large number of comments, so that the test cost is saved.
Optionally, in response to determining that the current number of times of execution is greater than or equal to the target number of times of execution, the test is ended and information indicating that the current number of times of execution is greater than or equal to the target number of times of execution is generated.
Step 309, generating test result information according to the matching condition of the request result and the expected result.
As can be seen from fig. 3, compared with the description of some embodiments corresponding to fig. 2, the steps of acquiring the test auxiliary conditions and the target execution times are added, so that the running environment of the application can be simulated more truly. In addition, by repeatedly executing the test case, a scene that a user executes a certain operation for many times can be tested, and the test cost is saved.
With further reference to fig. 4, as an implementation of the methods illustrated in the above figures, the present disclosure provides some embodiments of a testing apparatus, which correspond to those of the method embodiments illustrated in fig. 2, and which may be particularly applicable in various electronic devices.
As shown in FIG. 4, a test apparatus 400 of some embodiments includes: an address acquisition unit 401, a parameter acquisition unit 402, a splicing unit 403, a desired result acquisition unit 404, a transmission unit 405, and a generation unit 406. The address obtaining unit 401 is configured to, in response to that the type of the currently executed test case is a test case corresponding to the target service scenario, obtain an access address of a service corresponding to the test case in the target service scenario. The parameter obtaining unit 402 is configured to obtain fixed parameters and configurable parameters of the test case, respectively, where the fixed parameters and the configurable parameters are determined based on a target service scenario, a value of the configurable parameter is a target variable to be verified that changes in the target service scenario, and the fixed parameters are environment variables that are set correspondingly based on the target variable to be verified in the target service scenario. The stitching unit 403 is configured to stitch the access address, the fixed parameters and the configurable parameters to generate a target request. The expected result obtaining unit 404 is configured to obtain an expected result corresponding to the target request based on the type of the test case, the access address, the fixed parameter, and the configurable parameter. The sending unit 405 is configured to send the target request to a server corresponding to the service to obtain a request result corresponding to the target request. The generating unit 406 is configured to generate test result information according to a matching of the requested result and the expected result.
In an optional implementation manner of some embodiments, the apparatus 400 further includes obtaining a target execution number corresponding to the target request; and the sending unit 405 is further configured to: and responding to the fact that the current executed times of the test case are smaller than the target executed times, and sending the target request to a server corresponding to the service to obtain a corresponding request result.
In an optional implementation of some embodiments, the apparatus 400 is further configured to: acquiring test auxiliary conditions corresponding to the test cases; and configuring the running environment of the test case so that the running environment of the test case meets the test auxiliary conditions.
In an optional implementation of some embodiments, the sending unit 405 is further configured to: in response to determining that the current number of executions is greater than or equal to the target number of executions, the test is ended and information characterizing that the current number of executions is greater than or equal to the target number of executions is generated.
In an optional implementation of some embodiments, the configurable parameters include at least one of: service type information, user behavior data, terminal information and user attribute information.
It will be understood that the elements described in the apparatus 400 correspond to various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 400 and the units included therein, and will not be described herein again.
Referring now to fig. 5, a schematic diagram of an electronic device (e.g., the electronic device of fig. 1) 500 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device in some embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 5 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program, when executed by the processing device 501, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: responding to the type of the currently executed test case which is the test case corresponding to the target service scene, and acquiring an access address of a service corresponding to the test case in the target service scene; respectively acquiring fixed parameters and configurable parameters of a test case; assembling the access address, the fixed parameters and the configurable parameters to generate a target request; acquiring an expected result corresponding to the target request based on the type, the access address, the fixed parameters and the configurable parameters of the test case; sending the target request to a server corresponding to the service to obtain a request result corresponding to the target request; and generating test result information according to the matching condition of the request result and the expected result.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes an address acquisition unit, a parameter acquisition unit, a splicing unit, an expected result acquisition unit, a transmission unit, and a generation unit. The names of these units do not form a limitation on the unit itself in some cases, for example, the address obtaining unit may also be described as a unit for obtaining an access address of a service corresponding to the test case in the target business scenario.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (10)

1. A method of testing, comprising:
responding to the type of the currently executed test case being the test case corresponding to the target service scene, and acquiring the access address of the service corresponding to the test case in the target service scene;
respectively obtaining fixed parameters and configurable parameters of the test case, wherein the fixed parameters and the configurable parameters are determined based on the target service scene, the values of the configurable parameters are target variables to be verified which change under the target service scene, and the fixed parameters are environment variables which are correspondingly set based on the target variables to be verified under the target service scene;
assembling the access address, the fixed parameters and the configurable parameters to generate a target request;
obtaining an expected result corresponding to the target request based on the type of the test case, the access address, the fixed parameters and the configurable parameters;
sending the target request to a server corresponding to the service to obtain a request result corresponding to the target request;
and generating test result information according to the matching condition of the request result and the expected result.
2. The method of claim 1, wherein the sending the target request to a server corresponding to the service to obtain a request result corresponding to the target request comprises:
acquiring target execution times corresponding to the target request; and
the sending the target request to a server corresponding to the service to obtain a request result corresponding to the target request includes:
and responding to the fact that the current executed times of the test case are smaller than the target executed times, and sending the target request to a server corresponding to the service to obtain a corresponding request result.
3. The method according to claim 1, wherein before the sending the target request to the server corresponding to the service to obtain the request result corresponding to the target request, the method includes:
acquiring test auxiliary conditions corresponding to the test cases;
and configuring the running environment of the test case so that the running environment of the test case meets the test auxiliary condition.
4. The method of claim 2, wherein the sending the target request to a server corresponding to the service to obtain a request result corresponding to the target request comprises:
and in response to determining that the current number of executions is greater than or equal to the target number of executions, ending the test and generating information representing that the current number of executions is greater than or equal to the target number of executions.
5. The method of claim 1, wherein the configurable parameters comprise at least one of: service type information, user behavior data, terminal information and user attribute information.
6. A method of testing, comprising:
the address acquisition unit is configured to respond to the type of a currently executed test case being a test case corresponding to a target service scene, and acquire an access address of a service corresponding to the test case in the target service scene;
a parameter obtaining unit, configured to obtain a fixed parameter and a configurable parameter of the test case, respectively, where the fixed parameter and the configurable parameter are determined based on the target service scenario, a value of the configurable parameter is a target variable to be verified that changes in the target service scenario, and the fixed parameter is an environment variable that is set correspondingly based on the target variable to be verified in the target service scenario;
a splicing unit configured to splice the access address, the fixed parameters, and the configurable parameters to generate a target request;
an expected result obtaining unit, configured to obtain an expected result corresponding to the target request based on the type of the test case, the access address, the fixed parameter, and the configurable parameter;
the sending unit is configured to send the target request to a server corresponding to the service so as to obtain a request result corresponding to the target request;
and the generating unit is configured to generate test result information according to the matching condition of the request result and the expected result.
7. The apparatus of claim 6, wherein the apparatus further comprises:
an execution number obtaining unit configured to obtain a target execution number corresponding to the target request; and the sending unit is further configured to:
and responding to the fact that the current executed times of the test case are smaller than the target executed times, and sending the target request to a server corresponding to the service to obtain a corresponding request result.
8. The apparatus of claim 6, wherein the apparatus is further configured to:
acquiring test auxiliary conditions corresponding to the test cases;
and configuring the running environment of the test case so that the running environment of the test case meets the test auxiliary condition.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
10. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-5.
CN202011603021.4A 2020-12-29 2020-12-29 Test method, test device, electronic equipment and computer readable medium Pending CN112597047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011603021.4A CN112597047A (en) 2020-12-29 2020-12-29 Test method, test device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011603021.4A CN112597047A (en) 2020-12-29 2020-12-29 Test method, test device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN112597047A true CN112597047A (en) 2021-04-02

Family

ID=75203953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011603021.4A Pending CN112597047A (en) 2020-12-29 2020-12-29 Test method, test device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN112597047A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051456A (en) * 2021-05-11 2021-06-29 北京字节跳动网络技术有限公司 Request processing method and device, electronic equipment and computer readable medium
CN113392361A (en) * 2021-05-24 2021-09-14 北京京东振世信息技术有限公司 Service processing method and device, electronic equipment and computer readable medium
CN114116432A (en) * 2022-01-29 2022-03-01 中国民航信息网络股份有限公司 Migration verification method, migration verification platform, electronic device and storage medium
CN114153729A (en) * 2021-11-30 2022-03-08 北京达佳互联信息技术有限公司 Webpage testing method and device, electronic equipment and storage medium
CN114428748A (en) * 2022-03-30 2022-05-03 北京数腾软件科技有限公司 Simulation test method and system for real service scene
WO2023273561A1 (en) * 2021-06-30 2023-01-05 中国民航信息网络股份有限公司 Test method and apparatus, electronic device, and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051456A (en) * 2021-05-11 2021-06-29 北京字节跳动网络技术有限公司 Request processing method and device, electronic equipment and computer readable medium
CN113392361A (en) * 2021-05-24 2021-09-14 北京京东振世信息技术有限公司 Service processing method and device, electronic equipment and computer readable medium
CN113392361B (en) * 2021-05-24 2024-05-17 北京京东振世信息技术有限公司 Service processing method, device, electronic equipment and computer readable medium
WO2023273561A1 (en) * 2021-06-30 2023-01-05 中国民航信息网络股份有限公司 Test method and apparatus, electronic device, and storage medium
CN114153729A (en) * 2021-11-30 2022-03-08 北京达佳互联信息技术有限公司 Webpage testing method and device, electronic equipment and storage medium
CN114116432A (en) * 2022-01-29 2022-03-01 中国民航信息网络股份有限公司 Migration verification method, migration verification platform, electronic device and storage medium
CN114428748A (en) * 2022-03-30 2022-05-03 北京数腾软件科技有限公司 Simulation test method and system for real service scene

Similar Documents

Publication Publication Date Title
CN112597047A (en) Test method, test device, electronic equipment and computer readable medium
CN111581291A (en) Data processing method and device, electronic equipment and readable medium
CN110753089B (en) Method, device, medium and electronic equipment for managing client
CN111209202A (en) Terminal application testing method and device
CN112684968A (en) Page display method and device, electronic equipment and computer readable medium
CN111679990B (en) Test data generation method and device, readable medium and electronic equipment
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN112954056B (en) Method and device for processing monitoring data, electronic equipment and storage medium
CN116225886A (en) Test case generation method, device, equipment, storage medium and program product
CN112800363A (en) Page display method and device, electronic equipment and computer readable medium
CN110489326B (en) IDS-based HTTPAPI debugging method device, medium and equipment
CN112379967B (en) Simulator detection method, device, equipment and medium
CN114116480A (en) Method, device, medium and equipment for determining application program test coverage rate
CN115203178A (en) Data quality inspection method and device, electronic equipment and storage medium
CN114428925A (en) Page rendering method and device, electronic equipment and computer readable medium
CN113849416A (en) Test method, test device, storage medium and electronic equipment
CN109889402B (en) Method and apparatus for generating information
CN112084114A (en) Method and apparatus for testing an interface
CN111857879B (en) Data processing method, device, electronic equipment and computer readable medium
CN115860573B (en) Highway engineering detection method based on detection item, electronic equipment and readable medium
CN111371745B (en) Method and apparatus for determining SSRF vulnerability
CN114064501A (en) Test method, device, equipment and medium
CN115329164A (en) Data display template generation method, device, equipment and computer readable medium
CN117667710A (en) Determination method, test method, device, medium and equipment for page test case
CN115629983A (en) Test case set generation method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination