Selenium是一个很好的多平台多浏览器的自动化测试框架,Selenium提供了2种运行模式——Core和Remote Control(RC),除此之外,ThoughtWorks还为Selenium提供了Firefox的Add-on——Selenium IDE以及RC模式的扩展Selenium Grid。现在的版本为Selenium 1.0 beta-1 released (March 5, 2008)
支持的平台和浏览器:
Supported Platforms:
- Windows:
- Internet Explorer 6.0 and 7.0
- Firefox 0.8 to 2.0
- Mozilla Suite 1.6+, 1.7+
- Seamonkey 1.0
- Opera 8 & 9
- Mac OS X:
- Safari 2.0.4+
- Firefox 0.8 to 2.0
- Camino 1.0a1
- Mozilla Suite 1.6+, 1.7+
- Seamonkey 1.0
- Linux:
- Firefox 0.8 to 2.0
- Mozilla Suite 1.6+, 1.7+
- Konqueror
- Opera 8 & 9
Selenium is a test tool for web applications. Selenium tests run directly in a browser, just like real users do. It runs in Internet Explorer, Mozilla and Firefox on Windows, Linux, and Macintosh, Safari on the Mac. We have plans to target Safari on the iPhone in some months.
具体信息可以参见Selenium首页,http://selenium.openqa.org/
1、Selenium Core:http://selenium-core.openqa.org/
Core模式一般是通过编写HTML后加载到要测试的Web程序中
Core mode: The JavaScript core library and the tests in question are loaded into your webapp. It is a simpler form of Selenium, and suitable for non-developers, but it has some inherent limitations. Below is a simplified representation of the architecture.
Your tests scripts (written in HTML) and the Selenium Test Runner itself are uploaded to the same web server that hosts the application you are trying to test. That suggests that you know how to deploy to that web server (or know someone who does).
You open a browser at a URL that will kick off the tests, and watch them run by.
Selenium Core works on muliple browsers - more than the three shown on the left.
2、Selenium RC:http://selenium-rc.openqa.org/
The Remote Control mode is more advanced. It is able to test a wider range of web-applications than Selenium-Core and is more scalable, but requires some technical knowledge to set up. Below is a simplified architectural representation of it ..
RC模式可以通过多种编程语言支持驱动客户端浏览器,
最主要的是还能支持AJAX应用程序(The Selenium Server is great for testing complex AJAX-based web user interfaces under a Continuous Integration system. It is also an ideal solution for users of Selenium Core or Selenium IDE who want to write tests in a more expressive programming language than the Selenese HTML table format customarily used with Selenium Core.)
Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.
Selenium RC comes in two parts.
- A server which can automatically launch and kill supported browsers, and acts as a HTTP proxy for web requests from those browsers.
- Client libraries for your favorite computer language.
3、Selenium Grid:http://selenium-grid.openqa.org/
Selenium Grid is a tool that dramatically speeds up functional testing of web-apps by leveraging your existing computing infrastructure. It allows you to easily run multiple tests in parallel, on multiple machines, in an heterogeneous enviroment.
This additional server piece allows the several Remote Control servers to accessed in parallel by one or more driving processes. You may want to do this if you want to use scale to speed everything up, or because you need to test on Mac and/or Linux, as well as Windows from one driving test-suite.
Based on the excellent Selenium web testing tool, Selenium Grid allows you to run multiple instances of Selenium Remote Control in parallel. Even better, it makes all these Selenium Remote Controls appear as a single one, so your tests do not have to worry about the actual infrastructure. Selenium Grid cuts down on the time required to run a Selenium test suite to a fraction of the time that a single instance of Selenium instance would take to run.
Of course, you get to choose which language you develop your tests in: Ruby, Java, Python, C#, PHP, ...
4、Selenium IDE:http://selenium-ide.openqa.org/
Selenium IDE is an integrated development environment for Selenium tests. It is implemented as a Firefox extension, and allows you to record, edit, and debug tests. Selenium IDE includes the entire Selenium Core, allowing you to easily and quickly record and play back tests in the actual environment that they will run.
Selenium IDE is not only recording tool: it is a complete IDE. You can choose to use its recording capability, or you may edit your scripts by hand. With autocomplete support and the ability to move commands around quickly, Selenium IDE is the ideal environment for creating Selenium tests no matter what style of tests you prefer.
Features:
- Easy record and playback
- Intelligent field selection will use IDs, names, or XPath as needed
- Autocomplete for all common Selenium commands
- Walk through tests
- Debug and set breakpoints
- Save tests as HTML, Ruby scripts, or any other format
- Support for Selenium user-extensions.js file
- Option to automatically assert the title of every page
This Firefox plugin allows you to record and playback tests in the browser. Here is a screen shot of it in use (in the side-bar of Firefox):
目前Selenium IDE有了支持Firefox 3.0的版本,
Version 1.0 Beta 2
- Date: 06/03/2008
- Description: Includes Selenium Core 1.0-SNAPSHOT
- Changelog
- Downloads:
http://selenium-ide.openqa.org/download.jsp
5、ThoughtWorks
Selenium是由ThoughtWorks团队开发的开源自动化测试框架,http://www.thoughtworks.com.cn/,ThoughtWorks是一个全球IT咨询公司。交付客户定制应用软件,提供注重实效的咨询服务,为企业开发软件,帮助企业敏捷开发。
Selenium was developed by team of developers and testers at ThoughtWorks. It is open-source software and can be downloaded and used without charge. It is currently under active development developers from multiple companies. See who made Selenium for more details.
ThoughtWorks is a leader in Agile development methods for enterprise software development. Selenium is designed specifically for the acceptance testing requirements of Agile teams. However, teams using more traditional development will also find it useful.