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. android----AsyncHttpClient的get,post和图片上传

    async-http-client库是一个基于回调函数的Http异步通信客户端Android组件,是在Apache的HttpClient库的基础上开发构建而成的. Eclipse使用:导入androi ...

  2. iOS UI-常用控件

    #import "ViewController.h" @interface ViewController ()<UITextFieldDelegate> // 标题标签 ...

  3. php中的curl的一些参数总结

    curl可以根据是否是http或则是https选择加密发送的内容: 使用curl发送请求的基本流程 1,初始化连接句柄: 2,设置curl选项: 3,执行并获取结果: 4,释放curl连接句柄: 例子 ...

  4. learning shell built-in variables (1)

    Shell built-in variables [Purpose]        Learning shell built-in variables, example $0,$1,$2,$3,$#, ...

  5. Hexo博客搭建教程

    1.使用淘宝npm源 $ npm install -g cnpm --registry=https://registry.npm.taobao.org 2.安装hexo cnpm install -g ...

  6. 快速切题 sgu116. Index of super-prime bfs+树思想

    116. Index of super-prime time limit per test: 0.25 sec. memory limit per test: 4096 KB Let P1, P2, ...

  7. windows10自动登陆

    老是记不住命令,记录一下 win+R  输入以下命令 Control Userpasswords2

  8. Linux->卸载Mysql方法总结

    如何在Linux下卸载MySQL数据库呢? 下面总结.整理了一下Linux平台下卸载MySQL的方法. MySQL的安装主要有三种方式:二进制包安装(Using Generic Binaries).R ...

  9. 网页不能显示PNG验证码的解决办法

    解决方法: 开始->运行,在运行输入框中输入 “regsvr32 c:\windows\system32\pngfilt.dll”(然后点击确定)如果在注册时出现 “已加载c:\windows\ ...

  10. L242

    They provide a means of keeping track of the thousands of journal papers that are published monthly ...