Sie sind auf Seite 1von 7

This DZone Refcard is brought to you by...

Selenium Load Testing & Performance


Monitoring Solution
TestMakerTM is the Open Source Test (OST) solution to:

1. Repurpose Your Selenium Scripts


To Be Functional Tests, Load and
Performance Tests, and Business
Service Production Monitors

2. Advanced Selenium Functions


Not Available Anywhere Else.
For Example, Data-enable Your
Selenium Scripts With No Coding.
And advanced reporting.

3. Run Your Selenium Scripts in a


PushToTest is the trusted Selenium partner to Ford, Grid or Cloud, or Both! Inside
PepsiCo, Intuit, Cisco, and Deutsche Bank. or Outside Your Firewall. Up to
Millions of Virtual Users. No
PushToTest Global Services delivers Selenium
Coding. And advanced reporting.
training, consulting, integration, and professional
technical support. We provide on-site, near-shore,
and off-shore experts. PushToTest training moves The free live webinar will be held on
your team from manual to automated testing and off the following dates:
proprietary test tools to Open Source Testing (OST.)
January 18, 2011, Tuesday, 8 am to 9
am (Pacific, California Time)
REGISTER FOR FREE
http://seleniumworkshop.com February 1, 2011, Tuesday, 8 am to 9
am (Pacific, California Time)
February 15, 2011, Tuesday, 8 am to 9
am (Pacific, California Time)

For more information visit http://www.pushtotest.com


about PushToTest products and services or contact PushToTest sales at sales@pushtotest.com
or call +1 408 871 0122 (USA, California Pacific Time)

DZone
brought to you by...
#125
Get More Refcardz! Visit refcardz.com

Selenium 2.0:
CONTENTS INCLUDE:
n
What is Selenium 2.0?
n
Architecture
n
Installation
n
Driver Implementations Using the Webdriver API to Create Robust User Acceptance Tests
n
Page Interaction Model
n
Mobile Device Support and more... By Matt Stine

Therefore, the developer API exists as a thin wrapper


WHAT IS SELENIUM 2.0?
around the core of each driver.

Selenium 2.0 is a tool that makes the development of automated


tests for web sites and web applications easier. It represents
the merger of the original Selenium project with the WebDriver
project. WebDriver contributes its object-oriented API for
Document Object Model (DOM) interaction and browser
control as well as its various browser driver implementations.

The WebDriver approach to browser control differs significantly  


from the Selenium approach. Whereas Selenium runs as a 4. R
 eduction in Cost of Change: share as much code
JavaScript application inside the targeted browser, WebDriver as possible between the driver projects. This is
drives the browser directly through the most sensible means accomplished via the use of “Automation Atoms,”
available. For Firefox, this meant using JavaScript wrapped which are JavaScript libraries implementing various
in an XPCOM component; however, for Internet Explorer, this read-only DOM query tasks. These Atoms are used for
meant using C++ to drive IE’s Automation APIs. two purposes. The first is to compose a monolithic driver
(such as the FireFox driver) written primarily in JavaScript.
The merger of these two projects allows each technology’s
The second is to augment existing drivers written in other
strengths to mitigate the other’s weaknesses. For example,
languages with tiny fragments of highly compressed
Selenium has good support for most common use cases, but
www.dzone.com

JavaScript. This augmentation will reduce execution and


WebDriver opens up many additional possibilities via its ability
parsing time.
to step outside of the JavaScript sandbox. Going forward, both
of these APIs will live side by side in a synergistic relationship,
INSTALLATION
allowing automated test developers to easily leverage the right
tool for the job.
Java
Selenium 2.0 currently supports writing cross-browser tests
From http://code.google.com/p/selenium/downloads/list
in Java (and other languages on the JVM including Groovy),
download the following two files and add them to your
Python, Ruby, and C#. It currently allows developers to target
classpath (version numbers are the latest as of this writing):
Firefox, Internet Explorer, and Chrome with automated tests.
It also can be used with HtmlUnit for “headless” application • s elenium-server-standalone-2.0a7.jar contains the
testing. Furthermore, driver implementations exist for the iOS Selenium server (required to use Selenium 1.x classes)
(iPhone/iPad), Android, and BlackBerry platforms. and the RemoteWebDriver server, which can be
executed via java -jar.
The remainder of this Refcard will focus on the WebDriver
contributions to the Selenium 2.0 project and will take a brief
look at how to leverage the Selenium API via WebDriver.

ARCHITECTURE
Selenium 2.0

The WebDriver team chose to focus on four primary


architecture concerns:
1. T
 he User: WebDriver drives the browser from your end
user’s point of view.
2. A
 “Best Fit” Language: each browser has a language that
is most natural to use from an automation perspective.
The various drivers are implemented as much as possible
in that language.
3. A
 Layered Design: developers should be able to write
their tests in the supported language of their choice, and
these tests should work with all driver implementations.

DZone, Inc. | www.dzone.com


2 Selenium 2.0: Using the WebDriver API to Create Robust User Acceptance Tests

• s elenium-java-2.0a7.zip contains the Java language From C#:


bindings for Selenium 2.0. All of the necessary IWebDriver driver = new InternetExplorerDriver();
dependencies are bundled.
Java (Maven) Chrome
The Chrome driver is comparatively new. Because Chrome
Add the following to your pom.xml:
is based on Webkit, you may be able to verify that your
<dependency>
<groupId>org.seleniumhq.selenium</groupId> application works in other Webkit-based browsers such as
<artifactId>selenium</artifactId>
<version>2.0a7</version>
Safari. However, because Chrome uses V8 JavaScript engine
</dependency> rather than the Safari Nitro engine, you may experience some
differences in behavior.
<dependency>
<groupId>org.seleniumhq.selenium</groupId> From Java:
<artifactId>selenium-server</artifactId>
<version>2.0a7</version> WebDriver driver = new ChromeDriver();
</dependency>
From Ruby:
Ruby
driver = Selenium::WebDriver.for :chrome
Run the following command:
gem install selenium-webdriver From Python:
from selenium.chrome.webdriver import WebDriver
Python driver = WebDriver()

Run one of the following commands:


From C#:
easy_install selenium
IWebDriver driver = new ChromeDriver();

or
pip install selenium
HtmlUnit
The HtmlUnit driver is the fastest and most lightweight of the
C# group. It is the only pure Java implementation, so it is the
Download selenium-dotnet-2.0a6.zip and add references to only solution that will run anywhere the JVM is available.
WebDriver.Common.dll and WebDriver.Firefox.dll (or your Because it utilizes HtmlUnit to interact with your application
browser of choice) to your Visual Studio project. instead of driving an actual browser, it carries along the
associated baggage:
DRIVER IMPLEMENTATIONS •Y
 ou cannot visually inspect what’s going on during
your test.
There are currently four official driver implementations for •H
 tmlUnit uses Rhino as its JavaScript+DOM
desktop browsers: implementation. No major browser does this, and it is
Firefox disabled by default.
The Firefox driver is the most mature of the browser-based • If you do enable JavaScript, the HtmlUnit Driver will
drivers. emulate the behavior of Internet Explorer.

From Java: From Java:


WebDriver driver = new FirefoxDriver(); WebDriver driver = new HtmlUnitDriver();

From Ruby: Although it isn’t recommended, it is possible to configure the


driver = Selenium::WebDriver.for :firefox HtmlUnitDriver to emulate a specific browser:
HtmlUnitDriver driver = new HtmlUnitDriver(BrowserVersion.FIREFOX_3);
From Python:
from selenium.firefox.webdriver import WebDriver
driver = WebDriver()
SELENIUM RC EMULATION
From C#:
IWebDriver driver = new FirefoxDriver(); It is possible to emulate Selenium Remote Control (RC)
Internet Explorer using the WebDriver Java implementation on any of its
The Internet Explorer driver has been tested and is known to supported browsers. This allows you to maintain both
work on IE 6, 7, and 8 on Windows XP and Vista. Compared to WebDriver and Selenium test assets side by side and to
the other drivers, it is relatively slow. engage in an incremental migration from Selenium to
WebDriver. In addition, running the normal Selenium RC
From Java: server is not required.
WebDriver driver = new InternetExplorerDriver();
WebDriver driver = new FirefoxDriver();
From Ruby: String baseUrl = “http://downforeveryoneorjustme.com/”;
driver = Selenium::WebDriver.for :internet_explorer Selenium selenium = new WebDriverBackedSelenium(driver, baseUrl);

selenium.open(“http://downforeveryoneorjustme.com/”);
From Python: selenium.type(“domain_input”, “google.com”);
selenium.click(“//div[@id=’container’]/form/a”);
from selenium.ie.webdriver import WebDriver
driver = WebDriver() assertTrue(selenium.isTextPresent(“It’s just you”));

DZone, Inc. | www.dzone.com


3 Selenium 2.0: Using the WebDriver API to Create Robust User Acceptance Tests

On the downside, you may notice some inconsistencies in greatly simplify interaction with select elements and their
behavior since the entire Selenium API is not implemented (eg., association options:
keyPressNative is unsupported) and Selenium Core is emulated.
Method Purpose
You may also experience slower performance in some cases.
selectByIndex(int index)/ Selects/deselects the option at the given index.
deselectByIndex(int index)
PAGE INTERACTION MODEL
selectByValue(String value)/ Selects/deselects the option(s) that has a value matching
deselectByValue(String value) the argument.
After navigating to a page… selectByVisibleText(String text)/ Selects/deselects the option(s) that displays text matching
deselectByVisibleTest(String text) the argument.
driver.get(“http://www.google.com”)
deselectAll() Deselects all options.
…WebDriver offers a plethora of means for interacting with getAllSelectedOptions() Returns a List<WebElement> of all selected options.
the elements on that page via its findElement methods. getFirstSelectedOption() Returns a WebElement representing the first selected
These methods accept an argument of type By, which defines option.
several static methods implementing different means of getOptions() Returns a List<WebElement> of all options.
element location: isMultiple() Returns true if this is a multi-select list; false otherwise.

Locators You can create an instance of Select from a WebElement that is


Locator Example (Java) known to represent a select element:
id attribute By.id(“myElementId”)
WebElement element = driver.findElement(By.id(“mySelect”));
name attribute By.name(“myElementName”) Select select = new Select(element);

XPATH By.xpath(“//input[@id=’myElementId’]”)
If the element does not represent a select element, this
Class name By.className(“even-table-row”)
constructor will throw an UnexpectedTagNameException.
CSS Selector By.cssSelector(“h1[title]”)

Link Text By.linkText(“Click Me!”) Interacting with Rendered Elements


By.partialLinkText(“ck M”) If you’re driving an actual browser such as Firefox, you also can
Tag Name By.tagName(“td”) access a fair amount of information about the rendered state
of an element by casting it to RenderedWebElement. This is
In each case, findElement will return an instance of
also how you can simulate mouse-hover events and perform
WebElement, which encapsulates all of the metadata for that
drag-and-drop operations.
DOM element and allows you to interact with it.
WebElement element = driver.findElement(By.id(“header”));
WebElement Methods RenderedWebElement renderedElement = (RenderedWebElement) element;

Method Purpose
RenderedWebElement Methods
clear() Clears all of the contents if the element is a text entity.
Method Purpose
click() Simulates a mouse click on the element.
dragAndDropBy(int moveRightBy, Drags and drops the element moveRightBy pixels to
getAttribute(String name) Returns the value associated with the provided attribute name int moveDownBy) the right and moveDownBy pixels down. Pass negative
(if present) or null (if not present). arguments to move left and up.
getTagName() Returns the tag name for this element. dragAndDropOn(RenderedWeb Drags and drops the element on the supplied element.
getText() Returns the visible text contained within this element (including Element element)
subelements) if not hidden via CSS. getLocation() Returns a java.awt.Point representing the top left-hand
getValue() Gets the value of the element’s “value” attribute. corner of the element.

isEnabled() Returns true for input elements that are currently enabled; getSize() Returns a java.awt.Dimension representing the width and
otherwise false. height of the element.

isSelected() Returns true if the element (radio buttons, options within a getValueOfCssProperty(String Returns the value of the provided property.
select, and checkboxes) is currently selected; otherwise false. propertyName)

sendKeys(CharSequence… Simulates typing into an element. hover() Simulates a mouse hover event over the element.
keysToSend) isDisplayed() Returns true if the element is currently displayed;
setSelected() Select an element (radio buttons, options within a select, and otherwise false.
checkboxes).

submit() Submits the same block if the element if the element is a form
PAGE OBJECT PATTERN
(or contained within a form). Blocks until new page is loaded.

toggle() Toggles the state of a checkbox element.


The Page Object pattern is a useful tool for separating the
In addition to this set of methods designed for interacting orthogonal concerns of testing the logical functionality of an
with the element in hand, WebElement also provides two application from the mechanics of interacting with that
methods allowing you to search for elements within the current functionality. The Page Object pattern acts as an API to an HTML
element’s scope: page and describes to the test writer the “services” provided by
that page, while at the same time not exposing the underlying
Method Purpose
implementation. The Page Object itself is the only entity that
findElement(By by) Finds the first element located by the provided method (see possesses deep knowledge of the HTML’s structure.
Locators table).

findElements(By by) Finds all elements located by the provided method. Consider the Google home page. The user is able to
enter search terms and perform two possible actions: to
WebDriver provides a support class named Select to conduct the search or to automatically navigate to the

DZone, Inc. | www.dzone.com


4 Selenium 2.0: Using the WebDriver API to Create Robust User Acceptance Tests

top hit (“I’m Feeling Lucky). We could model this with the a WebDriver instance or when the default no-argument
following Page Object (Java): constructor is present.
public class GoogleHomePage { AnotherPageObject page = AnotherPageObject(“testing”, 1, 2, 3, driver);
private final WebDriver driver; PageFactory.initElements(driver, page);

public GoogleHomePage(WebDriver driver) {


this.driver = driver; We can further clean up the code by providing meaningful
//Check that we’re actually on the Google Home Page. names for the form elements and then using annotations to
if (!”Google”.equals(driver.getTitle())) {
throw new IllegalStateException(“This isn’t Google’s Home Page!”);
declaratively specify the location strategy:
}
} public class GoogleHomePage {
private final WebDriver driver;
public GoogleResultsPage search(String searchTerms) {
driver.findElement(By.name(“q”)).sendKeys(searchTerms); @FindBy(name = “q”)
driver.findElement(By.name(“btnG”)).submit(); private WebElement searchBox;

return new GoogleResultsPage(driver); @FindBy(name = “btnG”)
} private WebElement searchButton;

public UnknownTopHitPage imFeelingLucky(String searchTerms) { @FindBy(name = “btnI”)
driver.findElement(By.name(“q”)).sendKeys(searchTerms); private WebElement imFeelingLuckyButton;
driver.findElement(By.name(“btnI”)).submit();
public GoogleHomePage(WebDriver driver) {
return new UnknownTopHitPage(driver); this.driver = driver;
}
} //Check that we’re actually on the Google Home Page.
if (!”Google”.equals(driver.getTitle())) {
throw new IllegalStateException(“This isn’t Google’s Home Page!”);
}
These examples assume the behavior of the Google }

home page prior to the introduction of Google public GoogleResultsPage search(String searchTerms) {
searchBox.sendKeys(searchTerms);
Instant. For them to work properly, create a custom
Hot FireFox profile turn instant off in that profile, and
searchButton.submit();

Tip then run your tests using that profile by setting }


return new GoogleResultsPage(driver);


the system property “firefox.browser.profile” to the public UnknownTopHitPage imFeelingLucky(String searchTerms) {
searchBox.sendKeys(searchTerms);
name of your custom profile. imFeelingLuckyButton.submit();

return new UnknownTopHitPage(driver);
To learn more about the Page Object pattern, visit: }
}
http://code.google.com/p/selenium/wiki/PageObjects
WebDriver provides excellent support for implementing Page The @FindBy annotation supports the same location methods
Object’s via its PageFactory. The PageFactory supports a supported by the programmatic API (except for CSS selectors):
“convention over configuration” approach to the Page Object @FindBy Annotation Location Methods
pattern. By utilizing its initElements method, the driver element Locator Examples
location code can be removed from the previous Page Object: id attribute @FindBy(how = How.ID, using = “myElementId”)
@FindBy(id = “myElementId)
public class GoogleHomePage {
private final WebDriver driver; name attribute @FindBy(how = How.NAME, using = “myElementName”)

private WebElement q; @FindBy(name = “myElementName”)
private WebElement btnG;
private WebElement btnI;
id or name @FindBy(how = How.ID_OR_NAME, using = “myElement”)
attribute
public GoogleHomePage(WebDriver driver) {
this.driver = driver; XPATH @FindBy(how = How.XPATH, using = “//input[@id=’myElementId’]”)
@FindBy(xpath = “//input[@id=’myElementId’]”)
//Check that we’re actually on the Google Home Page.
if (!”Google”.equals(driver.getTitle())) { Class name @FindBy(how = How.CLASS_NAME, using=”even-table-row”)
throw new IllegalStateException(“This isn’t Google’s Home Page!”); @FindBy(className = “even-table-row”)
}
} Link Text @FindBy(how = How.LINK_TEXT, using=”Click Me!”)
@FindBy(linkText = “Click Me!”)
public GoogleResultsPage search(String searchTerms) {
q.sendKeys(searchTerms); Partial Link Text @FindBy(how = How.PARTIAL_LINK_TEXT, using=”ck M”)
btnG.submit(); @FindBy(partialLinkText = “ck M”)

return new GoogleResultsPage(driver); Tag Name @FindBy(how = How.TAG_NAME, using=”td”)
}

@FindBy(tagName = “td”)
public UnknownTopHitPage imFeelingLucky(String searchTerms) {
q.sendKeys(searchTerms);
btnI.submit(); XPATH SUPPORT

return new UnknownTopHitPage(driver);
}
} WebDriver makes every effort to use a browser’s native XPath
capabilities wherever possible. For those browsers that do
A fully initialized version of this object can then be created and
not have native XPath support, WebDriver provides its own
used as in the following code snippet:
implementation. If you’re not familiar with the behavior of the
WebDriver driver = new HtmlUnitDriver(); //or your choice of driver various engines, this can lead to surprising results.
driver.get(“http://www.google.com”);
GoogleHomePage page = PageFactory.initElements(driver, GoogleHomePage.
class); Driver Tag/Attribute Attribute Values Native XPath
page.search(“WebDriver”); Names Support

HtmlUnitDriver Lower-cased As they appear in HTML Yes


This version of initElements will instantiate the class. It works Lower-cased As they appear in HTML No
InternetExplorerDriver
only when there is a one-argument constructor that accepts
FirefoxDriver Case insensitive As they appear in HTML Yes

DZone, Inc. | www.dzone.com


5 Selenium 2.0: Using the WebDriver API to Create Robust User Acceptance Tests

Consider the following example: The constructor for RemoteWebDriver accepts two arguments:
<input type=”text” name=”pizza”/> 1) The URL for the remote server instance.
<INPUT type=”text” name=”pie”/>
2)A Capabilities object, which specifies the target
The following behavior will result: platform and/or browser. DesiredCapabilities provides
XPath Number of Matches static factory methods for the commonly used choices
Expression (e.g., DesiredCapabilities.firefox()).
HtmlUnitDriver InternetExplorerDriver FirefoxDriver
//input 1 2 1
MOBILE DEVICE SUPPORT
//INPUT 0 2 0

WebDriver provides excellent support for testing Web


REMOTE WEBDRIVER applications on modern mobile device platforms. Support for
the following platforms are provided:
WebDriver provides excellent • iOS (iPhone/iPad)
capabilities around driving • Android
browers located on remote • Blackberry (5.0+)
machines. This allows the tests • Headless WebKit
to run in one environment
WebDriver is capable of running tests both in the platform
while simultaneously driving a
emulators and the devices themselves. The driver
browser in a completely different
implementations employ the same JSON-based wire protocol
environment. In turn, running
utilized by the RemoteWebDriver.
your tests in a continuous
integration environment deployed Driving the iOS Platform
on a Linux system while driving The iPhone driver works via an iPhone application that
Internet Explorer on various implements the JSON-based wire protocol and then drives
flavors of Microsoft Windows is a a UIWebView, which is a WebKit browser embeddable in
straightforward proposition. iPhone applications.
The RemoteWebDriver consists of   1) Install the iOS SDK from http://developer.apple.com/ios.
a client and server. The server is 2) D
 ownload the WebDriver source from
simply a Java Servlet running within the Jetty Servlet Container http://code.google.com/p/webdriver/source/checkout.
(but you can deploy it to your container of choice). This servlet
3) Open iphone/iWebDriver.xcodeproj in XCode.
interacts with the various browsers. The client is an instance of
RemoteWebDriver, which communicates with the Server via a 4) S
 et the build configuration’s active executable
JSON-based wire protocol. to iWebDriver.

Using RemoteWebDriver 5) Click Build and Go.


First, download selenium-server-standalone-2.0a7.jar and run it The iOS simulator will launch with the iWebDriver app
on the machine you want to drive: installed. You can then connect to the iWebDriver app from
java -jar selenium-server-standalone-2.0a7.jar your language of choice:
Next, implement a client in your language of choice: package com.deepsouthsoftware.seworkshop;

import java.net.URL;
package com.deepsouthsoftware.seworkshop;
import org.openqa.selenium.*;
import org.junit.*;
import java.net.URL;
import org.openqa.selenium.remote.*;
import org.openqa.selenium.*;
import org.junit.*;
import static org.junit.Assert.*;
import org.openqa.selenium.remote.*;
public class IphoneWebDriverTest {
import static org.junit.Assert.*;
private WebDriver driver;
public class RemoteWebDriverTest {
@Before
private WebDriver driver;
public void setUp() throws Exception {
driver = new RemoteWebDriver(new URL(“http://localhost:3001/hub”),
@Before
DesiredCapabilities.iphone());
public void setUp() throws Exception {
}
driver = new RemoteWebDriver(new URL(“http://127.0.0.1:4444/wd/hub”),
DesiredCapabilities.firefox());
@Test
}
public void testCheese() throws Exception {
driver.get(“http://www.google.com”);
@Test
WebElement element = driver.findElement(By.name(“q”));
public void testCheese() throws Exception {
element.sendKeys(“Cheese!”);
driver.get(“http://www.google.com”);
element.submit();
WebElement element = driver.findElement(By.name(“q”));
assertEquals(“Cheese! - Google Search”, driver.getTitle());
element.sendKeys(“Cheese!”);
}
Thread.sleep(1000); //Deal with Google Instant
element = driver.findElement(By.name(“btnG”));
@After
element.click();
public void tearDown() throws Exception {
Thread.sleep(1000); //Deal with Google Instant
driver.quit();
assertEquals(“cheese! - Google Search”, driver.getTitle());
}
}
}
@After
public void tearDown() throws Exception {
driver.quit();
}
}

DZone, Inc. | www.dzone.com


6 Selenium 2.0: Using the WebDriver API to Create Robust User Acceptance Tests

4) Start the emulator: ./emulator -avd my_android &


5) Install the Android WebDriver Application: ./adb -e
install -r android-server.apk. You can download this from:
http://code.google.com/p/selenium/downloads/list.
6) S
 et up port forwarding: ./adb forward tcp:8080 tcp:8080
You can then connect to the AndroidDriver app from your
language of choice:
package com.deepsouthsoftware.seworkshop;

import java.net.URL;
import org.openqa.selenium.*;
import org.junit.*;
import org.openqa.selenium.android.AndroidDriver;

  import static org.junit.Assert.*;

Driving the Android Platform public class AndroidWebDriverTest {


private WebDriver driver;
The Android driver works via an Android application that
@Before
implements the JSON-based wire protocol and then drives an public void setUp() throws Exception {
driver = new AndroidDriver();
Android WebView, which is a WebKit browser embeddable in }
Android applications. @Test
public void testCheese() throws Exception {
1) Install the Android SDK from driver.get(“http://www.google.com”);
WebElement element = driver.findElement(By.name(“q”));
http://developer.android.com/sdk/index.html. element.sendKeys(“Cheese!”);
element.submit();
2) Run ./android and install a target API (e.g. 2.2). assertEquals(“Cheese! - Google Search”, driver.getTitle());
}
3) E
 xecute ./android create avd -n my_android -t 1 -c @After
100M to create a new Android Virtual Device targeting public void tearDown() throws Exception {
driver.quit();
Android 2.2 with a 100M SD card. Do not create a custom }
}
hardware profile.

ABOUT THE AUTHOR RECOMMENDED BOOK


Matt Stine is the Group Leader of Research Application Two of the industry’s most experienced agile testing
Development at St. Jude Children’s Research Hospital in practitioners and consultants, Lisa Crispin and Janet Gregory,
Memphis, TN. For the last decade he has been developing have teamed up to bring you the definitive answers to these
and supporting enterprise Java applications in support of questions and many others. In Agile Testing, Crispin and
life sciences research. Matt appears frequently on the No Gregory define agile testing and illustrate the tester’s role with
Fluff Just Stuff symposium series tour, as well as at other examples from real agile teams. They teach you how to use the
conferences such as JavaOne, SpringOne/2GX, The Rich agile testing quadrants to identify what testing is needed, who
Web Experience, and The Project Automation Experience. He is an Agile Zone should do it, and what tools might help. The book chronicles an agile software
Leader for DZone, and his articles also appear in GroovyMag and NFJS the development iteration from the viewpoint of a tester and explains the seven
Magazine. When he’s not on the road, Matt also enjoys his role as President key success factors of agile testing.
of the Memphis/Mid-South Java User Group. His current areas of interest
include lean/agile software development, modularity and OSGi, Groovy/Grails,
JavaScript development, and automated testing of modern web applications.
Find him on Twitter at http://www.twitter.com/mstine and read his blog at
http://www.mattstine.com.

#82

Browse our collection of over 100 Free Cheat Sheets


Get More Refcardz! Visit refcardz.com

CONTENTS INCLUDE:


About Cloud Computing
Usage Scenarios Getting Started with

Aldon Cloud#64Computing

Underlying Concepts
Cost
by...

Upcoming Refcardz
youTechnologies ®

Data
t toTier
brough Comply.
borate.
Platform Management and more...

Chan
ge. Colla By Daniel Rubio

on:
dz. com

grati s
also minimizes the need to make design changes to support
CON
ABOUT CLOUD COMPUTING one time events. TEN TS
INC

s Inte -Patternvall

HTML LUD E:
Basics
Automated growthHTM
ref car

Web applications have always been deployed on servers & scalable


L vs XHT technologies

nuou d AntiBy Paul M. Du



Valid
ation one time events, cloud ML
connected to what is now deemed the ‘cloud’. Having the capability to support

Windows Phone 7
Usef

ContiPatterns an

computing platforms alsoulfacilitate


Open the gradual growth curves
Page ■
Source
Vis it

However, the demands and technology used on such servers faced by web applications.Structure Tools

Core
Key ■

Structur Elem
E: has changed substantially in recent years, especially with al Elem ents
INC LUD gration the entrance of service providers like Amazon, Google and Large scale growth scenarios involvingents
specialized
NTS and mor equipment
rdz !

ous Inte Change

HTML
CO NTE Microsoft. es e... away by
(e.g. load balancers and clusters) are all but abstracted
Continu at Every e chang
About ns to isolat
relying on a cloud computing platform’s technology.
Software i-patter
space

CSS3

n
Re fca

e Work
Build
riptio
and Ant These companies Desc have a Privat
are in long deployed trol repos
itory
webmana applications
ge HTM
L BAS

Patterns Control lop softw n-con to



that adapt and scale
Deve
les toto large user
a versio ing and making them
bases, In addition, several cloud computing ICSplatforms support data
ment ize merg
rn
Version e... Patte it all fi minim le HTM
Manage s and mor e Work knowledgeable in amany ine to
mainl aspects related tos multip
cloud computing. tier technologies that Lexceed the precedent set by Relational
space Comm and XHT

Build
re

Privat lop on that utilize HTML MLReduce,


ref c

Practice Database Systems (RDBMS): is usedMap are web service APIs,



Deve code lines a system
Build as thescalethe By An
sitory of work prog foundati
Ge t Mo

Repo
This Refcard active
will introduce are within
to you to cloud riente computing, with an
ION d units etc. Some platforms ram support large grapRDBMS deployments.

The src
dy Ha
softw
EGRAT e ine loping task-o it and Java s written in hical on of
all attribute
softwar emphasis onDeve es by
Mainl
INT these ines providers, so youComm can better understand
also rece JavaScri user interfac web develop and the rris
Vis it

OUS

WebDriver
codel chang desc
ding e code Task Level as the
www.dzone.com

NTINU s of buil control what it is a cloudnize


line Policy sourc es as aplatform
computing can offer your ut web output ive data pt. Server-s e in clien ment. the ima alt attribute ribes whe
T CO ces ion Code Orga it chang e witho likew mec ide lang t-side ge is describe re the ima
hanism. fromAND
name
the pro ject’s vers CLOUD COMPUTING PLATFORMS
subm e sourc
applications. ise
ABOU (CI) is
it and with uniqu are from
was onc use HTML
web
The eme pages and uages like Nested
unavaila s alte ge file
rd z!

a pro evel Comm the build softw um ble. rnate can be


gration ed to Task-L Label ies to
build minim UNDERLYING CONCEPTS
e and XHT rging use HTM PHP tags text that
Inte mitt a pro blem ate all activition to the
bare
standard a very loos ML as Ajax Tags
can is disp
found,
ous com to USAGE SCENARIOS Autom configurat
cies t
ization, ely-defi thei tech L
Continu ry change cannot be (and freq
nden ymen layed
tion ned lang r visual eng nologies
Re fca

Build al depe need


a solu ineffective
deplo t
Label manu d tool the same for stan but as if
(i.e., ) nmen overlap
eve , Build stalle
t, use target enviro Amazon EC2: Industry standard it has
software and uagvirtualization ine. HTM uen
with terns ns (i.e.
blem ated ce pre-in whether dards e with b></ , so <a>< tly are) nest
lar pro that become
Autom Redu ymen a> is
ory. via pat d deploEAR) in each has L

REST
reposit -patter particu s cies Pay only what you consume
tagge or Amazon’s cloud
the curr you cho platform
computing becisome
heavily based moron very little fine. b></ ed insid
lained ) and anti x” the are solution duce
nden For each (e.g. WAR es t
ent stan ose to writ more e imp a></ e
not lega each othe
b> is
be exp text to “fi
al Depeapplication deployment
Web ge until
nden a few years
t librari agonmen
t enviro was similar that will software
industry standard and virtualization apparen ortant, the
e HTM technology.
tterns to pro Minim packa
dard
Mo re

CI can ticular con used can rity all depe that all
targe
simp s will L t. HTM l, but r. Tags
es i-pa tend but to most phone services:
y Integ alize plans with late alloted resources,
file
ts with an and XHT lify all help or XHTML, Reg ardless L VS XH <a><
in a par hes som
etim s. Ant , they ctices,
Binar Centr temp your you prov TML b></
proces in the end bad pra enting
nt nmen
incurred cost
geme whether e a single based on
Creatsuchareresources were consumed
t enviro orthenot. Virtualization
muchallows MLaare physical othe
piece ofr hardware to be understand of HTML
approac ed with the cial, but, rily implem nden
cy Mana rties nt targe es to of the actually web cod ide a solid ing has
essa d to Depe prope into differe chang
utilized by multiple operating
function systems.simplerThis allows ing.resourcesfoundati job adm been arou
efi nec itting
associat to be ben
er
pare
Ge t

te builds commo
are not Fortuna
late Verifi e comm than on
ality be allocated nd for
n com Cloud computing asRun it’sremo
known etoday has changed this. expecte irably, that
befor
They they
etc.
(e.g. bandwidth, elem CPU) tohas
nmemory, exclusively totely
Temp
job has some time
Build
lts whe
ually,
appear effects. rm a
Privat y, contin nt team Every mov
entsinstances. ed to CSS
used
to be, HTML d. Earl
ed resu gration
The various resourcesPerfo consumed by webperio applications
dicall (e.g.
opme page system
individual operating bec Brow y exp . Whi
adverse unintend d Builds sitory Build r to devel common (HTM . ause ser HTM anded le it
ous Inte web dev manufacture L had very far mor has done
Stage Repo
e bandwidth, memory, CPU) areIntegtallied
ration on a per-unit CI serve basis L or XHT
produc Continu Refcard
e Build rm an ack from extensio .) All are
e.com

ML shar limit e than its


pat tern. term this
Privat
(starting from zero) by Perfo all majorated cloud
feedb computing platforms.
occur on As a user of Amazon’s
n. HTM EC2 essecloud
ntiallycomputing platform, you are
es cert result elopers
came
rs add
ed man ed layout anybody
the tion the e, as autom they based proc is
gra such wayain The late a lack of stan up with clev y competi
supp
of as
” cycl Build Send builds
assigned esso
an operating L system
files shou in theplai
same as onelemallents
hosting
ous Inte tional use and test concepts
soon n text ort.
ration ors as ion with r
Integ entat
ld not in st web dar er wor ng stan
Continu conven “build include oper
docum
be cr standar kar dar

DZone, Inc.
the to the to rate devel
While s efer of CI
ion
Gene
Cloud Computing

the not
s on
expand

ISBN-13: 978-1-936502-03-5
140 Preston Executive Dr. ISBN-10: 1-936502-03-8
Suite 100
50795
Cary, NC 27513

DZone communities deliver over 6 million pages each month to 888.678.0399


919.678.0300
more than 3.3 million software developers, architects and decision
Refcardz Feedback Welcome
$7.95

makers. DZone offers something for everyone, including news,


refcardz@dzone.com
tutorials, cheat sheets, blogs, feature articles, source code and more. 9 781936 502035
Sponsorship Opportunities
“DZone is a developer’s dream,” says PC Magazine.
sales@dzone.com
Copyright © 2010 DZone, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, Version 1.0
photocopying, or otherwise, without prior written permission of the publisher.

Das könnte Ihnen auch gefallen