Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Test method and storage medium for Web engineering automatic verification

A test method and engineering technology, applied in software testing/debugging, error detection/correction, instruments, etc., can solve problems such as the judgment of the scope of influence that cannot be solved, and achieve the effects of improving test efficiency, reducing test scope, and reducing test time

Inactive Publication Date: 2018-10-09
福建天晴在线互动科技有限公司
View PDF4 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

But for software testers, just comparing the difference between two project files cannot solve the judgment of the scope of influence brought about by code modification between versions

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 method and storage medium for Web engineering automatic verification
  • Test method and storage medium for Web engineering automatic verification
  • Test method and storage medium for Web engineering automatic verification

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0068] Please refer to figure 1 , the present embodiment provides a test method for automatic verification of web engineering, including:

[0069] First, the project files to be released are traversed, classified and stored according to different file types, and the file name, path and type of each type of file are recorded. File type classification includes: java, CSS, JS, html, etc.;

[0070] Secondly, match the corresponding rules according to different file types, use regular matching to scan and divide, and then store them in the corresponding database table. The basis for formulating the specific rules is: specified according to the writing format of different languages ​​and the calling relationship between different files.

[0071] Rules corresponding to different file types:

example 1

[0072] Example 1: The JavaScript file type defines functions using the keyword function. The syntax is: "functionfunctionName(parameters) {executed code}", then for the JS file (abbreviation of JavaScript file), the rules for this syntax will be used to match, and then functionName (function name), parameters (parameters), execution The code (function body) is saved to the database.

example 2

[0073] Example 2: The html file type is the main calling file of JavaScript functions, and the calling methods are divided into event calling and default loading calling.

[0074] Event call: For example, onclick (mouse click) event, the format is onclick="functionName(parameters)", and the above call events can be collected through regular matching.

[0075] Default load call: the format of the default call is functionName(parameters), in ** Between scopes, the matching rule is to get the first ** Code block, and then do regular matching to collect the corresponding functions.

[0076] Comparing the results of Example 1 and Example 2, you can know whether a function in a JS file is called in an HTML file.

[0077] Match the corresponding rules: For example, the JS file uses regular rules to filter fields such as "function function name (parameter) {function body}", and saves the generated data including the function name, parameters and function body to the database. Then,...

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 method Web engineering automatic verification. The method comprises the following steps of: acquiring a modified JS file in a new version of the engineering file; according to the function body characteristic of the JS file, analysizing JS function and obtaining a function name of the JS function; traversing the HTML files in the engineering file according to the function name to obtain the HTML files calling the JS function. The test method Web engineering automatic verification can determine the application domain of the modified service information corresponding to the other service information in the new version engineering document, so that the influence range brought by the code modification between different versions can be judged, the test range is reduced, and the test time is shortened; at the same time, the function of the same event function for multiple calls can be realized, only one test is needed, and the test time is further reduced. The test method Web engineering automatic verification has a fully automatic test implementation process, and has the advantages that the test efficiency and test accuracy are obviously improved.

Description

technical field [0001] The invention relates to the field of software development and testing, in particular to a testing method for automatic verification of web engineering and a computer-readable storage medium. Background technique [0002] Background one: [0003] With the development of software engineering, the popularity of web applications is particularly prominent. In order to adapt to the trend of the times, the development cycle is gradually shortened, and the software iteration speed is continuously accelerated, but the functions of the system are also becoming larger and larger, so it brings a larger test scope to the testers. But product iterations will not allow testers to test on such a large scale. Various JavaScript functions are used in Web projects as verification or judgment. These functions are often shared by multiple places. If each function is verified, the testers will actually do a lot of repeated verifications, which will increase the time cos...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3668
Inventor 刘德建梁益冰杨芳林小红林剑锋陈伟董浩林琛
Owner 福建天晴在线互动科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products