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

Method for quickly compiling test case on Android platform

A test case and fast technology, applied in the application field of the Android platform, can solve the problems of increased maintenance costs, lack of programming knowledge, and difficulty in writing test code to achieve the effect of reducing redundant code, stable and efficient code operation

Inactive Publication Date: 2020-03-31
XIAMEN MEIYA PICO INFORMATION
View PDF2 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] Developers test code writing specifications and levels vary from person to person, and maintenance costs are greatly increased;
[0008] Testers are familiar with the testing process and comprehensive, but suffer from lack of programming knowledge, it is difficult to write test codes

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
  • Method for quickly compiling test case on Android platform
  • Method for quickly compiling test case on Android platform
  • Method for quickly compiling test case on Android platform

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] The present invention will be further described in conjunction with the accompanying drawings and specific embodiments.

[0038] The present invention supports YAML, JSON and other data formats for rapid writing of test cases, which are introduced below through the YAML data format. Such as figure 1 As shown, a method for quickly writing test cases on the Android platform may include the following steps:

[0039] S1. Independently develop the android element positioning module, and uniformly use the YAML language to redefine the positioning operation of all elements; YAML language is an intuitive data serialization format that can be recognized by computers, has high readability and is easy to be read by humans, and is easy to communicate with Scripting language Interactive, programming language used to express sequences of data.

[0040] S2. Abstract all the operation behaviors of the test case, and encapsulate the complex code logic into an independent operation cla...

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 a method for quickly compiling a test case on an Android platform, which comprises the following steps: S1, an android element positioning module is independent, and the positioning operation of all elements is redefined by uniformly using a YAML language; S2, abstracting all operation behaviors of the test case, and logically packaging the complex code into an independentoperation class, namely an Action class; S3, compiling a page file page. Yaml to realize a Page Object mode, and completing code decoupling and multiplexing; S4, writing a test case file case.yaml; S5, generating test case executable files xxx.py from the test case files cas.yaml in batches through a jaja2 template language; and S6, running the executable file xxx.py of the test case through thepytest. By adopting the method disclosed by the invention, a user only needs to write the test case by independently using a yaml language, so that an inexperienced person can quickly write and modifythe test case. Meanwhile, the actions of element positioning and test operation are unified, redundant codes are reduced, and the code operation is more stable and efficient.

Description

technical field [0001] The invention relates to Android platform application technology, in particular to a method for quickly writing test cases on the Android platform. Background technique [0002] In Android platform development, before each version is released, a round of automated GUI testing will be performed to ensure the stability of the app. The mainstream automated testing framework generally uses Jenkins+appium+pytest: use appium to locate and operate android page elements, and use python Write test cases, and then call pytest through Jenkins to run the test case files. [0003] As the project progresses and the number of use cases increases, the following pain points will arise: [0004] Appium has many positioning methods for android elements, and different developers use different positioning methods, which greatly increases the maintenance cost; [0005] When there are too many pages and test cases, there will be redundant element positioning and repeated t...

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/3684
Inventor 张贵雄曹鸿嵩黄碧羡
Owner XIAMEN MEIYA PICO INFORMATION
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