CN112148191A - Test image uploading method, device, equipment and storage medium based on browser - Google Patents

Test image uploading method, device, equipment and storage medium based on browser Download PDF

Info

Publication number
CN112148191A
CN112148191A CN202011033367.5A CN202011033367A CN112148191A CN 112148191 A CN112148191 A CN 112148191A CN 202011033367 A CN202011033367 A CN 202011033367A CN 112148191 A CN112148191 A CN 112148191A
Authority
CN
China
Prior art keywords
screenshot
browser
test image
page
program
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
CN202011033367.5A
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.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202011033367.5A priority Critical patent/CN112148191A/en
Publication of CN112148191A publication Critical patent/CN112148191A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the field of artificial intelligence, in particular to a test image uploading method, device, equipment and storage medium based on a browser. The method comprises the following steps: receiving a screenshot instruction through a browser extension program, and performing screenshot according to the screenshot instruction to obtain a test image; skipping to a defect-associated page through the browser extension program according to the test image, wherein the test image is displayed on the defect-associated page; inquiring the defect corresponding to the test image through the defect associated page; and uploading the inquired defects and the test image in an associated manner. The method can improve the treatment efficiency.

Description

Test image uploading method, device, equipment and storage medium based on browser
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a method, an apparatus, a device, and a storage medium for uploading a test image based on a browser.
Background
With the development of computer technology, a variety of in-line tools have emerged, which need to be tested before they are brought online.
However, in the testing process, the tester needs to submit a large number of defect lists, and for each defect list, the manual screenshot needs to be performed and saved to the local, a defect tool is opened, a defect title is filled, a defect description is written, the defect type is selected, and the like, so that the workload of the tester is greatly increased.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a device and a storage medium for uploading a test image based on a browser, which can improve the test efficiency.
A browser-based test image uploading method, the method comprising:
receiving a screenshot instruction through a browser extension program, and performing screenshot according to the screenshot instruction to obtain a test image;
skipping to a defect-associated page through the browser extension program according to the test image, wherein the test image is displayed on the defect-associated page;
inquiring the defect corresponding to the test image through the defect associated page;
and uploading the inquired defects and the test image in an associated manner.
In one embodiment, the receiving a screenshot instruction through a browser extension program, and performing screenshot according to the screenshot instruction to obtain a test image includes:
receiving a screenshot instruction through a browser extension program, and acquiring a page identifier of a current active page;
establishing a channel link between the browser extension program and a browser native program;
acquiring a visible area and a screenshot mode corresponding to the screenshot instruction through the browser extension program, and sending the determined screenshot mode to the browser native program based on the channel link;
and after the corresponding test image is obtained through the browser native program according to the screenshot mode and the page identification, the obtained test image is sent to the browser extension program based on the channel link.
In one embodiment, the loading manner of the browser extension program includes:
packaging codes of the browser extension program into a preset file through a packaging extension program of the browser;
and storing the preset file into a browser extension program set.
In one embodiment, the test image is captured in a manner including one or more of a full screen capture, a visible area capture, and a selected area capture.
In one embodiment, the full screen shot comprises:
judging whether a scroll bar of a page corresponding to the page identifier can move or not through the browser native program;
and when the scroll bar of the page corresponding to the page identifier is movable, controlling the scroll bar corresponding to the page to scroll through the native program of the browser so as to acquire the image of the whole page corresponding to the page identifier.
In one embodiment, the select area screenshot includes:
acquiring the position information of the start screenshot through a browser native program;
recording the screenshot area information after the scroll bar is rolled;
and obtaining the screenshot of the selected area according to the screenshot starting position information and the screenshot area information.
A browser-based test image uploading apparatus, the apparatus comprising:
the screenshot module is used for receiving a screenshot instruction through a browser extension program and performing screenshot according to the screenshot instruction to obtain a test image;
the display module is used for jumping to a defect associated page through the browser extension program according to the test image, and the test image is displayed on the defect associated page;
the correlation module is used for inquiring the defect corresponding to the test image through the defect correlation page;
and the uploading module is used for uploading the inquired defects and the test image in a correlation manner.
In one embodiment, the screenshot module comprises:
the page identification acquisition unit is used for receiving the screenshot instruction through the browser extension program and acquiring the page identification of the current active page;
the channel link establishing unit is used for establishing a channel link between the browser extension program and the browser native program;
the sending unit is used for acquiring a visible area and a screenshot mode corresponding to the screenshot instruction through the browser extension program and sending the determined screenshot mode to the browser native program based on the channel link;
and the screenshot unit is used for acquiring a corresponding test image through the browser native program according to the screenshot mode and the page identification, and then sending the acquired test image to the browser extension program based on the channel link.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the above method when executing the computer program.
A computer storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
According to the test image uploading method and device based on the browser, the computer equipment and the storage medium, only the browser extension program needs to be loaded into the browser, the screenshot is carried out after the screenshot instruction is received, the corresponding defect is inquired according to the defect association page, the inquired defect and the test image can be uploaded in an association mode, the screenshot does not need to be stored locally, then the corresponding defect management tool is opened for defect editing and the like, operation steps are reduced, and processing efficiency is improved.
Drawings
FIG. 1 is a diagram illustrating an exemplary application scenario of a method for uploading a test image based on a browser;
FIG. 2 is a flowchart illustrating a method for uploading a test image based on a browser in one embodiment;
FIG. 3 is a diagram of an association page in one embodiment;
FIG. 4 is a schematic flow chart of step S202 in the embodiment shown in FIG. 2;
FIG. 5 is a block diagram of an embodiment of a browser-based test image uploading apparatus;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The test image uploading method based on the browser can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 receives a screenshot instruction through a browser extension program, and performs screenshot according to the screenshot instruction to obtain a test image; and jumping to a defect-associated page through a browser extension program according to the test image, wherein the defect-associated page displays the test image, so that the terminal 102 inquires the defect corresponding to the test image through the defect-associated page, and then associates and uploads the inquired defect and the test image to the server 104. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a method for uploading a test image based on a browser is provided, which is described by taking the method as an example for being applied to the terminal in fig. 1, and includes the following steps:
s202: and receiving a screenshot instruction through a browser extension program, and performing screenshot according to the screenshot instruction to obtain a test image.
Specifically, the browser extension program is self-defined and is used for receiving a screenshot instruction, performing screenshot, displaying a test image after screenshot and a test image operation mode, and storing the test image according to the selected test image operation mode or uploading the test image after inquiring defects corresponding to the test image.
The screenshot command is input by a user, namely the corresponding screenshot command can be generated by the terminal by clicking an icon corresponding to the browser extension program. Optionally, the screenshot manner may include one or more of a full screen screenshot, a visible area screenshot, and a selected area screenshot. Wherein the full screen capture: the entire web page (including the scroll bar drop down page) is automatically captured. Visible area screenshot: a web page (not containing a drop down page) of the visible area is automatically captured. Screenshot in the selected area: and selecting a screenshot area by self. When a user inputs a screenshot instruction, the user can select a screenshot instruction icon first, and then the terminal displays a lower menu, so that the user selects a menu bar of a corresponding screenshot mode to realize input of the screenshot mode. And the browser extension program performs screenshot on the current page according to the input screenshot mode to obtain a test image, wherein generally when the test has defects, a user can input a screenshot instruction so as to obtain the corresponding test image.
S204: and jumping to a defect associated page through a browser extension program according to the test image, wherein the test image is displayed on the defect associated page.
Specifically, the defect-associated page is automatically jumped after screenshot, and may be configured in a browser extension program, where the defect-associated page may be as shown in the following figure, where a test image and a corresponding test image operation mode are displayed, and the test image operation mode may include storing as a local file and searching for a corresponding defect.
The associated page can be as shown in fig. 3, wherein after obtaining the test picture, the browser extension program may convert the test picture into data of a preset type, for example, convert the test picture into picture data of base64 through toDataURL (), jump to another html page, that is, a defect associated page, and display the screenshot data on the defect associated page, that is, the screenshot picture seen by the user. And inquiring the bug on the page, associating the bug, and transmitting the picture data stream of the base64 to the interface when the bug is associated to finish the uploading process of the picture attachment.
S206: and querying the defect corresponding to the test image through the defect association page.
Specifically, in order to improve efficiency, in this embodiment, the defect corresponding to the test image is queried through the defect association page, specifically, a setting function may be provided, that is, a defect selection condition including time, a user name, and the like is received, then a jira defect management tool is called according to the set time and the set user name, and the defect corresponding to the set time and the set user name is displayed, so that a range of the defect may be reduced, a speed of finding the defect may be increased, so that a user may click on the defect to be selected, where 1 or more defects may be selected, and then the selected defect is associated with the test image.
S208: and uploading the inquired defects and the test images in an associated manner.
Specifically, the obtained defect and the test image are uploaded in a correlated manner, then the next test is continued, and after the defect is met, the operation is continuously triggered. Preferably, when the defect is judged to exist, the browser extension program can be automatically called to acquire and upload the test image.
According to the test image uploading method and device based on the browser, the computer equipment and the storage medium, only the browser extension program needs to be loaded into the browser, the screenshot is carried out after the screenshot instruction is received, the corresponding defect is inquired according to the defect association page, the inquired defect and the test image can be uploaded in an association mode, the screenshot does not need to be stored locally, then the corresponding defect management tool is opened for defect editing and the like, operation steps are reduced, and processing efficiency is improved.
In one embodiment, referring to fig. 4, fig. 4 is a schematic flowchart of step S202 in the embodiment shown in fig. 2, where receiving a screenshot instruction through a browser extension program, and performing screenshot according to the screenshot instruction to obtain a test image includes:
s402: and receiving a screenshot instruction through a browser extension program, and acquiring a page identifier of the current active page.
Specifically, a screenshot instruction is received through a browser extension program, which may be referred to above, then an ID of a tab page of a currently active page is obtained through a first program in the browser extension program, for example, when the tab page is opened and a screenshot hundred degree page is required, a button corresponding to the browser extension program on a browser is clicked, and it is first obtained that the current active tab page is a hundred degree page, that is, a page identifier.
S404: and establishing a channel link between the browser extension program and the browser native program.
Specifically, secondly, a channel link between the browser extension program and the browser native program is established, and specifically, the chrome extension program needs to communicate with the browser native program content scripts (js file, running in the context of a web page, belonging to a component of the web page) by establishing interception and feedback of messages. Specifically, a long-term connection mode may be adopted, a channel is established between the browser native program content scripts and the browser extension program, and all messages are processed.
The browser extension program establishes a channel link in a mode of port, chroma, tab, connect ({ tabID: "current tabID", name: "Demo channel" }), the browser native program content Scripts establishes a channel link in a mode of port, chroma, run, on connect ({ name: "Demo channel" }), both establish message monitoring in a mode of port, on message. Therefore, the browser extension program and the browser native program can establish channel link to carry out message transmission data.
S406: and acquiring a visible area and a screenshot mode corresponding to the screenshot instruction through the browser extension program, and sending the determined screenshot mode to the browser native program based on the channel link.
S408: and after the corresponding test image is obtained through the browser native program according to the screenshot mode and the page identification, the obtained test image is sent to the browser extension program based on the channel link.
Specifically, a visible area corresponding to the screenshot instruction is obtained through a browser extension program, a screenshot mode is determined, and the determined screenshot mode is sent to a browser native program based on the channel link. Specifically, data of the whole visible area is obtained by using chrome.
In the above embodiment, the test image is intercepted by the channel link between the browser extension program and the browser native program.
In one embodiment, the loading mode of the browser extension program includes: packaging codes of the browser extension program into a preset file through a packaging extension program of the browser; and storing the preset file into the browser extension program set.
Specifically, firstly, the code is packaged crx into a file with suffix by the extension program of the browser. Specifically, the inlet: browser click set- > more tools- > extender- > package extender. When the user wants to use the tool, the user only needs to drag the crx file into the extension program, and the browser automatically loads the tool into the browser.
In one embodiment, the test image is captured in one or more of a full screen capture, a visible area capture, and a selected area capture.
Wherein, for a full screen shot, it may include: judging whether a scroll bar of a page corresponding to the page identifier can move or not through a browser native program; and when the scroll bar of the page corresponding to the page identifier is movable, controlling the scroll bar corresponding to the page to scroll through the browser native program so as to acquire the image of the whole page corresponding to the page identifier.
Specifically, whether the current tab page can be scrolled or not is judged through a browser native program, if yes, scrolling is carried out, and data in a scrolling area is obtained. The control of the scroll bar is realized by js method of content scripts. Until the page is scrolled to the bottom, the data of the whole page is acquired.
And directly acquiring the visible region as a test image aiming at the screenshot of the visible region.
Wherein, screenshot for the selected area may include: acquiring the position information of the start screenshot through a browser native program; recording the screenshot area information after the scroll bar is rolled; and obtaining the screenshot of the selected area according to the screenshot starting position information and the screenshot area information.
Specifically, the screen capture position information (left, top, right, bottom) of the page clicked by the user is obtained, and the screen capture area information (width, height) is obtained after the mouse is released according to the mouse rolled by the user. Therefore, the screenshot area information can be obtained according to the screenshot starting position information and the screenshot area information. If the user has scrolled the mouse beyond the content of the visible region, the page data after page scrolling will also be stored in the screenshot region data. For example, captures ═ … stores the first visible region content data, and when the page is scrolled, the scrolled page data is added. Because the user selects the screenshot range, only the parameter information of the screenshot range is transmitted when the drawImage () method is called according to the provided position information. In the case of a full screen shot, drawImage () is information to transfer the entire page.
In the embodiment, specific screen capturing processes of different screen capturing modes are provided, and the correctness of the test image obtained by screen capturing is ensured.
It should be understood that although the various steps in the flowcharts of fig. 2 and 4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 and 4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a browser-based test image uploading apparatus including: screenshot module 100, display module 200, association module 300, and upload module 400, wherein:
the screenshot module 100 is used for receiving a screenshot instruction through a browser extension program and performing screenshot according to the screenshot instruction to obtain a test image;
the display module 200 is used for jumping to a defect-associated page through a browser extension program according to the test image, wherein the test image is displayed on the defect-associated page;
the correlation module 300 is configured to query a defect corresponding to the test image through a defect correlation page;
and an uploading module 400, configured to upload the queried defect and the test image in a correlated manner.
In one embodiment, the screenshot module 100 includes:
the page identification acquisition unit is used for receiving the screenshot instruction through the browser extension program and acquiring the page identification of the current active page;
the channel link establishing unit is used for establishing a channel link between the browser extension program and the browser native program;
the sending unit is used for acquiring a visible area and a screenshot mode corresponding to the screenshot instruction through the browser extension program and sending the determined screenshot mode to the browser native program based on the channel link;
and the screenshot unit is used for acquiring the corresponding test image through the browser native program according to the screenshot mode and the page identification, and then sending the acquired test image to the browser extension program based on the channel link.
In one embodiment, the above test image uploading apparatus based on a browser further includes:
the packaging module is used for packaging the codes of the browser extension program into a preset file through the packaging extension program of the browser;
and the storage module is used for storing the preset file into the browser extension program set.
In one embodiment, the test image is captured in one or more of a full screen capture, a visible area capture, and a selected area capture.
In one embodiment, the above test image uploading apparatus based on a browser further includes:
the judging module is used for judging whether a scroll bar of a page corresponding to the page identifier can move or not through a browser native program;
and the processing module is used for controlling the scroll bar corresponding to the page to scroll through the browser native program when the scroll bar of the page corresponding to the page identifier is movable or not so as to acquire the image of the whole page corresponding to the page identifier.
In one embodiment, the above test image uploading apparatus based on a browser further includes:
the position information recording module is used for acquiring screenshot starting position information through a browser native program;
the area information recording module is used for recording the screenshot area information after the scroll bar rolls;
and the calculation module is used for obtaining the screenshot of the selected area according to the screenshot starting position information and the screenshot area information.
For specific limitations of the browser-based test image uploading device, reference may be made to the above limitations of the browser-based test image uploading method, which are not described herein again. The modules in the browser-based test image uploading device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a browser-based test image upload method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: receiving a screenshot instruction through a browser extension program, and performing screenshot according to the screenshot instruction to obtain a test image; skipping to a defect-associated page through a browser extension program according to the test image, wherein the test image is displayed on the defect-associated page; inquiring defects corresponding to the test images through the defect association page; and uploading the inquired defects and the test images in an associated manner.
In one embodiment, the receiving of a screenshot instruction by a browser extension program and the screenshot according to the screenshot instruction to obtain a test image, which are implemented when a processor executes a computer program, includes: receiving a screenshot instruction through a browser extension program, and acquiring a page identifier of a current active page; establishing a channel link between a browser extension program and a browser native program; acquiring a visible area and a screenshot mode corresponding to the screenshot instruction through a browser extension program, and sending the determined screenshot mode to a browser native program based on a channel link; and after the corresponding test image is obtained through the browser native program according to the screenshot mode and the page identification, the obtained test image is sent to the browser extension program based on the channel link.
In one embodiment, the browser extension program is loaded by the processor when executing the computer program in a manner that includes: packaging codes of the browser extension program into a preset file through a packaging extension program of the browser; and storing the preset file into the browser extension program set.
In one embodiment, the test image involved in the execution of the computer program by the processor is captured in one or more of a full screen capture, a visible area capture, and a selected area capture.
In one embodiment, the full screen shots involved in the execution of the computer program by the processor include: judging whether a scroll bar of a page corresponding to the page identifier can move or not through a browser native program; and when the scroll bar of the page corresponding to the page identifier is movable, controlling the scroll bar corresponding to the page to scroll through the browser native program so as to acquire the image of the whole page corresponding to the page identifier.
In one embodiment, the screenshots of the selected area involved in execution of the computer program by the processor include: acquiring the position information of the start screenshot through a browser native program; recording the screenshot area information after the scroll bar is rolled; and obtaining the screenshot of the selected area according to the screenshot starting position information and the screenshot area information.
In one embodiment, a computer storage medium is provided, having a computer program stored thereon, the computer program, when executed by a processor, implementing the steps of: receiving a screenshot instruction through a browser extension program, and performing screenshot according to the screenshot instruction to obtain a test image; skipping to a defect-associated page through a browser extension program according to the test image, wherein the test image is displayed on the defect-associated page; inquiring defects corresponding to the test images through the defect association page; and uploading the inquired defects and the test images in an associated manner.
In one embodiment, the receiving of a screenshot instruction by a browser extension program and the screenshot according to the screenshot instruction to obtain a test image, which are implemented when a processor executes a computer program, includes: receiving a screenshot instruction through a browser extension program, and acquiring a page identifier of a current active page; establishing a channel link between a browser extension program and a browser native program; acquiring a visible area and a screenshot mode corresponding to the screenshot instruction through a browser extension program, and sending the determined screenshot mode to a browser native program based on a channel link; and after the corresponding test image is obtained through the browser native program according to the screenshot mode and the page identification, the obtained test image is sent to the browser extension program based on the channel link.
In one embodiment, the manner in which the browser extension is loaded in relation to when the computer program is executed by the processor includes: packaging codes of the browser extension program into a preset file through a packaging extension program of the browser; and storing the preset file into the browser extension program set.
In one embodiment, the computer program, when executed by the processor, involves the test image being captured in one or more of a full screen capture, a visible area capture, and a selected area capture.
In one embodiment, the full screen shots involved in the execution of the computer program by the processor include: judging whether a scroll bar of a page corresponding to the page identifier can move or not through a browser native program; and when the scroll bar of the page corresponding to the page identifier is movable, controlling the scroll bar corresponding to the page to scroll through the browser native program so as to acquire the image of the whole page corresponding to the page identifier.
In one embodiment, the screenshots of the selected area involved in execution of the computer program by the processor include: acquiring the position information of the start screenshot through a browser native program; recording the screenshot area information after the scroll bar is rolled; and obtaining the screenshot of the selected area according to the screenshot starting position information and the screenshot area information.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A browser-based test image uploading method, the method comprising:
receiving a screenshot instruction through a browser extension program, and performing screenshot according to the screenshot instruction to obtain a test image;
skipping to a defect-associated page through the browser extension program according to the test image, wherein the test image is displayed on the defect-associated page;
inquiring the defect corresponding to the test image through the defect associated page;
and uploading the inquired defects and the test image in an associated manner.
2. The method of claim 1, wherein receiving a screenshot instruction through a browser extension program and performing screenshot according to the screenshot instruction to obtain a test image comprises:
receiving a screenshot instruction through a browser extension program, and acquiring a page identifier of a current active page;
establishing a channel link between the browser extension program and a browser native program;
acquiring a visible area and a screenshot mode corresponding to the screenshot instruction through the browser extension program, and sending the determined screenshot mode to the browser native program based on the channel link;
and after the corresponding test image is obtained through the browser native program according to the screenshot mode and the page identification, the obtained test image is sent to the browser extension program based on the channel link.
3. The method of claim 1, wherein the manner in which the browser extension is loaded comprises:
packaging codes of the browser extension program into a preset file through a packaging extension program of the browser;
and storing the preset file into a browser extension program set.
4. The method of any one of claims 1 to 3, wherein the test image is captured in a manner including one or more of a full screen capture, a visible area capture, and a selected area capture.
5. The method of claim 4, wherein the full screen shot comprises:
judging whether a scroll bar of a page corresponding to the page identifier can move or not through the browser native program;
and when the scroll bar of the page corresponding to the page identifier is movable, controlling the scroll bar corresponding to the page to scroll through the native program of the browser so as to acquire the image of the whole page corresponding to the page identifier.
6. The method of claim 4, wherein the select area screenshot comprises:
acquiring the position information of the start screenshot through a browser native program;
recording the screenshot area information after the scroll bar is rolled;
and obtaining the screenshot of the selected area according to the screenshot starting position information and the screenshot area information.
7. A browser-based test image uploading apparatus, comprising:
the screenshot module is used for receiving a screenshot instruction through a browser extension program and performing screenshot according to the screenshot instruction to obtain a test image;
the display module is used for jumping to a defect associated page through the browser extension program according to the test image, and the test image is displayed on the defect associated page;
the correlation module is used for inquiring the defect corresponding to the test image through the defect correlation page;
and the uploading module is used for uploading the inquired defects and the test image in a correlation manner.
8. The apparatus of claim 7, wherein the screenshot module comprises:
the page identification acquisition unit is used for receiving the screenshot instruction through the browser extension program and acquiring the page identification of the current active page;
the channel link establishing unit is used for establishing a channel link between the browser extension program and the browser native program;
the sending unit is used for acquiring a visible area and a screenshot mode corresponding to the screenshot instruction through the browser extension program and sending the determined screenshot mode to the browser native program based on the channel link;
and the screenshot unit is used for acquiring a corresponding test image through the browser native program according to the screenshot mode and the page identification, and then sending the acquired test image to the browser extension program based on the channel link.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer storage medium on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011033367.5A 2020-09-27 2020-09-27 Test image uploading method, device, equipment and storage medium based on browser Pending CN112148191A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011033367.5A CN112148191A (en) 2020-09-27 2020-09-27 Test image uploading method, device, equipment and storage medium based on browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011033367.5A CN112148191A (en) 2020-09-27 2020-09-27 Test image uploading method, device, equipment and storage medium based on browser

Publications (1)

Publication Number Publication Date
CN112148191A true CN112148191A (en) 2020-12-29

Family

ID=73895309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011033367.5A Pending CN112148191A (en) 2020-09-27 2020-09-27 Test image uploading method, device, equipment and storage medium based on browser

Country Status (1)

Country Link
CN (1) CN112148191A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297075A (en) * 2021-05-21 2021-08-24 吉林亿联银行股份有限公司 Software defect information acquisition method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110191676A1 (en) * 2010-01-29 2011-08-04 Microsoft Corporation Cross-Browser Interactivity Recording, Playback, and Editing
CN102521284A (en) * 2011-11-28 2012-06-27 优视科技有限公司 Page screenshot processing method and device based on mobile terminal browser
CN103365840A (en) * 2012-03-26 2013-10-23 腾讯科技(深圳)有限公司 Web-based screenshot taking method and device
EP2713290A2 (en) * 2012-09-28 2014-04-02 Orange System and method for screencast creation and abridging based on user web browsing
CN104536729A (en) * 2014-11-28 2015-04-22 北京奇虎科技有限公司 Method and device for achieving image capture on browser page
CN108614762A (en) * 2016-12-09 2018-10-02 武汉斗鱼网络科技有限公司 A kind of browser testing method and device
CN108959605A (en) * 2018-07-13 2018-12-07 彩讯科技股份有限公司 For the screenshot method of webpage, device, computer equipment and storage medium
CN110377500A (en) * 2019-06-14 2019-10-25 平安科技(深圳)有限公司 Test method, device, terminal device and the medium of Website page

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110191676A1 (en) * 2010-01-29 2011-08-04 Microsoft Corporation Cross-Browser Interactivity Recording, Playback, and Editing
CN102521284A (en) * 2011-11-28 2012-06-27 优视科技有限公司 Page screenshot processing method and device based on mobile terminal browser
CN103365840A (en) * 2012-03-26 2013-10-23 腾讯科技(深圳)有限公司 Web-based screenshot taking method and device
EP2713290A2 (en) * 2012-09-28 2014-04-02 Orange System and method for screencast creation and abridging based on user web browsing
CN104536729A (en) * 2014-11-28 2015-04-22 北京奇虎科技有限公司 Method and device for achieving image capture on browser page
CN108614762A (en) * 2016-12-09 2018-10-02 武汉斗鱼网络科技有限公司 A kind of browser testing method and device
CN108959605A (en) * 2018-07-13 2018-12-07 彩讯科技股份有限公司 For the screenshot method of webpage, device, computer equipment and storage medium
CN110377500A (en) * 2019-06-14 2019-10-25 平安科技(深圳)有限公司 Test method, device, terminal device and the medium of Website page

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297075A (en) * 2021-05-21 2021-08-24 吉林亿联银行股份有限公司 Software defect information acquisition method and device

Similar Documents

Publication Publication Date Title
CN108920354B (en) Embedded point management method and device, computer equipment and storage medium
CN108829485B (en) Application interface layout updating method and device, storage medium and computer equipment
CN108848142B (en) Message pushing method and device, computer equipment and storage medium
CN110659092B (en) Webpage screenshot method and device, computer equipment and storage medium
CN110413922B (en) Page information display method, device, computer equipment and storage medium
CN110704095A (en) Workflow-based configuration processing method and device, computer equipment and storage medium
CN110888709A (en) Intelligent operation method and device of monitoring screen, computer equipment and storage medium
CN111176767B (en) Table data processing method, apparatus, computer device and storage medium
CN110597709B (en) Interactive debugging method and device for mixed-mode mobile application and computer equipment
CN111191167A (en) Page resource updating method and device, computer equipment and storage medium
CN112035114A (en) Page rollback method, device, equipment and medium
CN110659435A (en) Page data acquisition processing method and device, computer equipment and storage medium
CN112148191A (en) Test image uploading method, device, equipment and storage medium based on browser
CN107102937B (en) User interface testing method and device
CN109542962B (en) Data processing method, data processing device, computer equipment and storage medium
CN111372240B (en) Picture uploading method and device, computer equipment and storage medium
CN111177605A (en) Single-page loading performance monitoring method and device and related equipment
CN110659376A (en) Picture searching method and device, computer equipment and storage medium
CN112328333B (en) Built-in program operating method and device, computer equipment and storage medium
CN113672826A (en) Page jump method, device, computer equipment and storage medium
CN111159027B (en) Automatic testing method and device, computer equipment and readable storage medium
CN111190574B (en) Method, device, equipment and storage medium for selecting options of multi-stage linkage assembly
CN114546560A (en) Data sharing method and device, storage medium and electronic equipment
CN113535143A (en) Stack information processing method and device, electronic equipment and storage medium
CN110704218B (en) Data processing method, data processing device, computer equipment and storage medium

Legal Events

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