Selenium也是一个用于Web应用程序测试的工具。Selenium测试直接运行在浏览器中,就像真正的用户在操作一样。支持的浏览器包括IE(7、8、9)、Mozilla Firefox、Mozilla Suite等。这个工具的主要功能包括:测试与浏览器的兼容性——测试你的应用程序看是否能够很好得工作在不同浏览器和操作系统之上。测试系统功能——创建衰退测试检验软件功能和用户需求。支持自动录制动作和自动生成 .Net、Java、Perl等不同语言的测试脚本。Selenium 是ThoughtWorks专门为Web应用程序编写的一个验收测试工具。

1功能编辑

  • 框架底层使用JavaScript模拟真实用户对浏览器进行操作。测试脚本执行时,浏览器自动按照脚本代码做出点击,输入,打开,验证等操作,就像真实用户所做的一样,从终端用户的角度测试应用程序。
  • 使浏览器兼容性测试自动化成为可能,尽管在不同的浏览器上依然有细微的差别。
  • 使用简单,可使用Java,Python等多种语言编写用例脚本。
 

2优势编辑

据 Selenium 主页所说,与其他测试工具相比,使用 Selenium 的最大好处是:
Selenium 测试直接在浏览器中运行,就像真实用户所做的一样。Selenium 测试可以在 Windows、Linux 和 Macintosh上的 Internet Explorer、Mozilla 和 Firefox 中运行。其他测试工具都不能覆盖如此多的平台。使用 Selenium 和在浏览器中运行测试还有很多其他好处。下面是主要的两大好处:
通过编写模仿用户操作的 Selenium 测试脚本,可以从终端用户的角度来测试应用程序。通过在不同浏览器中运行测试,更容易发现浏览器的不兼容性。Selenium 的核心,也称browser bot,是用 JavaScript 编写的。这使得测试脚本可以在受支持的浏览器中运行。browser bot 负责执行从测试脚本接收到的命令,测试脚本要么是用 HTML 的表布局编写的,要么是使用一种受支持的编程语言编写的。
Selenium 适用于以下浏览器:
Browser
Selenium IDE
Selenium Remote Control
Selenium Core
Selenium 2/Webdriver API
Firefox 10
Record and playback tests
Start browser, run tests
Run tests
Run tests
Firefox 9
Record and playback tests
Start browser, run tests
Run tests
Run tests
Firefox 8
Record and playback tests
Start browser, run tests
Run tests
Run tests
Firefox 7
Record and playback tests
Start browser, run tests
Run tests
Run tests
Firefox 6
Record and playback tests
Start browser, run tests
Run tests
Run tests
Firefox 5
Record and playback tests
Start browser, run tests
Run tests
Run tests
Firefox 4
Record and playback tests
Start browser, run tests
Run tests
Run tests
Firefox 3.6
Record and playback tests
Start browser, run tests
Run tests
Run tests
Firefox 3
Record and playback tests
Start browser, run tests
Run tests
not supported
IE 9
not supported
Start browser, run tests
Run tests
Run tests
IE 8
not supported
Start browser, run tests
Run tests
Run tests
IE 7
not supported
Start browser, run tests
Run tests
Run tests
Safari 3
not supported
Start browser, run tests
Run tests
not supported
Safari 2
not supported
Start browser, run tests
Run tests
not supported
Opera 9
not supported
Start browser, run tests
Run tests
Run tests
Opera 8
not supported
Start browser, run tests
Run tests
Run tests
Chrome
not supported
Start browser, run tests***
Run tests***
Run tests***
Others
not supported
Partial support possible*
Run tests**
not supported
 

3组件编辑

  • Selenium IDE:一个Firefox插件,可以录制用户的基本操作,生成测试用例。随后可以运行这些测试用例在浏览器里回放,可将测试用例转换为其他语言的自动化脚本。
  • Selenium Remote Control (RC) :支持多种平台(Windows,Linux,Solaris)和多种浏览器(IE,Firefox,Opera,Safari),可以用多种语言(Java,Ruby,Python,Perl,PHP,C#)编写测试用例。
  • Selenium Grid :允许Selenium-RC 针对规模庞大的测试案例集或者需要在不同环境中运行的测试案例集进行扩展。
 

4使用编辑

能把Selenium RC脚本和JUnit单元测试结合起来,既能涵盖功能测试,又能涵盖数据或后台Java类测试,从而构成一个完整的Web应用测试解决方案。
首先要安装JRE,从官网(文后参考资料)下载Selenium RC的程序Jar包,存放在硬盘的某个目录中,如E:/Selenium/ 。
启动Selenium RC服务,启动cmd模式,进入到selenium RC所在的目录后,输入: java -jar selenium-server.jar 。启动完成后,可以看到以下信息,即表示启动成功。
 
 
一个学习的网站

Selenium(ThoughtWorks公司开发的web自动化测试工具)的更多相关文章

  1. 开源Web自动化测试工具Selenium IDE

    Selenium IDE(也有简写SIDE的)是一款开源的Web自动化测试工具,它实现了测试用例的录制与回放. Selenium IDE目前版本为 3.6 系列,支持跨浏览器运行,所以IDE的UI从原 ...

  2. selenium-java web自动化测试工具抓取百度搜索结果实例

    selenium-java web自动化测试工具抓取百度搜索结果实例 这种方式抓百度的搜索关键字结果非常容易抓长尾关键词,根据热门关键词去抓更多内容可以用抓google,百度的这种内容容易给屏蔽,用这 ...

  3. 工欲善其事,必先利其器 软件工具开发关键词 protractor自动化测试工具 RegexBuddy正则 CodeSmith,LightSwitch:代码生成 CheatEngine:玩游戏修改内存值必备神器 ApkIDE:Android反编译工具 Reflector:反编译dll动态链接库

    工欲善其事,必先利其器 本文版权归翟士丹(Stan Zhai)和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接,否则保留追究法律责任的权利. 原文地址:http ...

  4. Web自动化测试工具调研

    背景 Web自动化测试越来越被重视, 因为现在Web已经是工程化的状态. 如何通过工具测试, 保证Web开发的质量,提升开发效率,是Web工具的诞生的来由. Web测试分为以下几个方面: 1. 界面测 ...

  5. 软件WEB自动化测试工具之智能元素定位

    江湖一直有着这么一句名言“天下武功,唯快不破".那么在软件测试领域,自然而然我们会想到软件自动化测试.软件自动化测试的实现自然离不开软件自动化测试工具.软件自动化测试工具是软件自动化的载体, ...

  6. 推荐一款国产优秀的基于 AI 的 Web 自动化测试工具——kylinTOP 测试与监控平台

    对于于一般的传统的自动化测试工具,如:Selenium,robotFramework,QTP等.QTP可以通过操作录制生成自动化用例脚本.生成的脚本与Selenium.robotFramework类似 ...

  7. selenium-java web自动化测试工具

    本篇文章由来,这两天整理了下自己经常使用而且很熟练的项目,今天突然想起漏了一个,补上了,但想到还没对应的博客,那就写一个简单的 我经常使用且相对熟练的部分技术如下(不知道算不算各位大神眼中的辣鸡): ...

  8. Android自动化测试工具调研

    原文地址:Android自动化测试工具调研 - Stars-One的杂货小窝 Android测试按测试方式分类,可分为两种:一种是传统逻辑单元测试(Junit),另外一种则是UI交互页面测试. 这里详 ...

  9. web自动化测试(2):选择selenium优势?与PhantomJS/QTP/Monkey对比

    上篇 <web自动化测试(1):再谈UI发展史与UI.功能自动化测试>,自动化测试工具众多, PC端常用的功能自动化测试工具 Selenium:开源工具集,用于回归功能测试或者系统用例说明 ...

随机推荐

  1. 20170801xlVBA含有公式出现弹窗合并

    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Public Sub GatherD ...

  2. ASP.NET的内置对象 —— Request 对象

    Request 对象最大的用途在于提交表单信息. (可获取页面间传递的值.客户端的 IP 地址等) 3.2.2 获取页面间传送的值 获取页面传送参数值是 Request 对象最广泛的应用之一. ASP ...

  3. splunk中mongodb作用——存用户相关数据如会话、搜索结果等

    About the app key value store The app key value store (or KV store) provides a way to save and retri ...

  4. gdb调试分析多线程死锁

    转载: http://blog.chinaunix.net/uid-30343738-id-5757210.html #include <stdio.h> #include <pth ...

  5. hdu 2874 Connections between cities(st&rmq LCA)

    Connections between cities Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (J ...

  6. FE英文缩写

    PM:product manager,产品经理,又称品牌经理,brand managerRD:research and development enginner,研发工程师FE:front-end d ...

  7. docker(二)不管怎么样,先跑起来。运行一个samba,运行一个hello world。

    ---恢复内容开始--- 继续上一篇文章 访问https://hub.docker.com/r/jackadam/samba/ 这是我写的一个docker镜像. 下面有 无脑测试用: docker r ...

  8. 清除 eclipse svn 账号密码

    进入目录 C:\Documents and Settings\administrator\Application Data\Subversion\auth 删除目录下所有文件,然后重新刷新svn地址就 ...

  9. PyQt5编程:鼠标事件

    参考链接:https://www.cnblogs.com/zhuluqing/p/9028816.html 一.每个事件都被封装成相应的类: pyqt中,每个事件类型都被封装成相应的事件类,如鼠标事件 ...

  10. UI基础:UITextField 分类: iOS学习-UI 2015-07-01 21:07 68人阅读 评论(0) 收藏

    UITextField 继承自UIControl,他是在UILabel基础上,对了文本的编辑.可以允许用户输入和编辑文本 UITextField的使用步骤 1.创建控件 UITextField *te ...