Web automation Framework Lazyui User's Manual (1)--Framework Introduction

Source: Internet
Author: User
Tags manual xpath zip
Author: cryanimal qq:164166060 Introduction to Web-side automation

Web-side automation, that is, through the automated way, the implementation of a series of Web page imitation Mouse keyboard operation, to achieve the function of the Web page to test automation.

The general process is shown in the following figure:

Introduction to Common tools for web-side Automation

Web-side automation testing is usually QTP or selenium.

QTP, commercial tools (charge), cumbersome, but powerful, easy to use, is a complete set of automation solutions, and suitable for the C/S,B/S structure. The biggest drawback is the VBS syntax system, which is less suitable for writing large projects and inefficient, so QTP is now easily replaced.

Selenium, open source tools, lightweight, suitable for a variety of languages to write, can be run on a variety of mainstream browsers, but only support B/s system, and need a certain programming foundation, difficult to get started. analysis of difficulties in web-side automation

a certain coding ability threshold . Build test framework, familiar with selenium API, successfully launch browser, familiar with the front end, etc., often will put the new people in the threshold outside;

control (Element) gets * heavy workload, miscellaneous *. Web Automation is concentrated in the "Getting XPath for the page elements required for testing", and "checking to see if XPath can uniquely locate elements";

test Case stability is low . Because the browser vendor and version, Web-side UI changes caused by XPath instability and other factors, resulting in the test case is not stable, the test case itself more problems than the bugs found, maintenance costs; Lazyui Framework Introduction

Lazyui is committed to solving the above three difficulties, reducing entry thresholds and learning costs, simplifying element acquisition & coding, and improving the stability of test cases, so as to achieve the goal of automating the Web automation work quickly and concisely.

Lazyui is based on selenium and consists of three parts:

1. element Get plugin : Elements Extractor

The chrome plugin, used to crawl common controls on a page (either batch or single), generates Java code based on the Lazyui framework and solves the problem of fetching complex elements.

Get Address:
Https://github.com/lazytest/LazyTest-Elements-Extractor/archive/master.zip

Unzip the file: Lazytestelementsextractor.crx and drag it to Chrome to install it.

2. Browser Operation API: Lazyui-api

provides a common way to simulate mouse keyboard actions on a browser (such as opening a browser, jumping to a URL, switching windows, switching an iframe, entering, selecting, clicking on an element, getting attributes, text, and so on).

Download the project template in 3 and MAVEN will automatically introduce it.

or add resources to the POM:

' <repositories>
    <repository>
        <id>lazytest</id>
        <url>https:// raw.githubusercontent.com/lazytest/mvn-repo/master/repository</url>
    </repository>
</ Repositories> '

and increase dependency:

' <dependency>
    <groupId>lazy.test</groupId>
    <artifactid>lazy-test-ui-tools</ artifactid>
    <version>1.0.0</version>
</dependency> '

3. formwork engineering : lazyui-template

provides maven-managed, spring+testng-based, Java template Engineering with common browser driver, easy connection to various databases, and provides the first test case with Baidu search as an example.

Get address: Https://github.com/lazytest/LazyTest-UI-Template/archive/master.zip Summary

This article briefly introduced the Lazyui framework, follow-up article will be hand-in-hand detailed lazyui to use, Welcome to continue Reading

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.