CN109254908A - Visualize regression testing method, device, terminal device and readable storage medium storing program for executing - Google Patents

Visualize regression testing method, device, terminal device and readable storage medium storing program for executing Download PDF

Info

Publication number
CN109254908A
CN109254908A CN201810879005.4A CN201810879005A CN109254908A CN 109254908 A CN109254908 A CN 109254908A CN 201810879005 A CN201810879005 A CN 201810879005A CN 109254908 A CN109254908 A CN 109254908A
Authority
CN
China
Prior art keywords
test
page
regression
visualization
tested
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
CN201810879005.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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201810879005.4A priority Critical patent/CN109254908A/en
Publication of CN109254908A publication Critical patent/CN109254908A/en
Pending legal-status Critical Current

Links

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/362Software debugging
    • G06F11/366Software debugging using diagnostics

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 invention relates to a kind of visualization regression testing method, device, terminal device and readable storage medium storing program for executing, wherein the visualization regression testing method includes the following steps: the address for obtaining the page to be tested;The address that the page to be tested is accessed on the visualization regression test platform pre-established based on Puppeteer frame, tests the page to be tested, generates test result;According to the test result, shown on the visualization regression test platform.The present invention realizes the visual testing of Puppeteer frame, and tester is in the case where being not required to many front ends of to master and writing the knowledge of script, so that it may test job is completed, it is easily operated, and reduce the workload of tester;Have the function of to automatically detect page performance, bandwagon effect etc. simultaneously, greatly optimizes the efficiency of Automation regression testing.

Description

Visualize regression testing method, device, terminal device and readable storage medium storing program for executing
Technical field
The present invention relates to Internet technical field more particularly to a kind of visualization regression testing methods, device, terminal device And non-transitorycomputer readable storage medium.
Background technique
With the fast development of computer technology, need to the page constantly update to meet the needs of users, the page just Before formula is online, due to developer need for continuously emerge aiming at the problem that and user demand the page is improved, therefore accordingly Ground is also required to carry out regression test to the page, as whether test page function can be used, whether style sheet meets expection, page Whether face performance reaches requirement.
Usually when in face of complexity, numerous page regression tests, it can all be write using browser phantom frame automatic Change test script, now more commonly used is Puppeteer frame, but when using the framework test page, generally requires to slap The knowledge that script is write in many front ends is held, causes the workload of maintenance test scripted code too big, increases the work of tester Make difficulty, so that test job is difficult to promote.
Summary of the invention
To overcome the problems in correlation technique, the present invention provides a kind of visualization regression testing method, device, terminal Equipment and non-transitorycomputer readable storage medium.
According to a first aspect of the embodiments of the present invention, a kind of visualization regression testing method is provided, is included the following steps:
Obtain the address of the page to be tested;
The page to be tested is accessed on the visualization regression test platform pre-established based on Puppeteer frame The page to be tested is tested in address, generates test result;
According to the test result, shown on the visualization regression test platform.
It is described in one of the embodiments, that the page to be tested is tested, generate test result the step of wrap It includes:
Test pattern is chosen on the visualization regression test platform, according to the test pattern, calls Puppeteer API carries out the test of corresponding test pattern to the page to be tested, generates test result.
The test pattern is page fault regression test in one of the embodiments, described to the page to be tested The step of face carries out the test of corresponding test pattern, generates test result include:
Current test page is detected with the presence or absence of Page OnError event, if so, returning to test errors mark, generates institute State the underproof test result of page fault regression test.
In one of the embodiments, the test pattern be performance regression test, it is described to the page to be tested into The step of test of the corresponding test pattern of row, generation test result includes: the window for checking current test page Perfomance API generates the underproof test knot of the performance regression test if the data returned are greater than preset threshold Fruit.
In one of the embodiments, the test pattern be regression test, it is described to the page to be tested into Before the step of test of the corresponding test pattern of row, generation test result, further includes:
Obtain the address of the benchmark page;
The ground of the benchmark page is accessed on the visualization regression test platform pre-established based on Puppeteer frame Location, and generate benchmark page snapshot;
It is described to access the page to be tested on the visualization regression test platform pre-established based on Puppeteer frame After the step of address in face, further includes:
Generate page snapshot to be tested;
In the step of test for carrying out corresponding test pattern to the page to be tested, generation test result, comprising:
The benchmark page snapshot and the page snapshot to be tested are compared according to default comparison algorithm, obtained pair Than as a result, generating regression test result according to the comparing result.
The visualization regression test platform is provided with according to test pattern configuration in one of the embodiments, Operating list.
The operating list includes running configuration column, view dimensions setting column, test pattern in one of the embodiments, Choose column.
It is further comprised the steps of: in one of the embodiments, according to the test result, the page to be tested is adjusted It is whole.
According to a second aspect of the embodiments of the present invention, a kind of visualization regression test device is provided, comprising:
Module is obtained, is configured as obtaining the address of the page to be tested;
Test module is configured as complaining to the higher authorities about an injustice and request fair settlement in the visualization regression test platform pre-established based on Puppeteer frame The page to be tested is tested in the address for asking the page to be tested, generates test result;
Display module is configured as being shown on the visualization regression test platform according to the test result.
The test module is also configured in one of the embodiments,
Test pattern is chosen on the visualization regression test platform, according to the test pattern, calls Puppeteer API carries out the test of corresponding test pattern to the page to be tested, generates test result.
The test pattern is page fault regression test in one of the embodiments, and the test module is also matched It is set to:
Current test page is detected with the presence or absence of Page OnError event, if so, returning to test errors mark, generates institute State the underproof test result of page fault regression test.
The test pattern is performance regression test in one of the embodiments, and the test module is also configured to
It checks the window perfomance API of current test page, if the data returned are greater than preset threshold, gives birth to At the underproof test result of performance regression test.
The test pattern is regression test in one of the embodiments, and the acquisition module is also configured to
Obtain the address of the benchmark page;
The ground of the benchmark page is accessed on the visualization regression test platform pre-established based on Puppeteer frame Location, and generate benchmark page snapshot;
Generate page snapshot to be tested;
The test module is also configured to
The benchmark page snapshot and the page snapshot to be tested are compared according to default comparison algorithm, obtained pair Than as a result, generating regression test result according to the comparing result.
The visualization regression test platform is provided with according to test pattern configuration in one of the embodiments, Operating list.
The operating list includes running configuration column, view dimensions setting column, test pattern in one of the embodiments, Choose column.
The visualization regression test device in one of the embodiments, further include:
Module is adjusted, is configured as being adjusted the page to be tested according to the test result.
According to a third aspect of the embodiments of the present invention, a kind of terminal device is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
The step of executing visualization regression testing method described in any of the above-described technical solution.
According to a fourth aspect of the embodiments of the present invention, a kind of non-transitorycomputer readable storage medium is provided, when described When instruction in storage medium is executed by the processor of mobile terminal, so that mobile terminal is able to carry out a kind of visualization recurrence survey Method for testing, the method includes described in any of the above-described technical solution the step of visualization regression testing method.
According to a fifth aspect of the embodiments of the present invention, a kind of application program/computer program product is provided, when the storage When instruction in medium is executed by the processor of terminal device, so that terminal device is able to carry out a kind of visualization regression test side Method, the method includes described in any of the above-described technical solution the step of visualization regression testing method.
The technical solution that the embodiment of the present invention provides can include the following benefits: the present invention is being based on The address that the page to be tested is accessed on the visualization regression test platform that Puppeteer frame pre-establishes, to described The page to be tested is tested, and test result is generated;And according to the test result, on the visualization regression test platform It is shown, to realize the visual testing of Puppeteer frame, tester writes foot being not required to many front ends of to master In the case where this knowledge, so that it may test job is completed, it is easily operated, reduce the workload and testing cost of tester; Have the function of to automatically detect page performance, bandwagon effect etc. simultaneously, greatly optimizes the efficiency of Automation regression testing.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is a kind of flow chart for visualizing regression testing method shown according to an exemplary embodiment.
Fig. 2 is a kind of block diagram for visualizing regression test device shown according to an exemplary embodiment.
Fig. 3 is a kind of block diagram of terminal device shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Puppeteer frame is the library Node for passing through DevTools protocol integrated test system headless Chrome;It can lead to The API for crossing the offer of Puppeteer frame directly controls Chrome and simulates most of user's operation to carry out UI Test or conduct Crawler accession page collects data.
Fig. 1 is a kind of flow chart for visualizing regression testing method shown according to an exemplary embodiment, such as Fig. 1 institute Show, the visualization regression testing method is in terminal device, comprising the following steps:
In step s 11, the address of the page to be tested is obtained.
For the present embodiment, the address of the page to be tested can be the URL of the page to be tested, position of the URL to resource It sets and provides a kind of abstract recognition methods, and realize Resource orientation in this way, carry out system to resource various Operation, such as accesses, updates, replaces and searches its attribute.The page to be tested be completed in the case where developing environment it is informal on The page of line is the upgraded version of the benchmark page, and the improvement such as additions and deletions, modification operation has been carried out on the basis of the benchmark page, The page to be tested is both needed to ensure that code operation is errorless by testing before online, and can realize the scheduled function of upgraded version Energy.The benchmark page is code on the line for allowing to run in current production environment, i.e. the benchmark page has applied to actually answer With scene, code operation result can admirably achieve anticipation.
In step s 12, on the visualization regression test platform pre-established based on Puppeteer frame described in access The page to be tested is tested in the address of the page to be tested, generates test result.
The Puppeteer frame can be used for the behavior of simulation browser, it is the headless based on Chrome kernel Browser phantom frame, the API that can be provided by Puppeteer frame directly control Chrome kernel to simulate most of use The operation behavior at family, such as access, click behavior, page regression test of the invention is also based on this.It is being based on Puppeteer frame A visualization regression test platform is pre-established under frame, utilizes the page to be tested described in the visualization regression test platform access Address, generate test result, to realize the automatic test of the page to be tested.
In step s 13, it according to the test result, is shown on the visualization regression test platform.
Is visualized by regression test platform and is automatically generated and test result phase according to the test result for the present embodiment The test report answered is shown on the visualization regression test platform, quickly understands test result convenient for tester.
The present invention accesses described to be tested on the visualization regression test platform pre-established based on Puppeteer frame The address of the page generates test result to test the page to be tested;And according to the test result, described It is shown on visualization regression test platform, to realize the visual testing of Puppeteer frame, tester is being not required to In the case that the knowledge of script is write in many front ends of to master, so that it may test job is completed, it is easily operated, reduce tester Workload and testing cost;Have the function of to automatically detect page performance, bandwagon effect etc. simultaneously, greatly optimize automatic Change the efficiency of regression test.
It is described that the page to be tested is tested in one of the embodiments, in the step S12, it generates The step of test result includes: to choose test pattern on the visualization regression test platform, according to the test pattern, is adjusted With Puppeteer API, the test of corresponding test pattern is carried out to the page to be tested, generates test result.
For the present embodiment, the test pattern includes page fault regression test, performance regression test and regression Test etc., can add test pattern on the visualization regression test platform as needed.Institute in one of the embodiments, Stating test pattern is page fault regression test, and the test that corresponding test pattern is carried out to the page to be tested generates The step of test result includes: the current test page of detection with the presence or absence of Page OnError event, if so, returning to test errors Mark, generates the underproof test result of page fault regression test.
For the present embodiment, when detecting current test page there are when page fault events, according to the class of error event Type, automatically generates corresponding test errors mark, and test errors mark may be used to indicate type of error, error message, mistake The error message that the file and line number that the thread and mistake of generation occur fill in frame describes frame, flat convenient for visualization regression test Platform is identified according to the test errors, generates corresponding test report.
In one of the embodiments, the test pattern be performance regression test, it is described to the page to be tested into The step of test of the corresponding test pattern of row, generation test result includes: the window for checking current test page Perfomance API generates the underproof test knot of the performance regression test if the data returned are greater than preset threshold Fruit.
In one of the embodiments, the test pattern be regression test, it is described to the page to be tested into Before the step of test of the corresponding test pattern of row, generation test result, further includes:
Obtain the address of the benchmark page;
The ground of the benchmark page is accessed on the visualization regression test platform pre-established based on Puppeteer frame Location, and generate benchmark page snapshot;
It is described to access the page to be tested on the visualization regression test platform pre-established based on Puppeteer frame After the step of address in face, further includes:
Generate page snapshot to be tested;
In the step of test for carrying out corresponding test pattern to the page to be tested, generation test result, comprising:
The benchmark page snapshot and the page snapshot to be tested are compared according to default comparison algorithm, obtained pair Than as a result, generating regression test result according to the comparing result.
For the present embodiment, when test, after the URL for obtaining the benchmark page and the page to be tested respectively, Puppeteer is called Frame API accesses test to the benchmark page and the page to be tested respectively, and generates corresponding Snipping Tool, finally uses Default comparison algorithm, such as image diff algorithm are corresponding same to test page Snipping Tool and benchmark page Snipping Tool Key node compares, and comparison obtains the different information between two groups of snapshots, and according to the different information, generates sample and return Return test report.Wherein, the default comparison algorithm can also be that other can be realized the comparison algorithm of snapshot comparison, the present invention Embodiment does not limit this.
In addition, can be directed to different types of different information in practical application scene, such as newly-increased element deletes element, member The types such as plain pattern modification and the change of element content of text, are highlighted in the regression test report using different colors Display marks the corresponding page elements of different types of different information, is compared with further increasing snapshot during regression test Visualization.
The visualization regression test platform is provided with according to test pattern configuration in one of the embodiments, Operating list, the operating list includes running configuration column, view dimensions setting column, test pattern selection column, for described Before the page to be tested carries out regression test, relevant parameter is set on the visualization regression test platform in advance.
The visualization regression testing method is further comprised the steps of: according to the test result in one of the embodiments, The page to be tested is adjusted.
The present embodiment can be positioned according to the error message of the test result to corresponding after generating test result Code position under the line of the page to be tested, and according to code on line or preset code adjustment mode to code under the line of the part It is adjusted, to eliminate the error message of the page to be tested, to realize Automation regression testing.
Fig. 2 is a kind of visualization regression test device block diagram shown according to an exemplary embodiment.Referring to Fig. 2, the dress It sets including obtaining module 21, test module 22 and display module 23.
The acquisition module 21 is configured as obtaining the address of the page to be tested.
For the present embodiment, the address of the page to be tested can be the URL of the page to be tested, position of the URL to resource It sets and provides a kind of abstract recognition methods, and realize Resource orientation in this way, carry out system to resource various Operation, such as accesses, updates, replaces and searches its attribute.The page to be tested be completed in the case where developing environment it is informal on The page of line is the upgraded version of the benchmark page, and the improvement such as additions and deletions, modification operation has been carried out on the basis of the benchmark page, The page to be tested is both needed to ensure that code operation is errorless by testing before online, and can realize the scheduled function of upgraded version Energy.The benchmark page is code on the line for allowing to run in current production environment, i.e. the benchmark page has applied to actually answer With scene, code operation result can admirably achieve anticipation.
The test module 22 is configured as on the visualization regression test platform pre-established based on Puppeteer frame The page to be tested is tested in the address for accessing the page to be tested, generates test result.
The Puppeteer frame can be used for the behavior of simulation browser, it is the headless based on Chrome kernel Browser phantom frame can directly control Chrome kernel by the API of the offer of Puppeteer frame to simulate major part The operation behavior of user, such as access, click behavior, page regression test of the invention is also based on this.It is being based on Puppeteer A visualization regression test platform is pre-established under frame, utilizes page to be tested described in the visualization regression test platform access The address in face generates test result, realizes the automatic test of the page to be tested.
The display module 23 is configured as being shown on the visualization regression test platform according to the test result Show.
Is visualized by regression test platform and is automatically generated and test result phase according to the test result for the present embodiment The test report answered is shown on the visualization regression test platform, quickly understands test result convenient for tester.
The present invention accesses described to be tested on the visualization regression test platform pre-established based on Puppeteer frame The address of the page generates test result to test the page to be tested;And according to the test result, described It is shown on visualization regression test platform, to realize the visual testing of Puppeteer frame, tester is being not required to In the case that the knowledge of script is write in many front ends of to master, so that it may test job is completed, it is easily operated, reduce tester Workload and testing cost;Have the function of to automatically detect page performance, bandwagon effect etc. simultaneously, greatly optimize automatic Change the efficiency of regression test.
The test module is also configured on the visualization regression test platform in one of the embodiments, Test pattern is chosen, according to the test pattern, Puppeteer API is called, the page to be tested is accordingly tested The test of mode generates test result.
For the present embodiment, the test pattern includes page fault regression test, performance regression test and regression Test etc., can add test pattern on the visualization regression test platform as needed.
The test pattern is page fault regression test in one of the embodiments, and the test module is also matched It is set to: detecting current test page with the presence or absence of Page OnError event, if so, test errors mark is returned to, described in generation The underproof test result of page fault regression test.
For the present embodiment, when detecting current test page there are when page fault events, according to the class of error event Type, automatically generates corresponding test errors mark, and test errors mark may be used to indicate type of error, error message, mistake The error message that the file and line number that the thread and mistake of generation occur fill in frame describes frame, flat convenient for visualization regression test Platform is identified according to the test errors, generates corresponding test report.
In some embodiments, the test pattern is performance regression test, and the test module is also configured to check The window perfomance API of current test page generates the performance and returns if the data returned are greater than preset threshold Return the test result of test failure.
The test pattern is regression test in one of the embodiments, and the acquisition module is also configured to
Obtain the address of the benchmark page;On the visualization regression test platform pre-established based on Puppeteer frame The address of the benchmark page is accessed, and generates benchmark page snapshot;Generate page snapshot to be tested.
The test module is also configured to
The benchmark page snapshot and the page snapshot to be tested are compared according to default comparison algorithm, obtained pair Than as a result, generating regression test result according to the comparing result.
For the present embodiment, when test, after the URL for obtaining the benchmark page and the page to be tested respectively, Puppeteer is called Frame API accesses test to the benchmark page and the page to be tested respectively, and generates corresponding Snipping Tool, finally uses Default comparison algorithm, such as image diff algorithm are corresponding same to test page Snipping Tool and benchmark page Snipping Tool Key node compares, and comparison obtains the different information between two groups of snapshots, and according to the different information, generates sample and return Return test report.Wherein, the default comparison algorithm can also be that other can be realized the comparison algorithm of snapshot comparison, the present invention Embodiment does not limit this.
In addition, can be directed to different types of different information in practical application scene, such as newly-increased element deletes element, member The types such as plain pattern modification and the change of element content of text, are highlighted in the regression test report using different colors Display marks the corresponding page elements of different types of different information, is compared with further increasing snapshot during regression test Visualization.
The visualization regression test platform is provided with according to test pattern configuration in one of the embodiments, Operating list, the operating list includes running configuration column, view dimensions setting column, test pattern selection column, for described Before the page to be tested carries out regression test, relevant parameter has been configured on the visualization regression test platform in advance.
Described device in one of the embodiments, further include: adjustment module is configured as according to the test result, The page to be tested is adjusted.
The present embodiment can be positioned according to the error message of the test result to corresponding after generating test result Code position under the line of the page to be tested, and according to code on line or preset code adjustment mode to code under the line of the part It is adjusted, to eliminate the error message of the page to be tested, to realize Automation regression testing.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 3 is a kind of block diagram of terminal device 800 shown according to an exemplary embodiment.For example, terminal device 800 can To be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices are good for Body equipment, personal digital assistant etc..
Terminal device 800 may include following one or more components: display, processing component 802, memory 804, electricity Power component 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814, with And communication component 816.
The integrated operation of the usual controlling terminal equipment 800 of processing component 802, such as with display, call, data are logical Letter, camera operation and record operate associated operation.Processing component 802 may include one or more processors 820 to hold Row instruction, to perform all or part of the steps of the methods described above.In addition, processing component 802 may include one or more moulds Block, convenient for the interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module, with Facilitate the interaction between multimedia component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in equipment 800.These data are shown Example includes the instruction of any application or method for operating on terminal device 800, contact data, telephone directory number According to, message, picture, video etc..Memory 804 can by any kind of volatibility or non-volatile memory device or they Combination realize, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable Programmable read only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, quick flashing Memory, disk or CD.
Power supply module 806 provides electric power for the various assemblies of terminal device 800.Power supply module 806 may include power supply pipe Reason system, one or more power supplys and other with for terminal device 800 generate, manage, and distribute the associated component of electric power.
Multimedia component 808 includes the screen of one output interface of offer between the terminal device 800 and user. In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch surface Plate, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touches Sensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding The boundary of movement, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, Multimedia component 808 includes a front camera and/or rear camera.When equipment 800 is in operation mode, as shot mould When formula or video mode, front camera and/or rear camera can receive external multi-medium data.Each preposition camera shooting Head and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike Wind (MIC), when terminal device 800 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone It is configured as receiving external audio signal.The received audio signal can be further stored in memory 804 or via logical Believe that component 816 is sent.In some embodiments, audio component 810 further includes a loudspeaker, is used for output audio signal.
I/O interface 812 provides interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 814 includes one or more sensors, for providing the state of various aspects for terminal device 800 Assessment.For example, sensor module 814 can detecte the state that opens/closes of equipment 800, the relative positioning of component, such as institute The display and keypad that component is terminal device 800 are stated, sensor module 814 can also detect terminal device 800 or terminal The position change of 800 1 components of equipment, the existence or non-existence that user contacts with terminal device 800,800 orientation of terminal device Or the temperature change of acceleration/deceleration and terminal device 800.Sensor module 814 may include proximity sensor, be configured to It detects the presence of nearby objects without any physical contact.Sensor module 814 can also include optical sensor, such as CMOS or ccd image sensor, for being used in imaging applications.In some embodiments, which can be with Including acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between terminal device 800 and other equipment. Terminal device 800 can access the wireless network based on communication standard, such as WiFi, carrier network (such as 2G, 3G, 4G or 5G), Or their combination.In one exemplary embodiment, communication component 816 receives via broadcast channel and comes from external broadcasting management The broadcast singal or broadcast related information of system.In one exemplary embodiment, the communication component 816 further includes that near field is logical (NFC) module is believed, to promote short range communication.For example, radio frequency identification (RFID) technology, infrared data association can be based in NFC module Meeting (IrDA) technology, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, terminal device 800 can be by one or more application specific integrated circuit (ASIC), number Word signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 804 of instruction, above-metioned instruction can be executed by the processor 820 of terminal device 800 to complete the above method.Example Such as, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, soft Disk and optical data storage devices etc..
When the instruction in the storage medium is executed by the processor of mobile terminal, so that mobile terminal is able to carry out one Kind visualization regression testing method, the method includes visualization regression testing methods described in any of the above-described technical solution Step.
The present invention also provides a kind of application program/computer program products, when the instruction in the storage medium is by terminal When the processor of equipment executes, so that terminal device is able to carry out a kind of visualization regression testing method, the method includes upper The step of stating visualization regression testing method described in any one technical solution.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of visualization regression testing method characterized by comprising
Obtain the address of the page to be tested;
The ground of the page to be tested is accessed on the visualization regression test platform pre-established based on Puppeteer frame The page to be tested is tested in location, generates test result;
According to the test result, shown on the visualization regression test platform.
2. visualization regression testing method according to claim 1, which is characterized in that it is described to the page to be tested into Row test, generate test result the step of include:
Test pattern is chosen on the visualization regression test platform, according to the test pattern, calls Puppeteer API carries out the test of corresponding test pattern to the page to be tested, generates test result.
3. visualization regression testing method according to claim 2, which is characterized in that the test pattern is page fault The step of regression test, the test that corresponding test pattern is carried out to the page to be tested, generation test result includes: inspection Current test page is surveyed with the presence or absence of Page OnError event, if so, returning to test errors mark, generates the page fault The underproof test result of regression test.
4. visualization regression testing method according to claim 2, which is characterized in that the test pattern is performance recurrence The step of test, the test that corresponding test pattern is carried out to the page to be tested, generation test result includes: to check to work as The window perfomance API of preceding test page generates the performance and returns if the data returned are greater than preset threshold The test result of test failure.
5. visualization regression testing method according to claim 2, which is characterized in that the test pattern is regression Before the step of test, the test that corresponding test pattern is carried out to the page to be tested, generation test result, further includes:
Obtain the address of the benchmark page;
The address of the benchmark page is accessed on the visualization regression test platform pre-established based on Puppeteer frame, And generate benchmark page snapshot;
It is described to access the page to be tested on the visualization regression test platform pre-established based on Puppeteer frame After the step of address, further includes:
Generate page snapshot to be tested;
In the step of test for carrying out corresponding test pattern to the page to be tested, generation test result, comprising:
The benchmark page snapshot and the page snapshot to be tested are compared according to default comparison algorithm, obtain comparison knot Fruit generates regression test result according to the comparing result.
6. visualization regression testing method according to claim 2, which is characterized in that the visualization regression test platform It is provided with the operating list configured according to the test pattern.
7. visualization regression testing method according to claim 6, which is characterized in that the operating list includes that operation is matched It sets column, view dimensions setting column, test pattern and chooses column.
8. a kind of visualization regression test device characterized by comprising
Module is obtained, is configured as obtaining the address of the page to be tested;
Test module is configured as accessing institute on the visualization regression test platform pre-established based on Puppeteer frame The page to be tested is tested in the address for stating the page to be tested, generates test result;
Display module is configured as being shown on the visualization regression test platform according to the test result.
9. a kind of terminal device characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
The step of executing visualization regression testing method according to any one of claims 1 to 7.
10. a kind of non-transitorycomputer readable storage medium, which is characterized in that when the instruction in the storage medium is by moving When the processor of terminal executes, so that mobile terminal is able to carry out a kind of visualization regression testing method, the method includes power Benefit requires the step of 1 to 7 described in any item visualization regression testing methods.
CN201810879005.4A 2018-08-03 2018-08-03 Visualize regression testing method, device, terminal device and readable storage medium storing program for executing Pending CN109254908A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810879005.4A CN109254908A (en) 2018-08-03 2018-08-03 Visualize regression testing method, device, terminal device and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810879005.4A CN109254908A (en) 2018-08-03 2018-08-03 Visualize regression testing method, device, terminal device and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
CN109254908A true CN109254908A (en) 2019-01-22

Family

ID=65049283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810879005.4A Pending CN109254908A (en) 2018-08-03 2018-08-03 Visualize regression testing method, device, terminal device and readable storage medium storing program for executing

Country Status (1)

Country Link
CN (1) CN109254908A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083530A (en) * 2019-03-21 2019-08-02 平安普惠企业管理有限公司 Data verification method, device and computer equipment based on automatic Verification tool
CN110851366A (en) * 2019-11-18 2020-02-28 中国银行股份有限公司 Method and device for realizing regression test
CN113065055A (en) * 2021-04-21 2021-07-02 平安国际智慧城市科技股份有限公司 News information capturing method and device, electronic equipment and storage medium
CN113495838A (en) * 2020-04-08 2021-10-12 阿里巴巴集团控股有限公司 Page testing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631709A (en) * 2012-08-29 2014-03-12 腾讯科技(深圳)有限公司 Method and system for testing double-kernel browser
CN104794056A (en) * 2015-04-29 2015-07-22 北京京东尚科信息技术有限公司 Web browser compatibility testing method and device
CN107247660A (en) * 2017-05-05 2017-10-13 北京奇虎科技有限公司 The method of testing and test device of a kind of interface
CN107678937A (en) * 2017-07-26 2018-02-09 上海壹账通金融科技有限公司 Page compatibility detection method, device, server and medium
CN107885662A (en) * 2017-11-09 2018-04-06 郑州云海信息技术有限公司 A kind of method of testing based on more browser multi-version compatibility sex chromosome mosaicisms

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631709A (en) * 2012-08-29 2014-03-12 腾讯科技(深圳)有限公司 Method and system for testing double-kernel browser
CN104794056A (en) * 2015-04-29 2015-07-22 北京京东尚科信息技术有限公司 Web browser compatibility testing method and device
CN107247660A (en) * 2017-05-05 2017-10-13 北京奇虎科技有限公司 The method of testing and test device of a kind of interface
CN107678937A (en) * 2017-07-26 2018-02-09 上海壹账通金融科技有限公司 Page compatibility detection method, device, server and medium
CN107885662A (en) * 2017-11-09 2018-04-06 郑州云海信息技术有限公司 A kind of method of testing based on more browser multi-version compatibility sex chromosome mosaicisms

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083530A (en) * 2019-03-21 2019-08-02 平安普惠企业管理有限公司 Data verification method, device and computer equipment based on automatic Verification tool
CN110851366A (en) * 2019-11-18 2020-02-28 中国银行股份有限公司 Method and device for realizing regression test
CN113495838A (en) * 2020-04-08 2021-10-12 阿里巴巴集团控股有限公司 Page testing method and device
CN113495838B (en) * 2020-04-08 2024-01-09 阿里巴巴集团控股有限公司 Page testing method and device
CN113065055A (en) * 2021-04-21 2021-07-02 平安国际智慧城市科技股份有限公司 News information capturing method and device, electronic equipment and storage medium
CN113065055B (en) * 2021-04-21 2024-04-02 深圳赛安特技术服务有限公司 News information capturing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109582579B (en) Application program testing method and device, electronic equipment and storage medium
CN109254908A (en) Visualize regression testing method, device, terminal device and readable storage medium storing program for executing
CN110413501B (en) Browser compatibility testing method, device and system and readable storage medium
CN112148579B (en) User interface testing method and device
CN106528389A (en) Performance evaluation method and device for system smoothness and terminal
CN109213668B (en) Operation recording method and device and terminal
CN104317699A (en) Application program verifying method and device
CN115982024A (en) Test script generation method, test script generation device, storage medium, and program product
CN104991857B (en) Trace debug method and device
CN116933707A (en) Test method, device, equipment and medium for design circuit
CN109684123B (en) Problem resource positioning method, device, terminal and storage medium
WO2018153288A1 (en) Numerical value transfer method, apparatus, device and storage medium
CN107819944A (en) Delet method, device, equipment and the storage medium of short message
CN115408277B (en) Interface testing method and device
CN104765686B (en) The method and device of test application program
CN112416751A (en) Processing method and device for interface automation test and storage medium
CN115543831A (en) Test script generation method, device, equipment and storage medium
CN112988304B (en) Recording method and device of operation mode, electronic equipment and storage medium
CN115357829A (en) Method and device for exposing and burying point of page control and storage medium
CN114896165A (en) Testing method and device of conversation robot system, electronic equipment and storage medium
CN107203315A (en) Processing method, device and the terminal of click event
CN114428737A (en) Communication method, device, equipment and storage medium based on micro service system
CN106533841A (en) Method, apparatus and system for testing protocol consistency of user identification module cards
CN115357519B (en) Test method, device, equipment and medium
CN107193622A (en) Processing method, device and the terminal of code compilation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190122