A webkit unit testing method and device

A unit test, a technology to be tested, applied in software testing/debugging, etc., can solve problems such as inconvenient viewing of test results

Active Publication Date: 2018-07-06
深圳市雅阅科技有限公司
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The embodiment of the present invention provides a webkit unit testing method and device, aiming to solve the problem that the existing webkit unit testing method requires source code when performing unit testing, but only performs unit testing on the webkit render tree, and at the same time, it is inconvenient to view the test results

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
  • A webkit unit testing method and device
  • A webkit unit testing method and device
  • A webkit unit testing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0024] figure 1 The implementation flow of the webkit unit testing method provided by Embodiment 1 of the present invention is shown, and the details are as follows:

[0025] In step S101, the unit test framework module is started, and a test case based on the unit test framework is written using an interface language in a preset directory.

[0026] In this embodiment, the unit testing framework module is an open source unit testing framework of JavaScript, including a jsunit module. The preset directory is a directory preset for saving test cases. The interface language is used to specify the behavior of the access object. Preferably, the interface language includes an Interface Description Language (Interface Description Language, IDL), where the Interface Description Language is a language defined by the World Wide Web Consortium (W3C). Interface Definition Language. The said startup unit test framework module uses the interface language to write the test case based on t...

Embodiment 2

[0067] Figure 4 A specific structural block diagram of the webkit unit testing device provided by Embodiment 2 of the present invention is shown, and for convenience of description, only parts related to the embodiment of the present invention are shown. In this embodiment, the webkit unit testing device includes: a use case writing unit 41 , a binding unit 42 , a compiling unit 43 and a testing unit 44 .

[0068] Wherein, the use case writing unit 41 is used to start the unit test framework module, and uses the interface language to write test cases based on the unit test framework in the preset directory;

[0069] The binding unit 42 is used to set the Javascript binding between the module to be tested and the test case in the compilation configuration file of the module to be tested;

[0070] A compiling unit 43, configured to compile the module to be tested and generate a test case object;

[0071] The test unit 44 is used to set up a wed server, deploy and access the t...

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 is applicable to the technical field of software test, and provides a webkit unit test method and a webkit unit test device. The method comprises the following steps that: a unit test framework module is started, and under a preset directory, an interface language is used for compiling test cases on the basis of a unit test framework; Javascript binding of a module to be tested and the test cases is set in a compiling configuration file of the module to be tested; the module to be tested is compiled, and a test case object is generated; and a web server is built, and a test webpage calling the test case object is deployed and accessed to obtain a test result. According to the method and the device, the webkit unit test of a mobile terminal browser is realized through the Javascript binding.

Description

technical field [0001] The invention belongs to the technical field of software testing, in particular to a webkit unit testing method and device. Background technique [0002] webkit is an open-source browser kernel, which is widely used because of its clear source code structure, fast rendering speed, and easy maintenance. Each html page in webkit corresponds to a dom tree and a render tree. The dom tree is used to describe the information of the html page, and the render tree is used for layout, which is responsible for how the dom tree is displayed on the screen. Currently, webkit is widely used in Safari, Dashboard, Mail and some other Mac OS X programs. The most basic guarantee of the running quality of these programs is the webkit unit test. Among them, the meaning of unit is the smallest function module to be tested which is artificially stipulated. [0003] The existing webkit unit testing method is to add test cases in the webkit kernel source code, then compile...

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 Patents(China)
IPC IPC(8): G06F11/36
Inventor 姜珊吴景刘毅朱传聪樊华阮曙东
Owner 深圳市雅阅科技有限公司
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