当前位置:网站首页>selenium分布式测试
selenium分布式测试
2022-06-10 09:53:00 【王大傻0928】
selenium分布式测试
Selenium Grid
Selenium Grid是Selenium的三大组件之一,其作用就是分布式执行测试。
UI自动化的优势和价值主要体现在:重复执行测试和多浏览器兼容性测试上;那分布式是什么概念?简单的说就是老大收到任务,分发给手下去干;Selenium Grid可以控制多台机器多个浏览器执行测试用例,分布式上执行的环境在Selenium Grid中称为node节点。
Selenium Grid原理
Selenium Grid实际它是基于Selenium RC的,而所谓的分布式结构就是由一个hub节点和若干个node 代理节点组成。 Hub用来管理各个代理节点的注册信息和状态信息,并且接受远程客户端代码的请求调用,然后把请求的命令转发给代理节点来执行。
Selenium Grid有什么用?
- 在不同的浏览器、操作系统和机器上运行测试-分布式测试
- 最大程度用于兼容性测试
- 提高自动化执行效率,减少运行时间
Selenium Grid环境部署
启动Selenium Grid的三种方式:
- 用命令行启动 --bat启动
- 用JSON配置文件启动
- 用docker启动
启动Selenium Grid前准备工作
将会使用2台机器,一台运行hub另一台运行node,为了方便描述,将运行hub的机器命名为“Machine H”(IP:192.168.1.114),运行node的机器命名为“Machine N”(IP:192.168.1.87);2台机器要求在同一个局域网下。
环境要求
- selenium Grid依赖java环境,所以无论是hub和是node机器,都要有JDK的环境
- 下载selenium server,selenium server就是selenium Grid核心,也是启动的关键,将selenium-server- standalone-X.XX.jar分别放在“Machine H”和“Machine N”上(自定义路径)
命令行启动-Selenium Grid
在机器“Machine H”上打开命令行,切换到selenium server所在的路径,运行:java -jar selenium-server- standalone-3.141.59.jar -role hub -port 5566。
验证Hub是否启动成功:
在机器“Machine H”上的浏览器中输入:http://localhost:5566/grid/console ,将会看到下图:
在机器“Machine N”上查看Hub,则浏览器的中的地址中localhost要修改为“Machine H”的IP地址
边栏推荐
- 【蓝桥杯集训100题】scratch苹果熟了 蓝桥杯scratch比赛专项预测编程题 集训模拟练习题第13题
- 5G 联通网管设计思路
- 2022劳务员-岗位技能(劳务员)考试试题及答案
- 无心剑中译里尔克《秋日》
- Neo 黑客松获奖名单揭晓,上万美金花落谁家?
- R language plot visualization: plot to visualize the box graph, and use the quartilemethod parameter to customize the calculation method of the quantile of the box graph (basic boxplot)
- 【FAQ】运动健康服务REST API接口使用过程中常见问题和解决方法总结
- ADB 日志抓取
- 致广大、尽精微,曙光问道算力服务“神经系统”
- 成都測試設備定制_單片機C語言之數據類型初步介紹
猜你喜欢

Do you know all the wonderful functions of the vlookup function?

Notes to docker advanced chapter (7) steps to build a redis three master and three slave cluster case in docker

Requirements and business model analysis - Requirements 17- requirements management

金融风控实战——异常检测(一)
![[dark horse morning post] ant group has no IPO plan yet; Weiya's husband set up a new live broadcasting company; CEO of Weibo questioned SF; JD will pilot the catering takeout business; Tencent's tale](/img/d7/4671b5a74317a8f87ffd36be2b34e1.jpg)
[dark horse morning post] ant group has no IPO plan yet; Weiya's husband set up a new live broadcasting company; CEO of Weibo questioned SF; JD will pilot the catering takeout business; Tencent's tale

威纶通触摸屏直接与台达变频器进行MODBUS RTU通信的具体方法(图文)

5G 聯通網管設計思路

如何在微信小程序中优雅地发送异步请求?

Only this is the most true reason why leaders promote you. The rest is nonsense!

416. segmentation and subsets
随机推荐
六月集训(第10天) —— 位运算
怎么办理艺术品备案?办理艺术品备案要准备哪些材料?
Stream流概述
Only this is the most true reason why leaders promote you. The rest is nonsense!
Example 3 of lambda expression
如何在微信小程序中优雅地发送异步请求?
图像处理理论和应用
Bing's website search site: < domain name>< search content>
2022年普通脚手架工(建筑特殊工种)操作证考试题库及模拟考试
威纶通触摸屏直接与台达变频器进行MODBUS RTU通信的具体方法(图文)
装饰器模式
R语言使用lmPerm包应用于线性模型的置换方法(置换检验、permutation tests)、使用lm模型构建多项式回归模型、使用lmp函数生成置换检验多项式回归模型
【图像去噪】基于matlab BdCNN图像去噪【含Matlab源码 1866期】
基于STM32设计智能家居控制系统(OneNet)_2022
张小白教你使用OGG实现Oracle 19C到MySQL 5.7的数据同步(1)
The R language coin package is applied to permutation tests for independence problems, one-way ANOVA and approximate k-sample permutation tests on the same data set, and comparing whether the mean val
June training (day 10) - bit operation
程序编译基本过程
Notes to docker advanced chapter (7) steps to build a redis three master and three slave cluster case in docker
Use nsenter to enter netns to capture packets