Tag: "selenium"

Webdriver Backed Selenium: use RC and WebDriver together

Today we have added full support for Webdriver-backed Selenium, which allows you to use the two API’s together in a single test.

By using this feature, it will be easier for you to migrate your existing Selenium RC tests to the new WebDriver format.
Here’s a list of reasons on why you should consider start using WebDriver:

  • Better and more consistent API
  • Improved emulation of user interactions. WebDriver uses native events in order to interact with a web page, where possible.
  • Support by the major browser vendors. Chrome, FireFox and Opera are all active contributors in WebDriver’s development
  • Faster, less error-prone tests
  • Even though not all RC commands are supported, you can now run most of your RC tests on a WebDriver instance inside our grid.
    An example of using the two API’s together in Ruby would be:

    #!/usr/bin/env ruby
    
    require "rubygems"
    require 'testingbot' 
    gem "selenium-client"
    gem "selenium-webdriver"
    require "selenium-webdriver" 
    require "selenium/client"
    
    selenium = Selenium::Client::Driver.new :host    => "hub.testingbot.com",
                                            :port    => 4444,
                                            :url     => "https://www.facebook.com",
                                            :browser => "*webdriver"
                                            
    caps = {
      :browserName => "iexplore",
      :platform => "WINDOWS"
    }
    urlhub = "http://API_KEY:API_SECRET@hub.testingbot.com:4444/wd/hub"
    client = Selenium::WebDriver::Remote::Http::Default.new
    client.timeout = 120
    
    
    @webdriver = Selenium::WebDriver.for :remote, :url => urlhub, :desired_capabilities => caps, :http_client => client
    selenium.start :driver => @webdriver
    puts @webdriver.title == selenium.title # WebDriver and RC together
    selenium.open "/" # RC
    @webdriver.quit # WebDriver
    

    This test will show up in our member area with screenshots/video and a list of steps from both RC and WebDriver.

    VN:F [1.9.22_1171]
    Rating: 0.0/10 (0 votes cast)
    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

Test TV – Live video stream of your tests running in the Cloud


Today we released a new feature in our TestingBot member area called Test TV.

With Test TV, you are now able to see your Selenium tests running in our Cloud.
A live video (secure VNC connection) will show your test running on any browser/mobile device straight from your test page.
When the test is completed, the live video will be stopped and will be replaced by a video recording of the test.

Test TV utilises HTML5 to show the live feed of your test which means it operates straight from inside your browser, no additional software is required.

To see it in action, log in to our member area and run a Selenium test. While the test is running, go to the test page. A video stream will appear where you will see your test running.

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: -1 (from 1 vote)

Mac OS X Selenium testing. Webdriver and Selenium RC testing with Apple.

We will make a lot of people happy with this announcement: today we start providing our customers with Mac OS X testing on-demand.
Next to testing on Windows (2008/2003), Linux and Android we now finally provide testing on Apple’s OS.

We provide a video and screenshots of your test running on OS X, just like we do with all the other platforms we support.
An example in Ruby of running a test on the mac would be:

require "rubygems"
require 'testingbot' 
gem "selenium-client"
gem "selenium-webdriver"
require "selenium-webdriver" 
require "selenium/client"

caps = {
  :browserName => "firefox",
  :platform => "MAC"
}
urlhub = "http://key:secret@hub.testingbot.com:4444/wd/hub"
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 120

webdriver = Selenium::WebDriver.for :remote,:url => urlhub , :desired_capabilities => caps, :http_client => client
webdriver.navigate.to "http://www.testingbot.com/"
puts webdriver.title
webdriver.quit

The browsers we currently support on MAC are:

  • Firefox 11
  • Safari 5
  • Google Chrome

List of all browsers/OS versions we support: browsers

OS X testing is available in beta to our customers (excluding free trials). Enjoy!

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Run a test with our free demo

 

Today we’ve added a form on the homepage for visitors to try out our service.
This simple demo will open the website you’ve entered in Internet Explorer 8 and perform a basic test.

It should give you a sense of how easy it is to use our service and test your websites.

 

 

Once you entered a website address, you will see this page. It will take up to one minute for the test to finish.
As soon as the test is finished, you will see the results together with screenshots and a video.

Start testing your website today with our free trial plan!

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Creating a Selenium test from scratch

In this blogpost we’ll talk about creating your first Selenium test, running the test on your own computer and then later run it on several browsers at once.
It shouldn’t be too hard to follow along, but if you have any questions or remarks, please leave a comment.

Prerequisites

Before we can create a test, we first need a website and an idea of what to test on the website.
Let’s say we have an e-commerce website selling products.

An important part of your e-commerce website is the shopping cart, this virtual cart keeps track of the products the visitor indicated he/she wants to purchase.
If this shopping cart functionality should fail, for whatever reason (bug, code changes, human error, …) the owner of the website will immediately start losing money and customers.

In an effort to prevent this, we decide to create a functional test with Selenium to verify if the shopping cart is still functioning like it should.

The first thing we need is to download the Selenium IDE addon for Firefox. It will help us in creating our first Selenium test.

The IDE has a function to record your browsing activity. All you need to do is launch the addon, click the record button and start performing actions.

Our first test

In our case, we would click the record button, go to our e-commerce website and click “Add to cart” on a specific product.
We’ll then go to the shopping cart page and verify if our product is in the cart. Right click the title of the product in the cart and select “verifyTextPresent”.
This will verify if the product is in fact in our cart.

Stop the recording of the test. Your first Selenium test is ready!
You can now choose to run this test in your browser. It will mimic the actions you just performed and verify that the product is in fact in your shopping cart.

We could stop here and run this test manually every time we want to test our shopping cart. But what about other browsers, maybe the cart is broken in Internet Explorer, a browser used by a lot of people.

Run your test on multiple browsers

That’s where TestingBot.com shines. You simply add your test to our website, choose which browsers you want to run it on and how many times per day/week/month.
We run the tests for you on the browsers you want. If a test should fail, we’ll alert you so you know that something is wrong with your shopping cart.

You can then fix the problem without losing visitors and revenue.

Screencast

We’ve made a screencast of the above example so you can follow along easily:

Let us know what you think.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

We run your Selenium tests super fast

After some more optimizations in our code and infrastructure we’ve now reached the point where the average simple test takes 9 seconds.
Compared with competitors, we’re 2 to 3 times faster in running your test.

This means that you can run more tests in less time at testingbot.com

Here are some benchmarks with a simple test that starts an Internet Explorer browser (7) and verifies the title of google.

competitors:
0.0496 tests/s, 0.0496 assertions/s.

real 0m22.299s
user 0m2.064s
sys 0m0.112s

testingbot.com:
0.12 tests/s, 0.12 assertions/s

real 0m8.833s
user 0m0.212s
sys 0m0.028s

We’ll be experimenting with a quick-launch feature soon where we’ll speed up the startup of a browser (the most time-consuming event during testing).

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

5 Reasons why you should be using TestingBot

 

Actually, there are more than 5 reasons why you should be using our service.
We will list the top 5 reasons below, but if you want to discover what the other reasons are, please sign up.

Reason 1 : Keep your website pristine

Whenever you build a website, you want people to visit the website you’ve made.

You spent a lot of time and effort building your website: coding, designing the pages, architecting the flow, …
As soon as you start welcoming visitors to your website, you want their experience to be flawless.
You can not afford bugs. Bugs will frustrate the visitor/consumer on your website.
Making a visitor feel frustrated might make you lose a potential sale or get you bad word-of-mouth advertising.

With TestingBot, you can create simple tests to make sure your website does not suffer from bugs.
By using Selenium and its easy to use Firefox plugin, you can easily decide which things need to be tested and how they need to be tested.

At TestingBot, we will run your tests every day at the interval you specify.
Whenever we detect an error, we’ll alert you so you can fix the bug.
By using our cross browser testing service, you no longer have to worry about bugs on your live website.

Reason 2 : We’ve got you covered on all browsers

In our Selenium Grid, which is cloud based on Amazon’s AWS, we host a cluster of all browsers and browser versions.
Need to test on Internet Explorer 8, Firefox 3.6 or Safari 5?
We’ve got all of these running on our grid and ready for you to use.

By using Amazon’s cloud, we can quickly scale on demand.
If you need to run tests on 10 different browser versions then we’ve got you covered.
We instantly boot up additional servers with the correct browsers and run your tests.

Reason 3 : TestingBot will run your tests fast

Our servers, grid and browsers are tuned for speed. We run the hub of our grid, which instructs its nodes, on a beefy machine in a local network.
The network is optimized for fast transport, which means your test will run very fast in our grid.
The OS (Windows 2008 and Windows 2003) are optimized for speed. We tuned it for performance by only running the basic services Windows requires.
The browsers are tweaked for performance and speed by using registry edits and optimal settings.

Reason 4 : Our prices – They’re the cheapest

We guarantee to offer the cheapest prices on the web.
By using Amazon’s cloud infrastructure, we can quickly scale up and down.
This means that we can cut down on the costs of servers (nodes).
When we no longer need a server, it is shut down to preserve costs.

These savings allow us to go below the market price and offer you the best solution at the cheapest price.

Reason 5 : Our Support – We are there for you

TestingBot provides an extensive support area with lots of documentation.
Need help running your first test, trying to run a test in a specific programming language or want to see some example code?
Take a look at our knowledge base or ask us a question in our Support forum.

If you are not yet a customer of TestingBot, we hope you’ll consider joining us.
Should you have questions or remarks about our service, please contact us and we’ll get back to you as soon as possible.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

TestingBot Launches

With the start of this new website we provide every developer a powerful tool to run cross browser tests in the cloud.

Running Selenium tests across various browsers has never been easier with our plugins, example code and easy to use grid.

Sign up for a free account to start testing your website/webapp/software in various browsers.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)