Selenium multi-threaded startup grid Distributed test framework Encapsulation (i)

Source: Internet
Author: User
Tags log4j

First, design ideas

In the domestic market, ie Core Browser occupies the majority of the market share, then the framework package will be the IE series of browsers for multi-threaded concurrent implementation of distributed testing package.

The run-time main process and multithreading relationships are as follows:

                  

Running threads is the thread that we use to run a use case, where monitor thread 1 monitors the running state of running thread 1.

Second, the preparation of the preparatory

1. Create a Java project.

2, import Selenium, dom4j, log4j related jar package

can go online to find the jar package, but also to my cloud disk download, address:

Selenium jar and source code jar:http://yunpan.cn/ckaj6nay3qt9z access password 1732

Dom4j:http://yunpan.cn/ckaj2rekdfxsa Access Password b710

LOG4J:HTTP://YUNPAN.CN/CKAJERYJ757QC Access Password C300

3, the preparation of several units as a service end of the test machine, such as the practice of not so many physical machines can also choose to use virtual machines to practice.

4, download Selenium server, FQ students can go to the official website to download, not FQ to my cloud disk download, address: Http://yunpan.cn/cKaJq6JvSsr5T access password Aae6

5. Install the Java operating environment JDK on all test machines.

6. After configuring the Java environment variables, run Selenium server

Command: Javar-jar Selenium-server-standalone-2.24.1.jar

This step can also be done while the code is being debugged.

Third, the configuration file design

Create an XML file named: Remoteserverlaunchinfo.xml

<?xml version= "1.0" encoding= "UTF-8"?><lingfeng><!--homepage is the home page we want to test-->

Because I am a person to write this XML file, there is no XML Schema design, write yourself a bit, haha!

Iv. Directory Creation

Com.lingfeng.domain This directory is used to store javabean that need to be saved
Com.lingfeng.junit Test Code Save Directory
Com.lingfeng.start Entry Directory
Com.lingfeng.staticPage Open the Site directory you want to test, and also the directory where the use case code is stored
Com.lingfeng.utils Tools Catalog

The directory creation is completed as follows:

        

To BE continued!!!!! Come on Now!

Selenium multi-threaded startup grid Distributed test framework Encapsulation (i)

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.