Method for achieving automatic Web testing by packaging Selenium and Sikuli

A technology of automated testing and test cases, applied in software testing/debugging, program control devices, etc., can solve the problems of many page objects, heavy maintenance workload, and difficult maintenance, so as to improve the success rate and efficiency and reduce the difficulty Effect

Active Publication Date: 2018-01-09
STATE GRID CORP OF CHINA +1
View PDF3 Cites 23 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

QTP is a commercial automated testing tool. Its powerful recording and playback function makes it easier for testers to implement web automated testing. However, the recorded script is very large. In addition to a script file, it comes with a large number of page objects, making maintenance difficult. Large, high replay failure rate
For example, after a simple test of 8 steps and a total of three pages, about 20 page objects are created. If you want to do an integration test case associated with multiple modules, there will be a lot of page objects, which is very inconvenient for configuration management.
Robot Framework is an extensible keyword-driven automated testing framework based on Python. It requires a Python operating environment and loads Selenium2Library for web automated testing. It lacks a unified management of page objects on the web. The same page object location information appears in Among multiple test cases, when the page object positioning information changes, the relevant test cases must be modified one by one, and the maintenance workload is relatively large

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 achieving automatic Web testing by packaging Selenium and Sikuli
  • Method for achieving automatic Web testing by packaging Selenium and Sikuli
  • Method for achieving automatic Web testing by packaging Selenium and Sikuli

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] The technical solutions in the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention.

[0028] Comprehensively considering the above-mentioned requirements and the problems existing in mainstream testing tools, after investigating a variety of open source technologies, the present invention encapsulates Selenium and Sikuli, and combines TestNG to realize Web automation testing. These technologies are described below:

[0029]1, Selenium is a kind of open-source testing technology, and the Selenium used in the present invention is the Java realization to SeleniumWebDriver (Selenium 2.0), and Selenium WebDriver provides abundant API, has multiple positioning strategies: id, name, css selector, xpath etc. There are also rich methods for the operation of page controls. The rich API of SeleniumWebDriver can help us realize the automation of operations, and the things that need to be done manual...

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 provides a method for achieving automatic Web testing by packaging Selenium and Sikuli. The method comprises the following steps that 1, a dependency environment of a java project is set; 2, Selenium and Sikuli are packaged to form a core API; 3, a foundation class is compiled for call during test case compiling; 4, automatic Web testing is achieved by using the core API packaged inthe step 2 and the foundation class compiled in the step 3; a temp catalog is created under src and used for a test case Java class to be put, Java class of a test case inherits a BaseTestCase, then atest operating method in BasePage.java is cited in the testing method, and test data is introduced. The difficulty of compiling scripts and maintaining the scripts of a tester can be reduced, and thesuccess rate and efficiency of automatic testing are improved.

Description

technical field [0001] The invention relates to the field of software testing, in particular to a method for encapsulating Selenium and Sikuli to realize Web automation testing. Background technique [0002] Software testing is an important means to ensure software quality. Through software testing, software defects can be found and the defects can be modified to improve the software quality level. At present, people are still looking for efficient and convenient software testing methods. Although manual testing is still the main method in software testing, because there are many repetitive and monotonous processes in software testing, people think of using machine automation. Instead of some manual testing to save time, improve work efficiency and test accuracy, there is automated testing. In a broad sense, automated testing includes all behaviors that use tools (programs) to replace or assist manual testing, which can be regarded as automation, or a program written by one...

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/36G06F9/44
Inventor 陈莉娟罗晓梅喻金龙曾小松
Owner STATE GRID CORP OF CHINA
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