Testing Ajax Web Applications

43 %
57 %
Information about Testing Ajax Web Applications
Technology

Published on October 8, 2008

Author: ted.husted

Source: slideshare.net

Description

Not long ago, testing web applications with Ajax components meant play-testing a page by hand. Today, there are a growing number of tools we can use to simplify and automate Ajax testing.

In this session we will cover when to test, what to test and how to test web applications with Ajax components. You learn how to create automatic tests with tools like OpenQA Selenium, and how to use Ajax testing tools with continuous integration systems, like
CruiseControl or Hudson.

In this session, you will learn:

* How Ajax works, and why it complicates testing;
* When, where and how to test Ajax components;
* How to use Ajax testing tools with continuous integration systems.

Testing Ajax Applications when to test, what to test, how to test Ajax applications Square One University Series

For the latest version of this presentation, visit http://slideshare.com/ted.husted For the latest version of source code, visit http://code.google.com/p/yazaar/ For followup questions, write [email_address] Testing Ajax Applications

For the latest version of this presentation, visit http://slideshare.com/ted.husted

For the latest version of source code, visit http://code.google.com/p/yazaar/

For followup questions, write [email_address]

Abstract Not long ago, testing Ajax meant play-testing by hand. Today, tools can simplify and automate Ajax testing. In this session, we explore: How Ajax works, and why it complicates testing; When, where, and how to test Ajax components; How to test with continuous integration systems.

Not long ago, testing Ajax meant play-testing by hand.

Today, tools can simplify and automate Ajax testing.

In this session, we explore:

How Ajax works, and why it complicates testing;

When, where, and how to test Ajax components;

How to test with continuous integration systems.

Testing Ajax Applications Ajax 101 How Ajax works Why it complicate testing

Ajax 101

How Ajax works

Why it complicate testing

Testing Ajax Applications Ajax 101 How Ajax works Why it complicate testing Tool Review Selenium IDE and Remote Control Hudson Continuous Integration Server

Ajax 101

How Ajax works

Why it complicate testing

Tool Review

Selenium IDE and Remote Control

Hudson Continuous Integration Server

Testing Ajax Applications Ajax 101 How Ajax works Why it complicate testing Tool Review Selenium IDE and Remote Control Hudson Continuous Integration Server Ajax Testing in Action Live Coding Demonstration Eclipse + Selenium + Subversion + Hudson

Ajax 101

How Ajax works

Why it complicate testing

Tool Review

Selenium IDE and Remote Control

Hudson Continuous Integration Server

Ajax Testing in Action

Live Coding Demonstration

Eclipse + Selenium + Subversion + Hudson

Ajax 101 Marketing term coined in 2005 Set of technologies

Marketing term coined in 2005

Set of technologies

Ajax 101 Marketing term coined in 2005 Set of technologies In use since 1999 (even 1996)

Marketing term coined in 2005

Set of technologies

In use since 1999 (even 1996)

Ajax 101 Marketing term coined in 2005 Set of technologies In use since 1999 (even 1996) An acronym made the difference Would you buy a pre-owned technology from this man?

Marketing term coined in 2005

Set of technologies

In use since 1999 (even 1996)

An acronym made the difference

http://www.adaptivepath.com/ideas/essays/archives/000385.php

http://msexchangeteam.com/archive/2005/06/21/406646.aspx “ It was [the] desire to look, act and feel like Outlook that caused us to move web applications forward in a new evolutionary path.”

 

 

http://www.mailsite.com/Products/express-pro-ajax-web-email-calendar-client.asp

http://-x-web-email-calenda- http://www.slideshare.net/satyajeet_02/web-20-5316/

http://www.mailsite.com/Products/express-pro-ajax-web-email-calendar-client.asp

Open QA Selenium Selenium is a suite of tools http://selenium.openqa.org/documentation/

Selenium is a suite of tools

Open QA Selenium Selenium is a suite of tools Selenium IDE records and runs tests http://selenium.openqa.org/documentation/

Selenium is a suite of tools

Selenium IDE

records and runs tests

Open QA Selenium Selenium is a suite of tools Selenium IDE records and runs tests Selenium Remote Control runs across multiple platforms http://selenium.openqa.org/documentation /

Selenium is a suite of tools

Selenium IDE

records and runs tests

Selenium Remote Control

runs across multiple platforms

Open QA Selenium Selenium is a suite of tools Selenium IDE records and runs tests Selenium Remote Control runs across multiple platforms Selenium Grid runs across multiple machines http://selenium.openqa.org/documentation/

Selenium is a suite of tools

Selenium IDE

records and runs tests

Selenium Remote Control

runs across multiple platforms

Selenium Grid

runs across multiple machines

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<tr><td> open </td><td >Welcome.action </td><td></td></tr> <tr><td> assertTitle </td><td> MailReader </td><td></td></tr> <tr><td> clickAndWait </td><td> link=Register with MailReader </td><td></td> <tr><td> assertTitle </td><td> MailReader - Register </td><td></td></tr> <tr><td> type </td><td> Register_save_username </td><td> trillian </td></tr> <tr><td> type </td><td> Register_save_password </td><td> astra </td></tr> <tr><td> type </td><td> Register_save_password2 </td><td> astra </td></tr> <tr><td> type </td><td> Register_save_fullName </td><td> Tricia McMillian< /t <tr><td> type </td><td> Register_save_fromAddress </td><td> [email_address] <tr><td> clickAndWait </td><td> Register_save_Save </td><td></td></tr> <tr><td> assertTitle </td><td> MailReader - Menu </td><td></td></tr> <tr><td> assertTextPresent </td><td> Tricia McMillian </td><td></td></tr>

 

 

RegisterTrillianTest.java public class RegisterTrillianTest extends SeleneseTestCase { public void testRegisterTrillian() throws Exception { selenium.open(&quot; /menu/Welcome.action &quot;); assertEquals(&quot; MailReader &quot;, selenium.getTitle()); selenium.click(&quot; link=Register with MailReader &quot;); selenium.waitForPageToLoad(&quot; 30000 &quot;); assertEquals(&quot; MailReader - Register &quot;, selenium.getTitle()); selenium.type(&quot; Register_save_username &quot;, &quot; trillian &quot;); selenium.type(&quot; Register_save_password &quot;, &quot; astra &quot;); selenium.type(&quot; Register_save_password2 &quot;, &quot; astra &quot;); selenium.type(&quot; Register_save_fullName &quot;, &quot; Tricia McMillian &quot;); selenium.type(&quot; Register_save_fromAddress &quot;, &quot; [email_address] &quot;); selenium.click(&quot; Register_save_Save &quot;); selenium.waitForPageToLoad(&quot; 30000 &quot;); assertEquals(&quot; MailReader - Menu &quot;, selenium.getTitle()); checkForVerificationErrors(); }

Selenium – Key Features Create test scripts using Selenium Commands.

Create test scripts using Selenium Commands.

Selenium – Key Features Create test scripts using Selenium Commands. Run tests in against live applications.

Create test scripts using Selenium Commands.

Run tests in against live applications.

Selenium – Key Features Create test scripts using Selenium Commands. Run tests in against live applications. Compile test scripts in native languages, such as Java, C#, Ruby.

Create test scripts using Selenium Commands.

Run tests in against live applications.

Compile test scripts in native languages, such as Java, C#, Ruby.

Selenium – Key Features Create test scripts using Selenium Commands. Run tests in against live applications. Compile test scripts in native languages, such as Java, C#, Ruby. Integrate scripts with other test suites and continuous integrations systems.

Create test scripts using Selenium Commands.

Run tests in against live applications.

Compile test scripts in native languages, such as Java, C#, Ruby.

Integrate scripts with other test suites and continuous integrations systems.

Selenium – Key Features Create test scripts using Selenium Commands. Run tests in against live applications. Compile test scripts in native languages, such as Java, C#, Ruby. Integrate scripts with other test suites and continuous integrations systems.

Create test scripts using Selenium Commands.

Run tests in against live applications.

Compile test scripts in native languages, such as Java, C#, Ruby.

Integrate scripts with other test suites and continuous integrations systems.

Selenium – Key Features Support for major browsers Firefox 2+, (RC and Core) IE7, Safari 2+, Opera 8+, Windows, OS X, Linus, Solaris. Current Releases IDE, RC, Grid, 2008; Core: 2007 Since 2005 License – Apache ~11 Team Members ThoughtWorks project

Support for major browsers

Firefox 2+, (RC and Core) IE7, Safari 2+, Opera 8+, Windows, OS X, Linus, Solaris.

Current Releases

IDE, RC, Grid, 2008; Core: 2007

Since 2005

License – Apache

~11 Team Members

ThoughtWorks project

http://clearspace.openqa.org/index.jspa

OpenQA Selenium Form Support Asynchronous Support Server Support IDE Support CI Support

Form Support

Asynchronous Support

Server Support

IDE Support

CI Support

Firefox 3 and Selenium RC The current Remote Control beta release (2007) is not compatible with FF3 Minor configuration issue with version numbering in FF3 Hot patch available Best Advice: Install FF2 in default location, and FF3 in an alternate spot.

The current Remote Control beta release (2007) is not compatible with FF3

Minor configuration issue with version numbering in FF3

Hot patch available

Best Advice: Install FF2 in default location, and FF3 in an alternate spot.

OpenQA Selenium Strengths Granual toolset Large, dedicated team Steady releases Active community Weaknesses Complex setup Superficial suites Choppy docs Perpetual beta

Strengths

Granual toolset

Large, dedicated team

Steady releases

Active community

Weaknesses

Complex setup

Superficial suites

Choppy docs

Perpetual beta

OpenQA Selenium Bottom Line Use to create acceptance tests Complements unit tests jsUnit, YUI Test, qUnit

Bottom Line

Use to create acceptance tests

Complements unit tests

jsUnit, YUI Test, qUnit

Hudson Continuous build process framework Runs as a Java web application BYO Container or standalone mode https://hudson.dev.java.net/

Continuous build process framework

Runs as a Java web application

BYO Container or standalone mode

 

 

https://hudson.dev.java.net/

http://cruisecontrol.sourceforge.net/dashboard.html

 

Hudson – Key Features RSS/E-mail/IM Integration JUnit/TestNG test reporting Permanent links Change set support After-the-fact tagging History trend, Distributed builds, File fingerprinting, Plugins.

RSS/E-mail/IM Integration

JUnit/TestNG test reporting

Permanent links

Change set support

After-the-fact tagging

History trend, Distributed builds, File fingerprinting, Plugins.

Hudson – Key Features Quick Install, Free style setup – Runs standalone, instant project checkout, automatic build configuration. Visual Configuration – No XML required. Friendly Dashboard - Project status at a glance.

Quick Install, Free style setup – Runs standalone, instant project checkout, automatic build configuration.

Visual Configuration – No XML required.

Friendly Dashboard - Project status at a glance.

Hudson – Key Features Regular releases (daily/weekly milestones) License -- MIT / Creative Community

Regular releases (daily/weekly milestones)

License -- MIT / Creative Community

Hudson Strengths Simple setup Slick UI Well documented Regular releases Active community Weaknesses Java container Committers?

Strengths

Simple setup

Slick UI

Well documented

Regular releases

Active community

Weaknesses

Java container

Committers?

http://cruisecontrol.sourceforge.net/overview.html

Let's Code It!

Ajax Testing Tool Review During the session, we covered when, what, and how to test Ajax applications creating automatic tests with various tools testing with IDEs and continuous Integration systems

During the session, we covered

when, what, and how to test Ajax applications

creating automatic tests with various tools

testing with IDEs and continuous Integration systems

Square One University Series

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

AJAX Testing, Functional Testing and Load Testing of AJAX ...

AJAX Web testing, Functional testing and Load Testing Supported. Download Now.
Read more

State-Based Testing of Ajax Web Applications - ResearchGate

State-Based Testing of Ajax Web Applications Alessandro Marchetto and Paolo Tonella Fondazione Bruno Kessler - IRST 38050 Povo, Trento, Italy ...
Read more

Load Testing of AJAX web applications - AppPerfect

Ajax, sometimes written as AJAX (shorthand for Asynchronous JavaScript and XML), is a group of interrelated web development techniques used on the client ...
Read more

Testing for AJAX: introduction - OWASP

AJAX, an acronym for Asynchronous JavaScript and XML, is a web development technique used to create more responsive web applications. It uses a combination ...
Read more

Testing Techniques applied to AJAX Web Applications

Testing Techniques applied to AJAX Web Applications Alessandro Marchetto 1, Paolo Tonella , and Filippo Ricca2 1 Fondazione Bruno Kessler - IRST, 38050 ...
Read more

Functional Testing of AJAX Applications with Test Studio

Automate your AJAX functional tests with Test Studio, test complex UI actions and perform logging actions with an ease.
Read more

Load Testing an AJAX Application - Web Performance

Load Testing an AJAX Application Part 1: A simple example using KnowledgeTree. Christopher L Merrill ©2007 Web Performance, Inc; July 17th, 2007; v1.1
Read more

[How Do I:] Load Test a Web Application? | The ASP.NET Site

Intro to Testing Web Applications with ... to an Existing Web Application; 5. ASP.NET AJAX Enable an ... Viewing Load Test a Web Application
Read more

State-Based Testing of Ajax Web Applications

Published in: · Proceeding: ICST '08 Proceedings of the 2008 International Conference on Software Testing, Verification, and Validation Pages 121-130
Read more