CN109697141B - Method and device for visual testing - Google Patents

Method and device for visual testing Download PDF

Info

Publication number
CN109697141B
CN109697141B CN201710983999.XA CN201710983999A CN109697141B CN 109697141 B CN109697141 B CN 109697141B CN 201710983999 A CN201710983999 A CN 201710983999A CN 109697141 B CN109697141 B CN 109697141B
Authority
CN
China
Prior art keywords
query
result
data
query request
verification
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.)
Active
Application number
CN201710983999.XA
Other languages
Chinese (zh)
Other versions
CN109697141A (en
Inventor
赵娟
张琪
王海林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke 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 Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710983999.XA priority Critical patent/CN109697141B/en
Publication of CN109697141A publication Critical patent/CN109697141A/en
Application granted granted Critical
Publication of CN109697141B publication Critical patent/CN109697141B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2289Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method and a device for visual testing, which relate to the field of computer information processing, and the method comprises the following steps: responding to user operation to generate a query request; generating a query flow according to the query request, wherein the query flow comprises a plurality of sub-flows which are connected in series according to a preset sequence; in each sub-process, acquiring data in a bottom database corresponding to the query request, generating a query result, and performing data verification on the query result to generate a verification result; and in each sub-process, visually displaying the query result and the verification result on a user interface. The method and the device for the visual test can automatically verify the test data at the back end of the system and realize the visual display of the test process at the back end of the system.

Description

Method and device for visual testing
Technical Field
The invention relates to the field of computer information processing, in particular to a method and a device for visual testing.
Background
The system test is a test performed on the whole product system, and aims to verify whether the system meets the definition of the required specification and find out the places which do not meet or contradict the required specification, thereby providing a more complete scheme. The back-end system test generally refers to the test of a server end of a system, at present, User Interfaces (UI) of many back-end systems are relatively few, most of tests for the back-end system directly use a database query tool, the correctness of data is manually verified by querying a table of a database, the test flow is relatively complex and unclear, and the automatic test for testing the back-end system and the automatic verification of the data in the test process are difficult to realize.
At present, in the prior art, most of the back-end system tests are to sort and store the test flow through a document manager, such as word, excel, OneNote or some document management systems, and the disadvantages of the method are that the test flow is not clear clearly, the test flow is not easy to store and accumulate, and the data sharing is difficult to realize.
Moreover, in the prior art, in the process of manually querying the database for back-end system testing, if more information interaction between background servers is involved, the whole testing process becomes abnormally complex, which makes it difficult for a tester to master the whole testing process in a short time.
Therefore, a new method and apparatus for visual testing is needed.
The above information disclosed in this background section is only for enhancement of understanding of the background of the invention and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for visual testing, which can perform automatic verification on test data at the back end of a system and realize visual display of a test flow at the back end of the system.
Additional features and advantages of the invention will be set forth in the detailed description which follows, or may be learned by practice of the invention.
According to an aspect of the invention, a method for visualization testing is proposed, the method comprising: responding to user operation to generate a query request; generating a query flow according to the query request, wherein the query flow comprises a plurality of sub-flows which are connected in series according to a preset sequence; in each sub-process, acquiring data in a bottom database corresponding to the query request, generating a query result, and performing data verification on the query result to generate a verification result; and in each sub-process, visually displaying the query result and the verification result on a user interface.
In an exemplary embodiment of the present disclosure, the generating a query request in response to a user operation includes: acquiring the numerical value of the query field; and responding to user operation, and generating the query request through the numerical value of the query field.
In an exemplary embodiment of the present disclosure, the obtaining data in a bottom database corresponding to the query request and generating a query result includes: acquiring the query request; processing the query request by a control layer distribution controller; and acquiring data in a bottom database corresponding to the query request through the controller to generate a query result.
In an exemplary embodiment of the present disclosure, the obtaining, by the controller, data in a bottom database corresponding to the query request to generate a query result includes: acquiring a bottom database table corresponding to the query request through the controller; and querying corresponding data through the table in the bottom database to generate the query result.
In an exemplary embodiment of the disclosure, the processing the query request by the control layer distribution controller includes: the query request is processed by a control layer distribution controller of Spring MVC.
In an exemplary embodiment of the present disclosure, further comprising: and generating a comparison numerical value according to the correct numerical value corresponding to the query request.
In an exemplary embodiment of the present disclosure, the performing data verification on the query result and generating a verification result includes: and carrying out data verification on the comparison numerical value and the query result to generate the verification result.
In an exemplary embodiment of the disclosure, the generating a comparison numerical value according to a correct numerical value corresponding to the query request further includes: and storing the comparison value through a configuration model.
In an exemplary embodiment of the disclosure, the storing the alignment value through a configuration model includes at least one of: storing the comparison numerical value through an extensible markup language; and storing the comparison value through enumeration.
In an exemplary embodiment of the present disclosure, the displaying the query result and the verification result on a user interface includes: and displaying the query result and the verification result on a user interface through AngularJS.
In one exemplary embodiment of the present disclosure, data interaction is performed through the Mybatis framework.
According to an aspect of the present invention, there is provided an apparatus for visual testing, the apparatus comprising: the query module is used for responding to user operation to generate a query request; the flow module is used for generating a query flow according to the query request, and the query flow comprises a plurality of sub-flows which are connected in series according to a preset sequence; the checking module is used for acquiring data in a bottom database corresponding to the query request in each sub-process, generating a query result, and performing data checking on the query result to generate a checking result; and the display module is used for visually displaying the query result and the verification result on a user interface in each sub-process.
In an exemplary embodiment of the present disclosure, further comprising: and the numerical value module is used for generating a comparison numerical value through the correct numerical value corresponding to the query request.
According to an aspect of the present invention, there is provided an electronic apparatus including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.
According to an aspect of the invention, a computer-readable medium is proposed, on which a computer program is stored, characterized in that the program, when executed by a processor, implements a method as in the above.
According to the method and the device for the visual test, the test data at the back end of the system can be automatically verified, and the visual display of the test process at the back end of the system is realized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are only some embodiments of the invention and other drawings may be derived by those skilled in the art without inventive effort.
FIG. 1 is a system architecture illustrating a method for visual testing in accordance with an exemplary embodiment.
FIG. 2 is a flow diagram illustrating a method for visual testing in accordance with an exemplary embodiment.
FIG. 3 is a flow chart illustrating a method for visual testing in accordance with another exemplary embodiment.
FIG. 4 is a flowchart illustrating a method for visual testing in accordance with another exemplary embodiment.
FIG. 5 is a schematic diagram illustrating a method for visual testing in accordance with another exemplary embodiment.
FIG. 6 is a block diagram illustrating an apparatus for visual testing in accordance with an exemplary embodiment.
FIG. 7 is a block diagram illustrating an apparatus for visual testing in accordance with another exemplary embodiment.
FIG. 8 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 9 is a schematic diagram illustrating a computer readable medium according to an example embodiment.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It will be appreciated by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or flow charts in the drawings are not necessarily required to practice the present invention and are, therefore, not intended to limit the scope of the present invention.
The following detailed description of exemplary embodiments of the disclosure refers to the accompanying drawings.
FIG. 1 is a system architecture illustrating a method for visual testing in accordance with an exemplary embodiment.
As shown in fig. 1, the system architecture 100 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, wireless communication links, or fiber optic cables, among others.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a data query application, a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 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 providing various services, such as a backend management server (for example only) that provides support for shopping-like websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (e.g., a verification result) to the terminal device.
It should be noted that the data verification method provided in the embodiment of the present application is generally executed by the server 105, and accordingly, the user interface display is generally disposed in the client 101, 102, 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 is a flowchart illustrating a method for visual testing in accordance with an exemplary embodiment.
As shown in fig. 2, in S202, a query request is generated in response to a user operation. In an exemplary embodiment of the present disclosure, the generating a query request in response to a user operation includes: acquiring the numerical value of the query field; and responding to user operation, and generating the query request through the numerical value of the query field. For example, the numeric value of the query field input by the user is received through the query page, the user side performs operations such as submission or start, and after the operations are performed by the user, the query request is generated according to the content input by the user in response to the request of the user.
In S204, a query flow is generated according to the query request, where the query flow includes a plurality of sub-flows connected in series according to a predetermined order; according to the content of the query request, the processing steps corresponding to the query request are obtained, and the processing steps can be a query process. The query process comprises a plurality of processing steps, and each processing step is a sub-process. In actual operation, the sub-processes are connected in series according to a certain sequence to form a query process. The predetermined sequence may be, for example, a logic process of the test, and may also be, for example, a process in a preset test mode, which is not limited by the present invention.
In S206, in each sub-process, data in the bottom database corresponding to the query request is obtained, a query result is generated, and data verification is performed on the query result, so as to generate a verification result.
And acquiring data in a bottom database corresponding to the query request to generate a query result. The query request may be obtained, for example; processing the query request by a control layer distribution controller; and acquiring data in a bottom database corresponding to the query request through the controller to generate a query result. Spring MVC (Spring Model View Controller) is a backend framework technology, the Spring MVC is a lightweight Web framework which realizes a request-driven type of a Web MVC design mode based on Java, namely, the idea of an MVC framework mode is used, the Web layer is subjected to responsibility decoupling, a request-response Model is used based on a request-driven finger, and the framework aims to simplify development. Spring Web MVC is also an implementation of the service to worker model, but is made optimizable. The front-end controller is a DispatcterServlet; the application controller is actually disassembled into a processor mapper (Handler Mapping) for processor management and a View Resolver (View Resolver) for View management; the page Controller/action/processor is realized by a Controller interface; the method supports localized analysis, theme analysis, file uploading and the like; very flexible data verification, formatting and data binding mechanisms are provided; contractual programming support is provided for strong contract-greater configurations. In the embodiment of the present invention, the query request may be processed, for example, by a Controller-controlled layer distribution Controller of Spring MVC. The query result may be subjected to data verification with existing correct data, for example, to generate a verification result. The correct data may be, for example, a numerical result known in the system and correct under the query condition and manner, and may also be, for example, stored in a predetermined location, so as to facilitate real-time invocation for data verification. The check result can be recorded in the form of "0" and "1", that is, in two cases of "consistent" and "inconsistent".
In S208, in each sub-process, the query result and the verification result are visually displayed on a user interface. And transmitting the query result and the verification result to a client interface. AngularJS is an open source front-end technology framework developed by Google, and AngularJS uses different methods to complement the defects of HTML itself in building applications. AngularJS allows the browser to recognize new grammars by using the structure of instructions (directives). For example: data binding is carried out by using a double brace { } } grammar; using the DOM control structure to implement an iterative or hidden DOM fragment; supporting the verification of forms and forms; logic code can be associated to the relevant DOM elements; HTML can be grouped into reusable components. Wherein the display of the results can be performed on the user interface, for example, by the AngularJS method. According to the above verification result, for example, the query result is "inconsistent" and a special color is selected on the user interface to display, so as to generate a warning effect for the user.
According to the method for the visual test, the test data at the back end of the system can be automatically verified in a mode of carrying out data verification on the query data and displaying the query result and the verification result on the user interface, and the visual display of the test process at the back end of the system is realized.
It should be clearly understood that the present disclosure describes how to make and use particular examples, but the principles of the present disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
FIG. 3 is a flow chart illustrating a method for visual testing in accordance with another exemplary embodiment. Fig. 3 is an exemplary description of S204 in fig. 2.
As shown in fig. 3, in S302, the query request is obtained.
In S304, the query request is processed by the control layer distribution controller. The query request may be handled, for example, by a controller that controls which controller handles the query request by scheduling the dispatch controller.
In S306, the controller obtains data in the bottom database corresponding to the query request to generate a query result, for example, the controller obtains a bottom database table corresponding to the query request; and querying corresponding data through the table in the bottom database to generate the query result. The query result can also be generated, for example, by querying the corresponding data through the database sub-table in the bottom database. Queries may be made, for example, at the Dao level, and results returned. The Dao layer is mainly used for working as a data persistence layer, and tasks responsible for communicating with a database are packaged in the Dao layer, the Dao layer is designed by firstly designing a Dao interface, then defining the implementation class of the interface in a Spring configuration file, and then calling the interface in a module to process data service without being concerned about which specific implementation class of the interface is, so that the structure is very clear.
In an exemplary embodiment of the present disclosure, further comprising: and generating a comparison numerical value according to the correct numerical value corresponding to the query request. And carrying out data verification on the comparison numerical value and the query result to generate the verification result. For example, the correct value is obtained according to the service source and the user input value, and then the correct value is compared with the data queried in the table to generate the verification result. For example, when the verification results are inconsistent, the error mark prompts a tester that data has a problem on the page, so that the verification function is realized. Data verification may also be performed, for example, at the service layer or manager layer.
In an exemplary embodiment of the disclosure, the generating a comparison numerical value according to a correct numerical value corresponding to the query request further includes: and storing the comparison value through a configuration model. The saving may be made, for example, by an XML file configuration table.
In an exemplary embodiment of the disclosure, the storing the alignment value through a configuration model includes at least one of: storing the comparison numerical value through an extensible markup language; and storing the comparison value through enumeration.
According to the method for the visual test, whether the correct data acquired from the configuration model is consistent with the data inquired from the test table is checked through comparison and verification, and an automatic verification function is realized, so that the test efficiency and accuracy are improved, and the omission of the key field check by a tester through manual test is prevented.
In one exemplary embodiment of the present disclosure, data interaction is performed through the Mybatis framework. MyBatis is a Java-based persistence tier framework that supports common SQL queries, stored procedures and advanced mappings. MyBatis eliminates the manual setting of almost all JDBC codes and parameters and retrieval of result sets. MyBatis maps interfaces and Java POJOs (Plain Ordinary Java Objects) to records in the database using simple XML or annotations for configuration and raw mapping. The functional architecture of Mybatis is divided into three layers: (1) an API interface layer: the externally used interface APIs are provided through which developers manipulate the database. The interface layer, upon receiving the call request, calls the data processing layer to complete the specific data processing. (2) A data processing layer: and the system is responsible for specific SQL searching, SQL analysis, SQL execution, execution result mapping processing and the like. The main purpose of the method is to complete one database operation according to the called request. (3) A basic supporting layer: and the system is responsible for the most basic function support, including connection management, transaction management, configuration loading and cache processing which are common things and are extracted as the most basic components. Providing the most basic support for the data processing layer of the upper layer. In the embodiment of the application, flexible and effective data interaction can be realized through the Mybatis framework.
FIG. 4 is a flowchart illustrating a method for visual testing in accordance with another exemplary embodiment.
As shown in fig. 4, in S402, the user inputs a query instruction.
In S404, a query is made according to the user input condition.
In S406, a query is performed at the DAO layer according to the query condition.
In S408, the configuration file is called, and the result of the configuration file is returned.
In S410, the result in S406 is compared with the result in S408, and the result is returned.
In S412, the result is presented in the user interface.
FIG. 5 is a schematic diagram illustrating a method for visual testing in accordance with another exemplary embodiment. As shown in fig. 5, the whole background testing process is visualized by concatenating the testing processes of each step, so that the whole background testing process is clear and clear, testers can conveniently and quickly become familiar with new services and process specifications, and the testing efficiency is improved.
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. The computer program, when executed by the CPU, performs the functions defined by the method provided by the present invention. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the method according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. For details which are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the embodiments of the method of the present invention.
FIG. 6 is a block diagram illustrating an apparatus for visual testing in accordance with an exemplary embodiment.
The query module 602 is configured to generate a query request in response to a user operation.
The flow module 604 is configured to generate a query flow according to the query request, where the query flow includes a plurality of sub-flows connected in series according to a predetermined order.
The checking module 606 is configured to, in each sub-process, obtain data in a bottom database corresponding to the query request, generate a query result, and perform data checking on the query result to generate a checking result.
The display module 608 is configured to visually display the query result and the verification result on a user interface in each sub-process.
In an exemplary embodiment of the present disclosure, further comprising: and a value module (not shown in the figure) for generating a comparison value according to the correct value corresponding to the query request.
FIG. 7 is a block diagram illustrating an apparatus for visual testing in accordance with another exemplary embodiment.
The UI data display module 702 is used for providing the interface for the tester to use.
And a data checking module 704, configured to perform data checking.
And a module configuration module 706 for storing the correct data for use in the call.
The data access function module 708 is used for implementing a data reading and storing function.
And a database 710 for performing data testing.
According to the device for the visual test, the test data at the back end of the system can be automatically verified in a mode of carrying out data verification on the query data and displaying the query result and the verification result on the user interface, and the visual display of the test process at the back end of the system is realized.
FIG. 8 is a block diagram of an electronic device shown in accordance with an example embodiment.
An electronic device 200 according to this embodiment of the invention is described below with reference to fig. 8. The electronic device 200 shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the electronic device 200 is embodied in the form of a general purpose computing device. The components of the electronic device 200 may include, but are not limited to: at least one processing unit 210, at least one memory unit 220, a bus 230 connecting different system components (including the memory unit 220 and the processing unit 210), a display unit 240, and the like.
Wherein the storage unit stores program code executable by the processing unit 210 to cause the processing unit 210 to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned electronic prescription flow processing method section of the present specification. For example, the processing unit 210 may perform the steps as shown in fig. 2.
The memory unit 220 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)2201 and/or a cache memory unit 2202, and may further include a read only memory unit (ROM) 2203.
The storage unit 220 can also include a program/utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 230 may be any bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 200 may also communicate with one or more external devices 300 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 200, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 200 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 250. Also, the electronic device 200 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 260. The network adapter 260 may communicate with other modules of the electronic device 200 via the bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 200, 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.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above-mentioned electronic prescription flow processing method according to the embodiments of the present disclosure.
FIG. 9 is a schematic diagram illustrating a computer readable medium according to an example embodiment.
Referring to fig. 9, a program product 400 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a 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.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A 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 readable storage medium include: an electrical connection having one or more wires, a portable 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.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may be any readable medium that is not a 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 readable storage 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.
Program code for carrying out operations for aspects 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, 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 computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the following: responding to user operation to generate a query request; acquiring data in a bottom database corresponding to the query request, and generating a query result; performing data verification on the query result to generate a verification result; and displaying the query result and the verification result on a user interface.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system "
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
Those skilled in the art will readily appreciate from the foregoing detailed description that the methods and apparatus for visual testing according to embodiments of the present invention have one or more of the following advantages.
According to some embodiments, the method for visual testing of the invention can automatically verify the testing data at the back end of the system and realize the visual display of the testing process at the back end of the system by performing data verification on the query data and displaying the query result and the verification result on the user interface.
According to other embodiments, the method for visual testing of the invention checks whether the correct data acquired from the configuration model is consistent with the data inquired from the test table by comparing and checking the correct data acquired from the configuration model and the data inquired from the test table, so that an automatic checking function is realized, on one hand, the testing efficiency and the accuracy are improved, and on the other hand, the omission of the key field check by a tester through manual testing is prevented.
Exemplary embodiments of the present invention are specifically illustrated and described above. It is to be understood that the invention is not limited to the precise construction, arrangements, or instrumentalities described herein; on the contrary, the invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
In addition, the structures, the proportions, the sizes, and the like shown in the drawings of the present specification are only used for matching with the contents disclosed in the specification, so as to be understood and read by those skilled in the art, and are not used for limiting the limit conditions which the present disclosure can implement, so that the present disclosure has no technical essence, and any modification of the structures, the change of the proportion relation, or the adjustment of the sizes, should still fall within the scope which the technical contents disclosed in the present disclosure can cover without affecting the technical effects which the present disclosure can produce and the purposes which can be achieved. In addition, the terms "above", "first", "second" and "first" used in the present specification are used for the sake of clarity only, and are not intended to limit the scope of the present disclosure, and changes or modifications of the relative relationship thereof may be regarded as the scope of the present invention without substantial technical changes.

Claims (11)

1. A method for visual testing, comprising:
responding to user operation to generate a query request;
generating a comparison numerical value through a correct numerical value corresponding to the query request, wherein the comparison numerical value comprises the following steps:
storing the comparison value through a configuration model;
generating a query flow according to the query request, wherein the query flow comprises a plurality of sub-flows which are connected in series according to a preset sequence;
in each sub-process, acquiring data in a bottom database corresponding to the query request, generating a query result, and performing data verification on the query result to generate a verification result, including:
performing data verification on the comparison value and the query result to generate a verification result; and
and in each sub-process, visually displaying the query result and the verification result on a user interface.
2. The method of claim 1, wherein said displaying the query result and the verification result on a user interface comprises:
and displaying the query result and the verification result on a user interface through AngularJS.
3. The method of claim 1, wherein data interaction of query data and verification data is performed through a Mybatis framework.
4. The method of claim 1, wherein generating a query request in response to a user action comprises:
acquiring the numerical value of the query field; and
and responding to user operation, and generating the query request through the numerical value of the query field.
5. The method of claim 1, wherein the obtaining data in an underlying database corresponding to the query request and generating a query result comprises:
acquiring the query request;
processing the query request by a control layer distribution controller; and
and acquiring data in a bottom database corresponding to the query request through the controller to generate a query result.
6. The method of claim 5, wherein the obtaining, by the controller, data in an underlying database corresponding to the query request to generate a query result comprises:
acquiring a bottom database table corresponding to the query request through the controller; and
and querying corresponding data through the table in the bottom database to generate the query result.
7. The method of claim 5, wherein said processing the query request by a control layer distribution controller comprises:
the query request is processed by a control layer distribution controller of Spring MVC.
8. The method of claim 1, wherein the storing the alignment values via a configuration model comprises at least one of:
storing the comparison numerical value through an extensible markup language; and
and storing the comparison value through enumeration.
9. An apparatus for visual testing, comprising:
the query module is used for responding to user operation to generate a query request;
generating a comparison numerical value through a correct numerical value corresponding to the query request, wherein the comparison numerical value comprises the following steps:
storing the comparison value through a configuration model;
the flow module is used for generating a query flow according to the query request, and the query flow comprises a plurality of sub-flows which are connected in series according to a preset sequence;
the verification module is configured to, in each sub-process, obtain data in a bottom database corresponding to the query request, generate a query result, perform data verification on the query result, and generate a verification result, where the verification module includes:
performing data verification on the comparison value and the query result to generate a verification result; and
and the display module is used for visually displaying the query result and the verification result on a user interface in each sub-process.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-8.
11. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN201710983999.XA 2017-10-20 2017-10-20 Method and device for visual testing Active CN109697141B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710983999.XA CN109697141B (en) 2017-10-20 2017-10-20 Method and device for visual testing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710983999.XA CN109697141B (en) 2017-10-20 2017-10-20 Method and device for visual testing

Publications (2)

Publication Number Publication Date
CN109697141A CN109697141A (en) 2019-04-30
CN109697141B true CN109697141B (en) 2022-07-05

Family

ID=66225248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710983999.XA Active CN109697141B (en) 2017-10-20 2017-10-20 Method and device for visual testing

Country Status (1)

Country Link
CN (1) CN109697141B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110609988A (en) * 2019-08-12 2019-12-24 北京金鹰融信科技有限责任公司 Form verification method and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834595A (en) * 2015-02-15 2015-08-12 网易(杭州)网络有限公司 Visual automatic test method and system
CN105989193A (en) * 2015-03-18 2016-10-05 日本电气株式会社 Database system
CN107256265A (en) * 2017-06-14 2017-10-17 成都四方伟业软件股份有限公司 A kind of search-engine results data visualization methods of exhibiting and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7529977B2 (en) * 2006-05-31 2009-05-05 Microsoft Corporation Automated extensible user interface testing
US8392886B2 (en) * 2006-10-17 2013-03-05 Artoftest, Inc. System, program product, and methods to enable visual recording and editing of test automation scenarios for web application
CN105302818A (en) * 2014-06-25 2016-02-03 国家电网公司 Query processing method and apparatus
CN105117938A (en) * 2015-08-19 2015-12-02 江苏农牧人电子商务股份有限公司 E-commerce framework request data analysis method based on model view controller
CN106776642A (en) * 2015-11-24 2017-05-31 阿里巴巴集团控股有限公司 A kind of method for information display and device
CN105808413A (en) * 2016-03-02 2016-07-27 上海新炬网络信息技术有限公司 Business process visualization based SQL performance monitoring method
CN106021112A (en) * 2016-05-31 2016-10-12 腾讯科技(深圳)有限公司 Program testing system, method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834595A (en) * 2015-02-15 2015-08-12 网易(杭州)网络有限公司 Visual automatic test method and system
CN105989193A (en) * 2015-03-18 2016-10-05 日本电气株式会社 Database system
CN107256265A (en) * 2017-06-14 2017-10-17 成都四方伟业软件股份有限公司 A kind of search-engine results data visualization methods of exhibiting and system

Also Published As

Publication number Publication date
CN109697141A (en) 2019-04-30

Similar Documents

Publication Publication Date Title
CN108415832B (en) Interface automation test method, device, equipment and storage medium
CN108519967B (en) Chart visualization method and device, terminal and storage medium
EP3301580B1 (en) System for automatically generating test data for testing applications
CN111722839B (en) Code generation method and device, electronic equipment and storage medium
WO2017046729A1 (en) Natural language interface to databases
US20170083615A1 (en) Robust and Readily Domain-Adaptable Natural Language Interface to Databases
US9298683B2 (en) Generation of test data using text analytics
CN109656815B (en) Test statement writing method, device and medium with configuration file and electronic equipment
CN109840192B (en) Method and device for automatic testing
CN110674117A (en) Data modeling method and device, computer readable medium and electronic equipment
US20220350857A1 (en) Methods and systems for browser extension used to generate relative xpath, absolute xpath and/or css selectors
CN111125064A (en) Method and device for generating database mode definition statement
CN113326247A (en) Cloud data migration method and device and electronic equipment
CN110704325B (en) Data processing method and device, computer storage medium and electronic equipment
CN109460363B (en) Automatic testing method and device, electronic equipment and computer readable medium
CN112181962A (en) Report form checking method, device, equipment and storage medium
CN111190905A (en) Database table processing method and device and electronic equipment
CN113962597A (en) Data analysis method and device, electronic equipment and storage medium
CN110888794A (en) Interface test method and device
CN109697141B (en) Method and device for visual testing
CN111666201A (en) Regression testing method, device, medium and electronic equipment
CN111916164B (en) Method and device for realizing center-started investigation system in clinical research
CN114968725A (en) Task dependency relationship correction method and device, computer equipment and storage medium
CN112328473A (en) Code automation integration test method and device and electronic equipment
CN116661758B (en) Method, device, electronic equipment and medium for optimizing log framework configuration

Legal Events

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