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

Automatic test method and device

A technology of automated testing and testing methods, applied in the field of testing, can solve the problems of unified APIs without business scenarios and high cost of test case migration, so as to reduce the cost of writing and meet the needs.

Inactive Publication Date: 2018-08-24
吕宁
View PDF5 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] 1. There are many frameworks involved, and it is necessary to master multiple frameworks to realize multi-terminal automated testing;
[0006] 2. At present, the existing framework generally provides basic operations, and there is no unified API for business scenarios
[0007] The cost of test case transplantation is high. Due to the rapid iteration of Internet products, automated test cases need to be frequently modified

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] figure 1 A schematic structural diagram of a test framework provided by an embodiment of the present invention. Such as figure 1 As shown, Totoro on the left side is the automated testing framework of the present invention, and the right side is the supporting proxy tool, Server and various terminals.

[0026] The automatic test framework of the present invention includes: a basic operation layer (basecommon), a business logic layer (commonapi), a test case layer, a custom JUnit module and a Utils module.

[0027] Among them, the basic operation layer (basecommon): includes the realization of the basic operations of each end, such as click, slide, screenshot, picture comparison, etc.

[0028] Business logic layer (common api): abstract the business logic of each end and each product, and use a unified common api. For example, the api corresponding to clicking on a Tieba advertisement is clickAD. You don’t need to consider the characteristics of each end when writing ...

Embodiment 2

[0042] figure 2 It is a flowchart of an automated testing method provided by an embodiment of the present invention. Such as figure 2 As shown, the test method may include the following steps:

[0043] Step S201: The server builds test cases according to the operation needs and the public business function common api; wherein, the operation needs include click, slide, drag, long press and screenshot;

[0044] Specifically, the server obtains the operation requirements; then encapsulates the operation requirements, and then builds test cases according to the encapsulated operation requirements and common api.

[0045] After the test case is built, the server stores the built test case; the test case stored in the server is used to detect the application program in the user terminal, for example, to check the application program of the Android terminal and the ios terminal, and the PC terminal And the web page on the wap side is detected.

[0046] It should be noted that ...

Embodiment 3

[0063] image 3 It is a schematic structural diagram of an automatic testing device provided by an embodiment of the present invention. Such as image 3 As shown, the test device may include: a construction module 301 , an acquisition module 302 and a test module 303 . The testing device may be a server. In the following, the test device is taken as an example for description.

[0064] The construction module 301 is used to: construct test cases according to operation requirements and public business function common api; wherein, the operation requirements include click, slide, drag, long press and screenshot;

[0065] Specifically, first obtain the operation requirements; then encapsulate the operation requirements, and then build test cases according to the encapsulated operation requirements and common api.

[0066] After the test case is built, the server stores the built test case; the storage module stored in the server, the test case is used to detect the applicatio...

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 relates to an automatic test method and device. The test method comprises the following steps of: constructing test cases according to an operation demand and a common business function(common api), wherein the operation demand comprises click, screen sliding, dragging, long press and screenshot; obtaining a test case corresponding to a test operation request sent by a user terminalaccording to the test operation request; and testing a to-be-tested front-end program in the user terminal according to the test case corresponding to the test operation request. According to the method and device, the test cases are compiled through the common api, so that different user terminals can carry out test by using a uniform test framework, thereby effectively reducing the case compilation cost and satisfying the demands of test engineers in the aspect of automatic test.

Description

technical field [0001] The invention relates to the technical field of testing, in particular to an automatic testing method and device. Background technique [0002] With the development of the Internet and the popularization of mobile phone products, a variety of terminal types have emerged, such as android, ios, wap, pc, and there are also various types of automated testing frameworks on these terminals. These frameworks can meet the automated testing needs of each end, but currently Internet products generally support multiple end types, each end uses a different test framework, needs to master different APIs, and has high learning costs. [0003] Conventional multi-terminal automated testing methods mainly use different testing frameworks, and these frameworks only provide the realization of basic functions, such as clicking and sliding, without a unified application programming interface (application programming interface, api) for business scenarios. [0004] The pro...

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/3688
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