CN114253864A - Service testing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN114253864A
CN114253864A CN202210015664.XA CN202210015664A CN114253864A CN 114253864 A CN114253864 A CN 114253864A CN 202210015664 A CN202210015664 A CN 202210015664A CN 114253864 A CN114253864 A CN 114253864A
Authority
CN
China
Prior art keywords
service
target
tested
test program
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210015664.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.)
Guahao Net Hangzhou Technology Co Ltd
Original Assignee
Guahao Net Hangzhou 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 Guahao Net Hangzhou Technology Co Ltd filed Critical Guahao Net Hangzhou Technology Co Ltd
Priority to CN202210015664.XA priority Critical patent/CN114253864A/en
Publication of CN114253864A publication Critical patent/CN114253864A/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
    • 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

Abstract

The invention discloses a service testing method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: when receiving a service to be tested, calling a target test program corresponding to the service to be tested; and in a virtual machine deployed in target terminal equipment, testing the service to be tested based on the target test program to obtain a target test result. The problem that in the prior art, a third-party system is required to be relied on for testing, or a large number of codes are required to be modified, and the later-stage service code maintenance cost is high is solved, the testing program can be used for testing the testing service in real time, the testing service is dynamically tested, the third-party system is not required to be relied on for testing, the actual code logic is not required to be modified, and the testing service is dynamically tested.

Description

Service testing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a service testing method and device, electronic equipment and a storage medium.
Background
In the process of project development, the service code needs to be tested to ensure that the service code can be normally used in the application process.
Currently, the test of the service code is to set test parameters in the service test, and when the test parameters are started, the third-party system interface call is simulated to return, and then the third-party system performs the test. However, such a test method needs to rely on a third-party system, and in a business scenario with more services, a lot of existing codes need to be modified, and the problem of serious code coupling is solved.
In order to solve the above problems, an improvement may be made to a method of service code testing.
Disclosure of Invention
The invention provides a service testing method, a service testing device, electronic equipment and a storage medium, which are used for dynamically testing different testing services without modifying the original service code logic.
In a first aspect, an embodiment of the present invention provides a service testing method, including:
when receiving a service to be tested, calling a target test program corresponding to the service to be tested;
and in a virtual machine deployed in target terminal equipment, testing the service to be tested based on the target test program to obtain a target test result.
In a second aspect, an embodiment of the present invention further provides a service testing apparatus, including:
the test program calling module is used for calling a target test program corresponding to the service to be tested when the service to be tested is received;
and the test result determining module is used for testing the service to be tested based on the target test program in the virtual machine deployed in the target terminal equipment to obtain a target test result.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the service testing method according to any of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the service testing method according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment, when the service to be tested is received, a target test program corresponding to the service to be tested is called, different test programs can be set according to different test scenes, the preset test programs are stored in the target service terminal equipment, meanwhile, when the test programs are stored, a service identifier corresponding to each service to be tested can be established and used as the service identifier of the test program corresponding to the service to be tested, so that the target test program corresponding to the service to be tested can be obtained based on the service identifier, and the service to be tested is tested based on the target test program in the virtual machine. In a virtual machine deployed in a target terminal device, the service to be tested is tested based on the target test program to obtain a target test result, the target test program is converted based on an agent mechanism to obtain a binary stream corresponding to the target test program, namely, a dynamic bytecode which can be identified by the virtual machine, when the service to be tested needs to be tested, the corresponding target test program is called, the service to be tested is dynamically tested, the corresponding target test result is obtained, and then whether the service to be tested passes the test is determined according to the target test result. The problem that in the prior art, a third-party system is required to be relied on for testing, or a large number of codes are required to be modified, and the later-stage service code maintenance cost is high is solved, the testing program can be used for testing the testing service in real time, the testing service is dynamically tested, the third-party system is not required to be relied on for testing, the actual code logic is not required to be modified, and the testing service is dynamically tested.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flow chart of a service testing method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a service testing method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a service testing apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before the technical solution is elaborated, an application scenario of the technical solution is introduced first to make the technical solution more clearly understood. Currently, a third-party system is usually required to be relied on for testing a service code, for example, taking the tested service code as the service code corresponding to a login page as an example, when the service code is tested, an interface of a third-party platform to be logged in needs to be accessed, and whether a user can log in the page is determined by the third party. However, such a test method depends on a third-party system, and when each service code is tested, the corresponding test code needs to be written into the service code, and the logic of the service code cannot be verified, which may cause the problems of serious code coupling and high later maintenance cost.
Example one
Fig. 1 is a schematic flow chart of a service testing method according to an embodiment of the present invention, which is applicable to a situation where different test services are dynamically tested in a virtual machine, and the method may be executed by a service testing apparatus, where the apparatus may be implemented in the form of software and/or hardware, and the hardware may be an electronic device, such as a mobile terminal or a PC terminal.
As shown in fig. 1, the method includes:
s110, when the business to be tested is received, a target test program corresponding to the business to be tested is called.
In the step of performing the service test, service codes corresponding to a plurality of services may need to be tested, and the service which is about to enter the test stage is used as the service to be tested. It can be understood that different test programs need to be adopted when different services are tested, and the target test program can be understood as a test program for performing a service code test on the service to be tested.
Specifically, before testing the test service, different test programs need to be set according to different test services, that is, multiple services are involved in the development process of the service, such as login service, consultation service, ordering service, payment service, and the like, and the code logics of different services are different, so that the test programs corresponding to different test services are also different. In order to meet the requirement of testing different services, corresponding test programs need to be set for different services before testing the test services, where the test programs may be pre-set mock logic code programs. And then storing the preset test program in a storage area of the server, for example, storing the test program in a local disk of the server, so that when testing the service to be tested, the test program corresponding to the service to be tested is called from the storage area of the server, and the test program corresponding to the service to be tested is taken as a target test program.
Optionally, when receiving a service to be tested, invoking a target test program corresponding to the service to be tested, including: when receiving a service to be tested, calling a target test program consistent with a service identifier of the service to be tested from a server.
The service identifier may be understood as identifying information set for each test program when the test program is stored in the storage area of the server, for example, name information, number information, service attribute and version information corresponding to the test service may be set, so that when the service to be tested is tested, the target test program corresponding to the service to be tested is called from the storage area of the server.
Specifically, in order to distinguish different test services, a corresponding service identifier may be set for each test service, and the service identifier may be used as a service identifier corresponding to a test program corresponding to the test service. And establishing a corresponding relation between the test service and the test program according to the service identifier so as to obtain a target test program corresponding to the service to be tested based on the service identifier. And storing a preset test program in a storage area of the server, and calling a target test program which is stored in the server and is consistent with the service identifier of the service to be tested according to the service identifier corresponding to the service to be tested when a user needs to test the service to be tested.
And S120, in a virtual machine deployed in the target terminal equipment, testing the service to be tested based on the target test program to obtain a target test result.
After different test programs are set for different test services and stored in the storage area of the server, when the terminal device is detected to be started, the terminal device can automatically acquire the test programs in the storage area of the server, and the target terminal device can be understood as the terminal device for testing the service to be tested. The target test result may be understood as a test result corresponding to the service to be tested, which is obtained after the service to be tested is tested, and may be, for example, a test pass or a test fail, or may also display a problem existing in the service to be tested when the test fails.
Generally, when testing a test service, the test may be directly performed in actual terminal equipment, but it is considered that not all test services are trustworthy, for example, under the condition that a user does not know, a certain test service may be mixed with viruses or plug-ins, or some software is installed and unloaded, and then always remains in the terminal equipment, or when the test service is tested based on the actual terminal equipment, there are problems that the content of the terminal equipment is occupied, the operation of the terminal equipment is affected, and the like. However, the test in the virtual machine does not have the above problem, so that the test of the test service in the actual terminal equipment can be converted into the test of the test service through the virtual machine. When a user tests a service process to be tested, the service to be tested is converted into a virtual machine deployed in target terminal equipment, then the service to be tested in the virtual machine is tested based on a preset target test program, and a target test result corresponding to the service to be tested is obtained.
It should be noted that, when testing a service to be tested in a virtual machine, the target test program used is a converted target test program, that is, the virtual machine cannot directly use a preset target test program, and the preset target test program needs to be converted into a program that the virtual machine can run, for example, the preset target test program may be subjected to binary conversion to obtain a binary stream, to form a dynamic bytecode that can be recognized by the virtual machine, and then the service to be tested is tested based on the converted target test program.
Optionally, when the service to be tested is tested, the target test program may be stored in a target storage location in the target terminal device, and when the updated target test program is determined in the target storage location based on the proxy mechanism, the service test is performed based on the target test program.
The target storage location may be a storage area in the target terminal device, such as a local disk of the target terminal device, or may be a storage area created by the user for storing the test program. In order to test a service to be tested in a virtual machine, a connection needs to be established between an actual terminal device and the virtual machine, and an agent mechanism may be understood as a mechanism that connects the actual terminal device and the virtual machine, for example, the agent mechanism may be used to monitor a test program stored in the terminal device, and when it is monitored that the test program is updated, the updated test program is transmitted to the virtual machine, and the virtual machine further processes the test program.
Specifically, when each test service is stored in the target storage location of the terminal device, a corresponding service identifier is set for each test service, and the service identifier is used as a service identifier of a test program corresponding to the test service. It can be understood that, based on the agent mechanism in the virtual machine, the test program stored in the target storage location may be monitored, and meanwhile, information related to the test program, such as a service identifier, a setup time, an update time, and the like of the test program, may also be recorded. After the virtual machine receives the target test program, the target test program can be converted into a binary stream, namely the dynamic bytecode which can be identified by the virtual machine, and then the service to be tested is tested based on the dynamic bytecode corresponding to the converted target test program to obtain a corresponding target test result.
It should be noted that, a corresponding service identifier is set in storing each test service, and the service identifier is used as a service identifier of a target test program corresponding to a service to be tested, when the content in the target test program is updated, the updated target test program directly covers the original target test program, and the corresponding service identifier is not changed, but the proxy mechanism may determine whether the target test program is updated according to the storage time of the target test program. When the agent mechanism detects that any relevant information of the target test program changes, it can be considered that the service to be tested corresponding to the test program needs to be tested.
Optionally, the testing the service to be tested based on the target test program in the virtual machine deployed in the target terminal device to obtain a target test result, including: invoking a target test program from the target storage location based on an agent mechanism; and carrying out service test in the virtual machine based on the target test program to obtain the target test result.
Specifically, when a service to be tested is tested in the virtual machine, the agent mechanism in the virtual machine may invoke the target test program from the target storage location when detecting that the relevant information of the target test program corresponding to the service to be tested changes, and transmit the updated target test program to the virtual machine. After the virtual machine receives the target test program, binary conversion is firstly carried out on the target test program to obtain dynamic byte codes which can be identified by the virtual machine, then service test is carried out on the service to be tested based on the converted dynamic byte codes, and a corresponding target test result is obtained.
According to the technical scheme of the embodiment, when the service to be tested is received, a target test program corresponding to the service to be tested is called, different test programs can be set according to different test scenes, the preset test programs are stored in the target service terminal equipment, meanwhile, when the test programs are stored, a service identifier corresponding to each service to be tested can be established and used as the service identifier of the test program corresponding to the service to be tested, so that the target test program corresponding to the service to be tested can be obtained based on the service identifier, and the service to be tested is tested based on the target test program in the virtual machine. In a virtual machine deployed in a target terminal device, the service to be tested is tested based on the target test program to obtain a target test result, the target test program is converted based on an agent mechanism to obtain a binary stream corresponding to the target test program, namely, a dynamic bytecode which can be identified by the virtual machine, when the service to be tested needs to be tested, the corresponding target test program is called, the service to be tested is dynamically tested, the corresponding target test result is obtained, and then whether the service to be tested passes the test is determined according to the target test result. The problem that in the prior art, a third-party system is required to be relied on for testing, or a large number of codes are required to be modified, and the later-stage service code maintenance cost is high is solved, the testing program can be used for testing the testing service in real time, the testing service is dynamically tested, the third-party system is not required to be relied on for testing, the actual code logic is not required to be modified, and the testing service is dynamically tested.
Example two
In a specific example, as shown in fig. 2, during the development process of a project, a service code needs to be tested to ensure that the service code can normally run in the actual application process. It can be understood that the logic of the test codes corresponding to different test services is different, that is, different test codes are required to test the corresponding test services, so that different test programs can be set according to the actual test environment. The test program can be written by a mock code program, and the mock code program which cannot pass is written according to different test scenes. After the user writes the test program, the test program may be stored in the background server, so that when each business machine (i.e., target terminal device) is started, each test program in the background server may be automatically acquired. In order to quickly acquire a service to be tested and test the service to be tested, a corresponding service identifier, such as a service name, creation time, a service number, and the like, may be set for the service to be tested. After the service machine acquires each test program, each test program may be stored in a storage area of the target terminal device, for example, may be stored in a local disk of the target terminal device, and during the storage, a service identifier corresponding to each test program needs to be set. The service identification of the test program corresponding to the service to be tested is consistent with the service identification of the test service.
Considering that not all test services are trustworthy, for example, under the condition that a user does not know, a certain test service may be mixed with viruses or plug-ins, or some software installed and unloaded always remains in the terminal device, or when the test service is tested based on actual terminal devices, the problems of occupying the content of the terminal device, influencing the operation of the terminal device, and the like exist. However, the above problem does not exist when the test is performed in the virtual machine, so that the test of the test service in the actual terminal equipment can be converted into the test of the test service through the virtual machine, for example, the test of the service to be tested can be performed in the Java virtual machine. An agent (namely, an agent mechanism) exists in the virtual machine, the test program stored in the target terminal equipment can be monitored continuously, and when the relevant information of the test program is monitored to be changed, the test program is taken as the target test program and is transmitted to the virtual machine, the class logic is dynamically changed, and the virtual machine converts the target test program into a recognizable binary stream, namely, dynamic byte codes. And then testing the corresponding service to be tested based on the converted target test program to obtain a corresponding target test result, and then determining whether the service to be tested passes the test based on the target test result.
According to the technical scheme of the embodiment, when the service to be tested is received, a target test program corresponding to the service to be tested is called, different test programs can be set according to different test scenes, the preset test programs are stored in the target service terminal equipment, meanwhile, when the test programs are stored, a service identifier corresponding to each service to be tested can be established and used as the service identifier of the test program corresponding to the service to be tested, so that the target test program corresponding to the service to be tested can be obtained based on the service identifier, and the service to be tested is tested based on the target test program in the virtual machine. In a virtual machine deployed in a target terminal device, the service to be tested is tested based on the target test program to obtain a target test result, the target test program is converted based on an agent mechanism to obtain a binary stream corresponding to the target test program, namely, a dynamic bytecode which can be identified by the virtual machine, when the service to be tested needs to be tested, the corresponding target test program is called, the service to be tested is dynamically tested, the corresponding target test result is obtained, and then whether the service to be tested passes the test is determined according to the target test result. The problems that in the prior art, a third-party system is required to be relied on for testing, or a large number of codes are required to be modified, and the maintenance cost of the codes of the later-period service is high are solved, the testing program can be used for testing the testing service in real time, the testing service is dynamically tested, the third-party system is not required to be relied on for testing, the actual code logic is not required to be modified, and the code coupling effect is not caused.
EXAMPLE III
Fig. 3 is a service testing apparatus provided in a third embodiment of the present invention, where the apparatus includes: a test program calling module 210 and a test result determining module 220.
The test program calling module 210 is configured to, when receiving a service to be tested, call a target test program corresponding to the service to be tested;
the test result determining module 220 is configured to perform test processing on the service to be tested based on the target test program in a virtual machine deployed in the target terminal device, so as to obtain a target test result.
According to the technical scheme of the embodiment, when the service to be tested is received, a target test program corresponding to the service to be tested is called, different test programs can be set according to different test scenes, the preset test programs are stored in the target service terminal equipment, meanwhile, when the test programs are stored, a service identifier corresponding to each service to be tested can be established and used as the service identifier of the test program corresponding to the service to be tested, so that the target test program corresponding to the service to be tested can be obtained based on the service identifier, and the service to be tested is tested based on the target test program in the virtual machine. In a virtual machine deployed in a target terminal device, the service to be tested is tested based on the target test program to obtain a target test result, the target test program is converted based on an agent mechanism to obtain a binary stream corresponding to the target test program, namely, a dynamic bytecode which can be identified by the virtual machine, when the service to be tested needs to be tested, the corresponding target test program is called, the service to be tested is dynamically tested, the corresponding target test result is obtained, and then whether the service to be tested passes the test is determined according to the target test result. The problem that in the prior art, a third-party system is required to be relied on for testing, or a large number of codes are required to be modified, and the later-stage service code maintenance cost is high is solved, the testing program can be used for testing the testing service in real time, the testing service is dynamically tested, the third-party system is not required to be relied on for testing, the actual code logic is not required to be modified, and the testing service is dynamically tested.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the test program invoking module is configured to:
when receiving a service to be tested, calling a target test program consistent with a service identifier of the service to be tested from a server.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the service testing apparatus further includes:
and the service test module is used for storing the target test program to a target storage position in the target terminal equipment, and performing service test based on the target test program when the updated target test program exists in the target storage position determined based on an agent mechanism.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the service testing module includes:
the test program calling unit is used for calling a target test program from the target storage position based on an agent mechanism;
and the test result determining unit is used for carrying out service test based on the target test program in the virtual machine to obtain the target test result.
The service testing device provided by the embodiment of the invention can execute the service testing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Example four
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary electronic device 40 suitable for use in implementing embodiments of the present invention. The electronic device 40 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 4, electronic device 40 is embodied in the form of a general purpose computing device. The components of electronic device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The electronic device 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the electronic device 40, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 40 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, the electronic device 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 412. As shown, the network adapter 412 communicates with the other modules of the electronic device 40 over the bus 403. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing by running programs stored in the system memory 402, for example, to implement the service test method provided by the embodiment of the present invention.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a service testing method, and the method includes:
when receiving a service to be tested, calling a target test program corresponding to the service to be tested;
and in a virtual machine deployed in target terminal equipment, testing the service to be tested based on the target test program to obtain a target test result.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. 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 (a non-exhaustive list) of the computer readable storage medium would include the following: 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 the context of this document, 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.
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 wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like 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).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A service testing method is applied to a client, and comprises the following steps:
when receiving a service to be tested, calling a target test program corresponding to the service to be tested;
and in a virtual machine deployed in target terminal equipment, testing the service to be tested based on the target test program to obtain a target test result.
2. The method of claim 1, wherein invoking a target test program corresponding to a service to be tested when the service to be tested is received comprises:
when receiving a service to be tested, calling a target test program consistent with a service identifier of the service to be tested from a server.
3. The method of claim 1, further comprising:
and storing the target test program to a target storage position in the target terminal equipment, and performing service test based on the target test program when determining that the updated target test program exists in the target storage position based on an agent mechanism.
4. The method according to claim 3, wherein the step of performing test processing on the service to be tested based on the target test program in the virtual machine deployed in the target terminal device to obtain a target test result includes:
invoking a target test program from the target storage location based on an agent mechanism;
and carrying out service test in the virtual machine based on the target test program to obtain the target test result.
5. A service testing apparatus, comprising:
the test program calling module is used for calling a target test program corresponding to the service to be tested when the service to be tested is received;
and the test result determining module is used for testing the service to be tested based on the target test program in the virtual machine deployed in the target terminal equipment to obtain a target test result.
6. The apparatus of claim 5, wherein the test program retrieving module is configured to:
when receiving a service to be tested, calling a target test program consistent with a service identifier of the service to be tested from a server.
7. The apparatus of claim 5, wherein the traffic test apparatus further comprises:
and the service test module is used for storing the target test program to a target storage position in the target terminal equipment, and performing service test based on the target test program when the updated target test program exists in the target storage position determined based on an agent mechanism.
8. The apparatus of claim 7, wherein the traffic test module comprises:
the test program calling unit is used for calling a target test program from the target storage position based on an agent mechanism;
and the test result determining unit is used for carrying out service test based on the target test program in the virtual machine to obtain the target test result.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the traffic testing method of any of claims 1-4.
10. A storage medium containing computer-executable instructions for performing the traffic testing method of any of claims 1-4 when executed by a computer processor.
CN202210015664.XA 2022-01-07 2022-01-07 Service testing method and device, electronic equipment and storage medium Pending CN114253864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210015664.XA CN114253864A (en) 2022-01-07 2022-01-07 Service testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210015664.XA CN114253864A (en) 2022-01-07 2022-01-07 Service testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114253864A true CN114253864A (en) 2022-03-29

Family

ID=80796252

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210015664.XA Pending CN114253864A (en) 2022-01-07 2022-01-07 Service testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114253864A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114579473A (en) * 2022-05-09 2022-06-03 太平金融科技服务(上海)有限公司深圳分公司 Application testing method, device, equipment and storage medium
WO2023202037A1 (en) * 2022-04-20 2023-10-26 中兴通讯股份有限公司 Service test method and apparatus, and related device
CN116955208A (en) * 2023-09-18 2023-10-27 荣耀终端有限公司 Test method, terminal equipment, chip and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023202037A1 (en) * 2022-04-20 2023-10-26 中兴通讯股份有限公司 Service test method and apparatus, and related device
CN114579473A (en) * 2022-05-09 2022-06-03 太平金融科技服务(上海)有限公司深圳分公司 Application testing method, device, equipment and storage medium
CN116955208A (en) * 2023-09-18 2023-10-27 荣耀终端有限公司 Test method, terminal equipment, chip and storage medium
CN116955208B (en) * 2023-09-18 2024-03-15 荣耀终端有限公司 Test method, terminal equipment, chip and storage medium

Similar Documents

Publication Publication Date Title
CN114253864A (en) Service testing method and device, electronic equipment and storage medium
CN108768730B (en) Method and device for operating intelligent network card
US8621613B1 (en) Detecting malware in content items
CN111416811A (en) Unauthorized vulnerability detection method, system, equipment and storage medium
CN110324416B (en) Download path tracking method, device, server, terminal and medium
CN110069358A (en) Call chain trace analysis method, apparatus, electronic equipment and storage medium
CN112346794A (en) Interface calling method, device, equipment and medium
CN109831351B (en) Link tracking method, device, terminal and storage medium
CN112363753A (en) Data verification method and device, electronic equipment and storage medium
US10129278B2 (en) Detecting malware in content items
CN111274130A (en) Automatic testing method, device, equipment and storage medium
CN115022201B (en) Data processing function test method, device, equipment and storage medium
CN111913861A (en) Performance test method, device, equipment and medium of Internet of things system
CN112379967B (en) Simulator detection method, device, equipment and medium
CN115454856A (en) Multi-application security detection method, device, medium and electronic equipment
CN112131611B (en) Data correctness verification method, device, equipment, system and storage medium
CN114489667A (en) Script generation method and device, electronic equipment and storage medium
CN114443721A (en) Data processing method and device, electronic equipment and storage medium
CN114443480A (en) Test method, test system, readable medium and electronic device
CN114219643A (en) Transaction calling method, device, equipment and storage medium
CN113609487B (en) Method for detecting backdoor code through static analysis
CN113778773B (en) SIM card simulation method and device and electronic equipment
CN114968829B (en) Full link pressure test method, electronic device and storage medium
CN111443983B (en) Application program virtualization method and device, electronic equipment and storage medium
CN112416786A (en) Test method, device, equipment and storage medium

Legal Events

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