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

Automatic testing method based on Selenium and TestNG

A technology for automated testing and testing scenarios, applied in software testing/debugging, error detection/correction, instrumentation, etc., can solve problems such as inconvenient data-driven testing, inconvenient failure re-run, practical application difficulties, etc., to achieve data-driven The effect of testing, facilitating maintenance and reducing maintenance costs

Inactive Publication Date: 2017-02-15
INSPUR QILU SOFTWARE IND
View PDF3 Cites 13 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The automated testing framework based on QTP and QC mainly has the following deficiencies: non-open source tools such as QTP and QC need to be installed; there are restrictions on the operating system, only under Windows; the running speed is slow; the readability is poor; dependency testing cannot be set ; inconvenient to rerun on failure
The unlayered automated testing framework based on Selenium does not layer test data, page objects and methods, and test scenarios. The main shortcomings are as follows: test scenarios, page objects, and page methods are all together, which is inconvenient to maintain; It is convenient for parameterized data-driven testing; practical application in larger projects will be difficult, and the maintenance cost is very high; testers must have a good understanding of the business system to write scripts

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0014] The automated testing method based on Selenium and TestNG described in this implementation combines the Web application testing tool Selenium with the open source automated testing framework TestNG, and uses the hierarchical form of test data, page objects and methods, and test scenarios to build a good Web automated testing framework for data-driven testing, dependency testing, and multi-thread testing.

[0015] Taking the visit to Baidu as an example, the automated testing method is described in detail below, which specifically includes the following steps:

[0016] Step 1: Create a new java project, create a new libs directory, copy the required jar packages to the libs directory, and import the jar packages into the compilation path of the project; the jar packages used include all jar packages of Selenium and all jar packages of feed4testng package, and guice-3.0.jar;

[0017] Step 2: Create a new directory, where the data directory stores test data, object stores...

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 an automatic testing method based on Selenium and TestNG, and relates to an automatic Web testing framework, wherein Selenium and TestNG are combined; a good automatic Web testing framework is set up in a manner of layering test data, page objects and methods, and test scenes; and thus, a data driven test is carried out. By means of the automatic testing method disclosed by the invention, the coupling degree among various test scenes is reduced; the data driven test is realized; maintenance of a script is facilitated; the maintenance cost of an automatic testing script is reduced; the automatic Web testing efficiency is increased; the testing reliability is improved; and human factors are avoided.

Description

technical field [0001] The invention relates to a Web automation testing framework, specifically an automation testing method based on Selenium and TestNG. Background technique [0002] Selenium is a tool for web application testing that runs directly in the browser, just like a real user is operating. The browsers supported by Selenium include IE, Mozilla Firefox, Mozilla Suite, Google Chrome, etc. The main functions of this tool include: testing compatibility with browsers - testing applications to see if they can work well on different browsers and operating systems; testing system functionality - creating regression tests to verify software functionality and user needs ;Support automatic recording of actions and automatic generation of test scripts in different languages ​​such as .Net, Java, and Perl. Selenium is an acceptance testing tool specially written by ThoughtWorks for web applications. [0003] TestNG is an open source automated testing framework that suppor...

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/3688G06F11/3664G06F11/3672G06F11/3696
Inventor 刘斌
Owner INSPUR QILU SOFTWARE IND
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