CN113326195A - Test method, device, system and storage medium - Google Patents

Test method, device, system and storage medium Download PDF

Info

Publication number
CN113326195A
CN113326195A CN202110650734.4A CN202110650734A CN113326195A CN 113326195 A CN113326195 A CN 113326195A CN 202110650734 A CN202110650734 A CN 202110650734A CN 113326195 A CN113326195 A CN 113326195A
Authority
CN
China
Prior art keywords
test
test case
result information
executed
callback
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
CN202110650734.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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110650734.4A priority Critical patent/CN113326195A/en
Publication of CN113326195A publication Critical patent/CN113326195A/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 present disclosure provides a testing method, applied to the technical field of testing, including: the method comprises the steps of creating a monitoring process and a callback component, wherein the monitoring process is used for monitoring whether a test of a currently executed test case is completed or not, the callback component is used for calling back test result information of the test case, monitoring whether the test of the currently executed test case is completed or not through the monitoring process, and calling back the test result information of the test case through the callback component after the test of the test case is completed. The disclosure also provides a testing device, a testing system and a storage medium.

Description

Test method, device, system and storage medium
Technical Field
The present disclosure relates to the field of testing technologies, and in particular, to a testing method, device, system, and storage medium.
Background
In the practice of the automation framework project, it may be fast to execute one test case, that is, to complete one laplacian test, but one project may include a plurality of test cases, and the cumulative time of the plurality of laplacian tests is long. In the prior art, the test result of a single test case in the project can be obtained only after all the test cases of the project are executed.
Disclosure of Invention
In view of this, the present disclosure provides a testing method, an apparatus, a system and a storage medium, which can obtain a testing result of a single use case after the single use case is executed.
One aspect of the present disclosure provides a testing method applied to an automated testing framework, the method including:
creating a monitoring process and a callback component, wherein the monitoring process is used for monitoring whether the test of the currently executed test case is finished, and the callback component is used for calling back the test result information of the test case;
monitoring whether the test of the currently executed test case is finished or not through the monitoring process;
and after the test case is tested, the test result information of the test case is recalled through the callback component.
In one embodiment of the present disclosure, the callback component is further configured to send the test result information to a test platform, and the method further includes:
and uploading the test result information of the test case to the test platform through the callback component.
In one embodiment of the present disclosure, the creating a listening process includes:
creating the listening process using a native node.
In one embodiment of the present disclosure, the create callback component includes:
creating a before () function and an after () function, wherein the before () function is used for capturing a next test case to be executed, and the after () function is used for calling back test result information of the test case after the next test case to be executed is executed.
In one embodiment of the present disclosure, the callback component to callback the test result information of the test case includes:
capturing a next test case to be executed through a before () function;
and calling back the test result information of the test case after the next test case to be executed is executed through an after () function.
In one embodiment of the present disclosure, the callback component runs in a node of the automated test framework.
In one embodiment of the present disclosure, each time a test case is tested, the test result information of the test case is sent to the callback component through a cy.
In one embodiment of the disclosure, the test result information of the test case is transmitted to the callback component through a WebSockets mechanism built in the automated test framework.
In one embodiment of the present disclosure, the automated test framework is a cypress test framework.
Another aspect of the disclosure provides a testing apparatus including a creation module, a listening module, and a callback module.
The device comprises a creating module and a callback component, wherein the creating module is used for creating a monitoring process and the callback component, the monitoring process is used for monitoring whether the test of the currently executed test case is completed, and the callback component is used for calling back the test result information of the test case.
And the monitoring module is used for monitoring whether the test of the currently executed test case is finished through the monitoring process.
And the callback module is used for calling back the test result information of the test case through the callback component after the test case is tested.
In one embodiment of the present disclosure, the callback component is further configured to send the test result information to a test platform, and the apparatus further includes:
an upload module for uploading the test result information of the test case to the test platform through the callback component
In one embodiment of the present disclosure, the creating module is specifically configured to create the listening process using a native node.
In one embodiment of the present disclosure, the creating module is further specifically configured to create a before () function and an after () function, where the before () function is used to capture a next test case to be executed, and the after () function is used to call back test result information of the test case after the next test case to be executed is executed.
In one embodiment of the present disclosure, the callback module includes:
the capture submodule is used for capturing a next test case to be executed through a before () function;
and the callback submodule is used for calling back the test result information of the test case after the next test case to be executed is executed through an aftersearch () function.
In one embodiment of the present disclosure, the callback component runs in a node of the automated test framework.
In one embodiment of the present disclosure, each time a test case is tested, the test result information of the test case is sent to the callback component through a cy.
In one embodiment of the disclosure, the test result information of the test case is transmitted to the callback component through a WebSockets mechanism built in the automated test framework.
In one embodiment of the present disclosure, the automated test framework is a cypress test framework.
Another aspect of the present disclosure provides a computer system comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the method as described above when executed.
According to the embodiment of the disclosure, a monitoring process and a callback component are created, the monitoring process is used for monitoring whether the test of the currently executed test case is completed or not, the callback component is used for calling back the test result information of the test case, whether the test of the currently executed test case is completed or not is monitored through the monitoring process, and after the test of the test case is completed, the test result information of the test case is called back through the callback component. And obtaining the test result information of the test case after executing one test case.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an exemplary system architecture to which a test method may be applied, according to an embodiment of the disclosure;
FIG. 2 schematically illustrates a flow diagram of a testing method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a testing method according to an embodiment of the present disclosure;
FIG. 4 schematically shows a block diagram of a testing device according to an embodiment of the present disclosure; and
FIG. 5 schematically shows a block diagram of a computer system according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides a test method, which includes creating a monitoring process and a callback component, wherein the monitoring process is used for monitoring whether a test of a currently executed test case is completed or not, the callback component is used for callback test result information of the test case, monitoring whether the test of the currently executed test case is completed or not through the monitoring process, and when the test of the test case is completed, the callback component is used for callback the test result information of the test case.
Fig. 1 schematically illustrates an exemplary system architecture 100 to which a test method may be applied, according to an embodiment of the disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
A user may use terminal device 101 to interact with server 103 and server 104 over network 104 to receive or send messages and the like. Various client applications, such as a web browser application, a search-type application, an instant messaging tool (for example only), may be installed on the terminal device 101.
The terminal device 101 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. The server 105 may be a server that provides various services, such as a background management server (for example only) that provides support for test cases executed by users using the terminal devices 101.
It should be noted that the testing method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the testing device provided by the embodiments of the present disclosure may be generally disposed in the server 105. The testing method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the testing apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Alternatively, the test method provided by the embodiment of the present disclosure may also be executed by the terminal device 101, 102, or 103, or may also be executed by another terminal device different from the terminal device 101, 102, or 103. Accordingly, the testing device provided by the embodiment of the present disclosure may also be disposed in the terminal device 101, 102, or 103, or in another terminal device different from the terminal device 101, 102, or 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically shows a flow chart of a testing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method is applied to an automated test framework and includes operations S201 to S203.
In operation S201, a monitoring process and a callback component are created, where the monitoring process is used to monitor whether the test of the currently executed test case is completed, and the callback component is used to callback the test result information of the test case.
In operation S202, whether the test of the currently executed test case is completed is monitored through the monitoring process.
In operation S203, after the test case is tested, the test result information of the test case is recalled through the callback component.
A component is a simple encapsulation of data and methods, a component may have its own properties and methods, properties are simple visitors of the component's data, and methods are some simple and visible functions of the component.
A process is a running activity of a program in a computer on a certain data set, is a basic unit for resource allocation and scheduling of a system, and is the basis of an operating system structure. In early process-oriented design of computer architecture, processes were the basic execution entities of programs; in contemporary thread-oriented computer architectures, processes are containers for threads. A program is a description of instructions, data, and their organization, and a process is an entity of a program.
The test case is a description of a test task performed on a specific software product, and embodies a test scheme, a method, a technology and a strategy. The contents of the test object, the test environment, the input data, the test steps, the expected results, the test scripts and the like are included, and finally, a document is formed. Simply considered, a test case is a set of test inputs, execution conditions, and expected results tailored for a particular purpose to verify whether a particular software requirement is met.
In the disclosure, the automated testing framework takes a Cypress testing framework as an example, and the Cypress testing framework is a new generation of end-to-end automated testing framework which can be used for setting testing compiling tests, executing tests and debugging tests. The Cypress test framework allows all types of tests to be written: end-to-end testing, integration testing, unit testing, and the Cypress testing framework can test any content running in the browser.
In the embodiment of the present disclosure, the callback component is generally located in cypress/plugs/index.js, or may be configured to another directory, which is not limited in the present disclosure. The Cypress test framework automatically loads the callback component Cypress/plugins/index.
In the disclosed embodiment, the listening process runs using a node on the host. The tester executes a plurality of test cases from the browser, accesses the tested browser, and at the moment, the test program executes, and the cypress run executes the test from the index. And meanwhile, monitoring whether the test of the currently executed test case is finished or not by using a monitoring process.
In the embodiment of the present disclosure, if the test of the currently executed test case is completed, the monitoring process may send a notification message that the test of the currently executed test case is completed to the callback component, and the callback component may callback the test result information of the test case after receiving the notification message that the test of the currently executed test case is completed.
According to the embodiment of the disclosure, a monitoring process and a callback component are created, the monitoring process is used for monitoring whether the test of the currently executed test case is completed, the callback component is used for callback the test result information of the test case, whether the test of the currently executed test case is completed is monitored through the monitoring process, and after the test of the test case is completed, the callback component is used for callback the test result information of the test case. And obtaining the test result information of the test case after executing one test case.
FIG. 3 schematically shows a flow chart of a testing method according to an embodiment of the present disclosure.
As shown in FIG. 3, the method is applied to the Cypress test framework and includes operations S301 to S304.
In operation S301, a monitoring process and a callback component are created, where the monitoring process is used to monitor whether the test of the currently executed test case is completed, and the callback component is used to callback the test result information of the test case and send the test result information to the test platform.
In operation S302, whether the test of the currently executed test case is completed is monitored through the monitoring process.
In operation S303, after the test case is tested, the test result information of the test case is recalled through the callback component.
In operation S304, the test result information of the test case is uploaded to the test platform through the callback component.
In the embodiment of the present disclosure, after obtaining the test result information of the currently executed test case, the callback component may further forward the test result information to the test platform, so that each time a test case is executed, a user may view the test result information of the test case through the test platform.
In the embodiment of the disclosure, after the test result information of the test case is sent to the callback component, the synchronous or asynchronous code may be executed, and the test result information is sent to the external system in real time. For the transmission to the test platform, a request function can be written, and real-time uploading of the test platform is realized by using axios.
In one embodiment of the present disclosure, creating a listening process includes creating a listening process using a native node. The creating callback component comprises creating a before () function and an after () function, wherein the before () function is used for capturing a next test case to be executed, and the after () function is used for calling back the test result information of the test case after the next test case to be executed is executed.
In the embodiment of the present disclosure, the before () function is executed before the test case is executed, and the after () function is executed after the test case is executed.
In one embodiment of the present disclosure, the callback component, the callback of the test result information of the test case, includes: capturing a next test case to be executed through a before () function; and calling back the test result information of the test case after the next test case to be executed is executed through the after () function.
In one embodiment of the present disclosure, a callback component runs in a node of the automated test framework. More, the callback component runs under the cypress test framework and can relay messages received from the browser to the test process using ipcert commands in node.
In one embodiment of the present disclosure, each time a test case is tested, the test result information of the test case is sent to the callback component through a cy
In the embodiment of the present disclosure, the test result information includes information of a test status, a test title, a test duration, and the like. Test status, e.g., success or failure, test title, e.g., log in to merchant's back office, etc.
In one embodiment of the disclosure, the test result information of the test case is transmitted to the callback component through a WebSockets mechanism built in the cypress test framework.
In the disclosed embodiments, the WebSockets mechanism is a protocol for full-duplex communication over a single TCP connection. WebSockets makes data exchange between the client and the server simpler, and allows the server to actively push data to the client. In the WebSocket API, the browser and the server only need to complete one handshake, and persistent connection can be directly established between the browser and the server, and bidirectional data transmission is carried out.
FIG. 4 schematically shows a block diagram of a testing device according to an embodiment of the disclosure.
As shown in FIG. 4, the testing apparatus 400 includes a creation module 410, a listening module 420, and a callback module 430.
The creating module 410 is configured to create a monitoring process and a callback component, where the monitoring process is configured to monitor whether a test of a currently executed test case is completed, and the callback component is configured to callback test result information of the test case.
The monitoring module 420 is configured to monitor whether the currently executed test case is tested completely through the monitoring process.
And the callback module 430 is configured to callback the test result information of the test case through the callback component after the test of the test case is completed.
According to the embodiment of the disclosure, the creating module creates a monitoring process and a callback component, the monitoring process is used for monitoring whether the test of the currently executed test case is completed or not, the callback component is used for callback the test result information of the test case, the monitoring module monitors whether the test of the currently executed test case is completed or not through the monitoring process, and the callback module is used for callback the test result information of the test case through the callback component after the test of the test case is completed. And obtaining the test result information of the test case after executing one test case.
In one embodiment of the present disclosure, the callback component is further configured to send the test result information to the test platform, and the apparatus further includes:
and the uploading module is used for uploading the test result information of the test case to the test platform through the callback component. And after executing the test case, the user can see the test result information of the test case through the test platform.
In one embodiment of the present disclosure, the creation module 410 is specifically configured to create the listening process using a native node.
In one embodiment of the present disclosure, the creating module 410 is further specifically configured to create a before () function and an after () function, where the before () function is used to capture a next test case to be executed, and the after () function is used to call back test result information of the test case after the next test case to be executed is executed.
In one embodiment of the present disclosure, the callback module 430 includes:
the capture submodule is used for capturing a next test case to be executed through a before () function;
and the callback submodule is used for calling back the test result information of the test case after the next test case to be executed is executed through the aftersearch () function.
In one embodiment of the present disclosure, the callback component runs in a node of the automated test framework.
In one embodiment of the present disclosure, each time the test case is tested, the test result information of the test case is sent to the callback component through the cy.
In one embodiment of the disclosure, the test result information of the test case is transmitted to the callback component through a WebSockets mechanism built in the automated test framework.
In one embodiment of the present disclosure, the automated test framework is a cypress test framework.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any number of the creation module 410, the listening module 420, and the callback module 430 may be combined and implemented in one module/unit/sub-unit, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the disclosure, at least one of the creating module 410, the listening module 420, and the callback module 430 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware by any other reasonable manner of integrating or packaging a circuit, or in any one of three implementations of software, hardware, and firmware, or in a suitable combination of any of them. Alternatively, at least one of the creation module 410, the listening module 420, and the callback module 430 may be implemented at least in part as a computer program module that, when executed, may perform corresponding functions.
It should be noted that the test apparatus portion in the embodiments of the present disclosure corresponds to the test method portion in the embodiments of the present disclosure, and the description of the test apparatus portion specifically refers to the test method portion, which is not described herein again.
Fig. 5 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method according to an embodiment of the present disclosure. The computer system illustrated in FIG. 5 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 5, a computer system 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. The processor 501 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 501 may also include onboard memory for caching purposes. Processor 501 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 503, various programs and data necessary for the operation of the system 500 are stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 502 and/or the RAM 503. Note that the programs may also be stored in one or more memories other than the ROM 502 and the RAM 503. The processor 501 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, system 500 may also include an input/output (I/O) interface 505, input/output (I/O) interface 505 also being connected to bus 504. The system 500 may also include one or more of the following components connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program, when executed by the processor 501, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: 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), 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 present 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.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include ROM 502 and/or RAM 503 and/or one or more memories other than ROM 502 and RAM 503 described above.
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 or flowchart illustration, and combinations of blocks in the block diagrams 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.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (12)

1. A testing method applied to an automated testing framework, the method comprising:
creating a monitoring process and a callback component, wherein the monitoring process is used for monitoring whether the test of the currently executed test case is finished, and the callback component is used for calling back the test result information of the test case;
monitoring whether the test of the currently executed test case is finished or not through the monitoring process;
and after the test case is tested, the test result information of the test case is recalled through the callback component.
2. The method of claim 1, the callback component further for sending the test result information to a test platform, the method further comprising:
and uploading the test result information of the test case to the test platform through the callback component.
3. The method of claim 1, the creating a listening process comprising:
creating the listening process using a native node.
4. The method of claim 1, the creating a callback component comprising:
creating a before () function and an after () function, wherein the before () function is used for capturing a next test case to be executed, and the after () function is used for calling back the test result information of the test case after the next test case to be executed is executed.
5. The method of claim 4, wherein the callback component that callbacks the test result information of the test case comprises:
capturing a next test case to be executed through a before () function;
and calling back the test result information of the test case after the next test case to be executed is executed through an after () function.
6. The method of any of claims 1 to 5, the callback component running in a node of the automated testing framework.
7. The method of claim 6, wherein,
and sending the test result information of the test case to the callback component through a cy.task command every time the test case is tested.
8. The method of claim 6, wherein,
and transmitting the test result information of the test case to the callback component through a WebSockets mechanism built in the automatic test framework.
9. The method of any of claims 1 to 8, wherein the automated test framework is a cypress test framework.
10. A test apparatus, comprising:
the device comprises a creating module, a calling-back module and a monitoring module, wherein the creating module is used for creating a monitoring process and the calling-back module, the monitoring process is used for monitoring whether the test of the currently executed test case is finished, and the calling-back module is used for calling back the test result information of the test case;
the monitoring module is used for monitoring whether the test of the currently executed test case is finished or not through the monitoring process;
and the callback module is used for calling back the test result information of the test case through the callback component after the test case is tested.
11. A computer system, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-9.
12. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 9.
CN202110650734.4A 2021-06-10 2021-06-10 Test method, device, system and storage medium Pending CN113326195A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110650734.4A CN113326195A (en) 2021-06-10 2021-06-10 Test method, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110650734.4A CN113326195A (en) 2021-06-10 2021-06-10 Test method, device, system and storage medium

Publications (1)

Publication Number Publication Date
CN113326195A true CN113326195A (en) 2021-08-31

Family

ID=77420656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110650734.4A Pending CN113326195A (en) 2021-06-10 2021-06-10 Test method, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN113326195A (en)

Similar Documents

Publication Publication Date Title
CN113190464B (en) mock testing method and device, electronic equipment and medium
CN110955589A (en) Method, system, device and medium for testing headless mode based on browser
CN107045475B (en) Test method and device
CN107644075B (en) Method and device for collecting page information
CN113900834B (en) Data processing method, device, equipment and storage medium based on Internet of things technology
CN113127361A (en) Application program development method and device, electronic equipment and storage medium
CN111786939A (en) Method, device and system for testing management platform of Internet of things
CN111611086A (en) Information processing method, information processing apparatus, electronic device, and medium
CN113468067B (en) Application program debugging method and device, electronic equipment and computer readable medium
CN111666199A (en) Debugging method executed on intelligent terminal and software debugger
CN113191889A (en) Wind control configuration method, configuration system, electronic device and readable storage medium
CN110717992B (en) Method, apparatus, computer system and readable storage medium for scheduling model
CN113132400A (en) Business processing method, device, computer system and storage medium
CN111162973A (en) Data flow acquisition method and device, electronic equipment and medium
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN115934378A (en) Service data processing method and device, electronic equipment and storage medium
CN113326195A (en) Test method, device, system and storage medium
CN112506781B (en) Test monitoring method, device, electronic equipment, storage medium and program product
CN112953769B (en) Data transmission method, device, computer system and readable storage medium
CN113778798A (en) Server control method, server control device, electronic device, and storage medium
CN111937366B (en) Web request processing method and device
CN114696888A (en) Port task processing method, device, equipment and medium of satellite measurement, operation and control system
JP2019536173A (en) Reduce application resource usage
CN113986679A (en) Performance analysis method and device based on configuration information hot loading
CN113535590A (en) Program testing method and device

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