Testing method and device

A test method and test device technology, applied in the direction of software testing/debugging, etc., to achieve the effect of improving reusability

Active Publication Date: 2013-08-14
TENCENT TECH (SHENZHEN) CO LTD
View PDF6 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the process of realizing the present invention, the inventor found that the prior art has at least the following problems: the HTML code and JS code in a test case are compiled together, but the HTML code or JS code in different test cases may be the same Or similar, such as the aforementioned JS code for judging whether the input data is legal
And when designing new test cases, the HTML code or JS code in the previous test cases cannot be easily reused

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
  • Testing method and device
  • Testing method and device
  • Testing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0059] Please refer to figure 2 , which shows a flow chart of the testing method provided in Embodiment 1 of the present invention. This test method can be used for figure 1 In the shown test server 120, the test method includes:

[0060] Step 201, read the use case description file;

[0061] In this embodiment, the test case is not directly compiled from HTML code and JS code. Before testing, different HTML fragments and JS files need to be stored separately in the test server. The HTML fragment can contain a piece of HTML code that implements a basic component of a web page, and the JS file can contain a piece of JS code that implements an independent function. These HTML fragments and JS files can be parts that can be reused in different test cases. For the convenience of description, the separately stored HTML fragment is called the first object, and the separately stored JS code is called the second object.

[0062] Then, provide a use case description file for desc...

Embodiment 2

[0071] Please refer to image 3 , which shows the flow chart of the testing method provided by Embodiment 2 of the present invention. This test method can be used for figure 1 In the shown test server 120, the test method includes:

[0072] Step 301, the user selects a test case set through the browser;

[0073] When testing a test object, the user can select a test case set from several test case sets through the browser.

[0074] Step 302, obtaining the use case index of the test case set;

[0075] A test case set may include several test cases, corresponding to these test cases, and there are indexes of these test cases in the test case set. The use case index corresponds to the use case description files of all or part of the test cases in the test case set. In other words, under normal circumstances, the use case index corresponds to the use case description files of all test cases in the test case set. Each use case description file is used to describe a test case ...

Embodiment 3

[0095] Please refer to Figure 4 , which shows a structural block diagram of the test device provided by Embodiment 3 of the present invention. The test device includes a first object storage module 401, a second object storage module 402, a use case index acquisition module 403, a description file reading module 404, a dependency acquisition module 405, a previous test judgment module 406, an interrupt execution module 407, a build Parameter acquisition module 408 , use case construction module 409 , use case execution module 410 and test result output module 411 .

[0096] The first object storage module 401 stores several objects of the first type used to form test cases. The second object storage module 402 stores several objects of the second type used to form test cases. The first object may be a piece of HTML document, and the second object may be a piece of JS file.

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 testing method and device and belongs to the field of computer testing. The testing method includes: reading a case description file; acquiring building parameters which belong to a test case described by the case description file and which include information of a first object and information of a second object; loading the first object and the second object according to the building parameters to form the test case; and calling the test case to execute a test process and acquiring test results. According to the method, the first type of object and the second type of object are separated, so that importance of HTML (hypertext markup language) documents and JS (javascript) files is improved. By the aid of the case description file, the new test case can be built conveniently and dependency between the test cases is overcome.

Description

technical field [0001] The invention relates to the field of computer testing, in particular to a testing method and device. Background technique [0002] With the continuous increase of social needs, people come into contact with and use more and more Internet products in their daily life and work. At present, most Internet applications are constructed based on HTML (Hypertext Markup Language, text markup language) language and JS (Javascript, java client-side scripting language) language. JS is an object-based and event-driven and relatively secure client-side scripting language. It is also a scripting language widely used in client-side Web development. It is often used to add dynamic functions to HTML pages, such as responding to various user requests. operation, and so on. [0003] In order to test whether the function developed by JS can run normally, an existing test method is: combine a piece of JS code and a piece of HTML code to realize a certain function to buil...

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
Inventor 宁京廖志张志伟郭宗飞袁建发叶方正
Owner TENCENT TECH (SHENZHEN) 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