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)