15
A Case Study

A Case Study - squadco.com · Multiple languages (Watin, Watir, Watij) ... Selenium vs WebDriver/WatiX

Embed Size (px)

Citation preview

A Case Study

• Introduction• Open Source Tools: a review

– nUnit – Fitnesse– SoapUI– Selenium– Watix– WebDriver

• Selecting the right tools– Your needs– Your goals– Your limitations

• eCollege example

• Unit testing tools test code directly.

• Not usually QA’s responsibility.

• Used to drive other tests.

• Language Specific– jUnit

– nUnit

• Classes/Functions marked with tags– Uses Setup/Test/Teardown format

– Executed in any order

– Designed to integrate with a build server

• Fitnesse

– Fit + Wiki

– Website to remotely edit and run tests

– Fixtures translate tables to actions

– Text editor

– Integrates easily with CI servers

• SoapUI

– GUI: good and bad

– Client driven

– Hard to create dynamic tests

Selenium

WatiN

WebDriver

Others

• A suite of tools – use the one that works– IDE

– Core

– Remote Control

– Grid

• Implemented using Javascript

• Supports any OS/browser

• Supports many languages

• Has technical limitations

• Very popular, tons of support

• Driven from xUnit

Second most popular option

Multiple languages (Watin, Watir, Watij)

IE/Firefox Only

Windows only

Less technical limitations than Selenium

Driven by nUnit

Clean API

Google’s Open Source Project

Based on WatiX

More browser support

Java or C#

Driven by nUnit

Merging with Selenium to become Selenium2

Cucumber Business Driven Development model

Tests are written in pseudo-English

Good for acceptance testing

DBFit Fitnesse for database testing

Webload Load testing

Simple GUI

Good graphs

Record/playback

What type of application are you testing? What is your technical level? What language? What are your OS/browser requirements?

Selenium vs WebDriver/WatiX

What are you automating? Data generation Functionality Regression Sanity/Smoke Test

Does the tool work with your site Selenium can have issues

Most UI tests are just click/type/validate

Most have equivalent functional scope.

Some are a little better in one area than another

Some people like one more than another

Some require more or less coding knowledge

A good engineer can use any tool

Don’t know where to start Use Selenium IDE

Want to start coding some tests Export some tests from

Selenium IDE

Need Mac/Linux support Use Selenium

Can’t get Selenium RC to work right with my website Try WebDriver

Need Safari/Chrome Support Use Selenium

Need Record/Playback support Use Selenium IDE

Test/Business Driven Development Use Cucumber or Fitnesse

Want to be cool Use Selenium2

Very Agile Development Team Continuous Integration Weekly/Bi-weekly releases Virtual Environments Easy deploy process

Mobile Website Data dependant functionality

Not many functional paths Data changes daily

Safari support

RESTful services No GUI Client facing Data dependant XML/Json

My Goal Automated build validation

Automated regression testing

Automated data generation

Tests work in all environments out to prod

Need OS/Browser support

Integrate with Hudson

Some fitnesse tests were already written Extended those to be dynamic

Maintenance is a pain

Another tool may work better

Start small and simple Create/Maintain a

sanity/smoke test Only worry about 1

browser/os Think about

maintainability, readability, usability.

Create a re-usable framework for your Tests Common functions Standardized Reporting Repeatable Data

Generation Variables/Config file Logical Project Structure

PageObjects can help Page based object oriented

design Actions are functions Tests call a page’s functions Constructors cause

automatic validations Automatic re-usable

routines Changes are easily

identifiable

Xpath is your new BFF Just Bing it (haha yeah

right)