selenium测试-初体验(一)

来源:互联网 发布:带网络的pe 编辑:程序博客网 时间:2024/06/14 09:08


What is selenium ?

 

  Selenium is a set of different software tools eachwith a different approach to supporting test automation. Most Selenium QAEngineers focus on the one or two tools that most meet the needs of theirproject, however learning all the tools will give you many different optionsfor approaching different test automation problems. The entire suite of toolsresults in a rich set of testing functions specifically geared to the needs oftesting of web applications of all types. These operations are highly flexible,allowing many options for locating UI elements and comparing expected testresults against actual application behavior. One of Seleniums key features is thesupport for executing ones tests on multiple browser platforms.

  selenium is a tool for web application testing

Selenium's advantage

  1. Selenium-WebDriver supports the following browsers along with the operating systems these browsers are compatible with.
  • Google Chrome
  • Internet Explorer 6, 7, 8, 9, 10 - 32 and 64-bit where applicable
  • Firefox: latest ESR, previous ESR, current release, one previous release
  • Safari
  • Opera
  • Android
  • HtmlUnit
  • Phantomjs 
  1. Can be run directly to the browser ,just as real users do .


Relationship


Selenium 1.0 ( Before Test must start RC )+WebDriver(htmlUnit) = Selenium 2.0

SeleniumWebDriver

Theprimary new feature in Selenium 2.0 is the integration of the WebDriver API.WebDriver is designed to provide a simpler, more concise programming interfacein addition to addressing some limitations in the Selenium-RC API.Selenium-WebDriver was developed to better support dynamic web pages whereelements of a page may change without the page itself being reloaded. WebDrivers goal is to supply a well-designedobject-oriented API that provides improved support for modern advanced web-apptesting problems.

In a word ,Browsers select the mostappropriate language to write scripts


Selenium-IDE

TheSelenium-IDE (Integrated Development Environment) is the tool you use todevelop your Selenium test cases. Its an easy-to-use Firefox plug-in and is generally the most efficientway to develop test cases. It also contains a context menu that allows you tofirst select a UI element from the browsers currently displayed page and then select from a list of Seleniumcommands with parameters pre-defined according to the context of the selectedUI element. This is not only a time-saver, but also an excellent way oflearning Selenium script syntax.

· Based on Firefox plug

· To run the Selenium-IDE, simplyselect it from the Firefox Tools menu. It opens as follows with an emptyscript-editing window and a menu for loading,    or creating new test cases.

Selenium Remote Control (RC)


 RC is a test tool that allowsyou to write automated web application UI tests in any programming languageagainst any HTTP website using any


mainstreamJavaScript-enabled browser.

 Defect: only supportJavaScript browsers

Selenium Grid

  • Scale by distributing tests on several machines ( parallel execution )
  • manage multiple environments from a central point, making it easy to run the tests against a vast combination of browsers / OS.
  • minimize the maintenance time for the grid by allowing you to implement custom hooks to leverage virtual infrastructure for instance.

            

          Allow parallel, in a variety of environments running on more thanone test task


Relevant Reference Sites:https://github.com/SeleniumHQ/selenium/wiki/Grid2


 





    
    0 0
    原创粉丝点击