JS code testing method, storage medium, device and system

A technology of JS code and test method, which is applied in the field of man-machine recognition, can solve the problems of inconvenient use and cumbersome process, and achieve the effect of good test performance, fast running speed and saving test time

Active Publication Date: 2019-07-16
WUHAN DOUYU NETWORK TECH CO LTD
View PDF12 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005]However, since a large amount of JavaScript code is generated according to various conditions when generating JavaScript code, for example, when verifying whether the logged-in user name is correct, because the user name may It is all Chinese, all English, a combination of characters or other arbi...

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
  • JS code testing method, storage medium, device and system
  • JS code testing method, storage medium, device and system
  • JS code testing method, storage medium, device and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0034] The present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.

[0035] see figure 1 As shown, the embodiment of the present invention provides a method for testing JS code, which is used to test whether the JS code is correct. In the embodiment of the present invention, the JS code to be detected is automatically generated KEY value to implement the addition function as an example.

[0036] The JavaScript code for room number 0 is as follows:

[0037]

[0038]

[0039] The code for room number 1 is as follows:

[0040]

[0041] The above automatically generated JavaScript code is an encrypted data calculated according to the room number. For different room numbers, since the values ​​of 0x457892ac and 0x8cbd92ac are different, the JavaScript code of each room is different. This enables each room number to use a different code.

[0042] The testing method of the JS code in the embodiment of th...

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 discloses a JS code testing method, which relates to the technical field of man-machine identification, and comprises the following steps of packaging a plurality of JS codes into one JScode according to the memory occupied by each JS code; integrating a JS engine in the packaged JS code, compiling a JS engine interface used for executing the packaged JS code, and calling the JS engine interface to obtain an execution result of the packaged JS code; compiling a plurality of compiled language codes corresponding to each JS code function before packaging, and executing each compiled language code separately to obtain the execution results of the plurality of compiled language codes; and correspondingly comparing whether the execution result of the JS code before unpacking is consistent with the execution result of the compiled language code, and judging whether the JS code before unpacking is correct or not according to the comparison result. The JS code testing method provided by the invention is fast in running speed, can be suitable for testing a large number of JavaScript codes, and is relatively higher in testing efficiency and good in testing performance.

Description

technical field [0001] The invention relates to the technical field of man-machine identification, and in particular to a JS code testing method, storage medium, device and system. Background technique [0002] JS, short for JavaScript, is the most popular scripting language on the Internet, which can run in all major browsers, such as Internet Explorer, Chrome, MozillaFirefox, Netscape, and Opera. [0003] At present, the programming language of WEB programs is JavaScript, which is a dynamic scripting language. When it is released, it is equivalent to the source code release, which makes it very easy to be cracked. For some core JavaScript codes, many developers will write codes to generate JavaScript. code, so that it can be replaced frequently and its security can be enhanced. Meanwhile, in order to ensure the accuracy of the automatically generated JavaScript code, a method is required to test the automatically generated JavaScript code to verify whether the automatical...

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/3684G06F11/3688G06F11/3692
Inventor 周志刚陈少杰张文明
Owner WUHAN DOUYU NETWORK TECH 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