Test script generation method and device and computer readable storage medium

A technology of test scripts and scripts, applied in computing, software testing/debugging, error detection/correction, etc., can solve the problems of low maintainability and complexity of automated test scripts

Inactive Publication Date: 2020-05-05
JINGDONG TECH HLDG CO LTD
View PDF2 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In the process of realizing the present invention, the inventor found that after the relative position of the page elements of the webpage changes, the original element path becomes invalid immediately, and it is necessary to search for the c

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Test script generation method and device and computer readable storage medium
  • Test script generation method and device and computer readable storage medium
  • Test script generation method and device and computer readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention.

[0029] figure 1 is an optional schematic flowchart of the test script generation method provided by the embodiment of the present invention, which will be combined with figure 1 The steps shown are described.

[0030] S101. When an operation recording instruction is received, enter the recording page of the website to be tested, and start recording the recording page.

[0031] The operation recording method on the webpage provided by the embodiment of the present invention is applicable to the scenario of recording the operations on the webpage to be tested for automatic testing, and is also applicable to other scenarios where webpage operations need to be recorded.

[0032] In the embodiment of the present invention, the terminal is equipped with automatic recording softwar...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a test script generation method and device and a computer readable storage medium. The method comprises the steps that when an operation recording instruction is received, entering a recording page of a website to be tested and starting recording of the recording page; monitoring operation information on the recording page, wherein the operation information comprises an operation event and a webpage element corresponding to the operation event; when the webpage element contains the text information, extracting the text information as an event object; generating a scriptstatement according to the operation event and the event object, and converting the operation information into the script statement; continuing the conversion until an operation recording ending instruction is received, obtaining at least one script statement corresponding to the at least one piece of operation information wherein the at least one script statement forms a test script; and executing the test script on the test page of the to-be-tested website to realize automatic test of the test page. According to the invention, the script can be automatically recorded, and the maintainabilityof the test script is improved.

Description

technical field [0001] The invention relates to the field of software engineering, in particular to a test script generation method and device, and a computer-readable storage medium. Background technique [0002] The current automated script recording on the webpage usually uses professional html technologies such as cssSelector and xpath to record operations on the webpage and generate scripts. In the process of realizing the present invention, the inventor found that after the relative position of the page elements of the webpage changes, the original element path becomes invalid immediately, and it is necessary to search for the corresponding cssSelector and xpath element path of the page element again, and the process of finding the element path is relatively complicated. Scripts often need to be re-recorded, thus resulting in less maintainability of the generated automated test scripts. Contents of the invention [0003] In order to solve the above technical problem...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F11/36
CPCG06F11/3672G06F11/3688
Inventor 任星旺李秋林陈超
Owner JINGDONG TECH HLDG CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products