ajax testing approach

16
Welcome To ST&PT Team Meeting

Upload: harshj

Post on 18-Jul-2015

522 views

Category:

Technology


1 download

TRANSCRIPT

Welcome To ST&PT Team Meeting

Harsha V Joshi

Agenda

Overview. AJAX? Why AJAX? AJAX Model. Testing Strategy. Testing ideas. Questions?????.

Overview :Web 1.0,Web 2.0/RIA

WebSite

Data

WebSite

App

App

App

Data

What is AJAX?

AJAX is the acronym for Asynchronous JavaScript and XML. The purpose is to create more dynamic and responsive web pages. It is also about building web clients in a Service Oriented Architecture

that can connect to any kind of server: J2EE, PHP, ASP. Net etc. AJAX involves existing technology & standards: JavaScript and XML. Page view displayed in a web browser retrieves data or markup fragments

from a service and refreshes just a part of the page. AJAX is non-trivial, it requires deep and broad skills in web development

...... but the benefits to be gained can be huge compared to classic web applications.

AJAX enables major improvements in responsiveness and performance of web applications, e.g. used at G-Mail,Google suggests,Google Maps.

AJAX is NOT hype – it is very real and very useful for highly interactive applications.

Why to Switch to AJAX Approach Because it addresses -

Asynchronous communication with server

Rich User Interface Features

Highly interactive application

Increased Productivity

Required low bandwidth

SOA compliant

Enables collaborative applications

Open standards

Open source

Compatible with existing web development technologies

Conventional E-docket Phase1 Application Without AJAX Drawback: This model can not handle effectively asynchronous multiple

requests from different panels of the screen residing on the dashboard. Result: Poor performance in transaction turn around time, Poor interactivity & Low usability.

Web Sever

Web services, Business

LogicJSON Response

Server-side systems

JSON request Data Store,

Business Logic

XML Server

XML

XML

Browser client

User Interface

E-docket phase2 Application with AJAX Advantage: This model provides ‘Rich client’, ‘Handling asynchronous

calls’ effectively, ‘Excellent transaction performance’.

User Interface

Web Sever

Web services, Business

LogicJSON Response

JSON data

Server-side systemsBrowser client

E-docket phase2 Application Model with AJAX

AJAX Engine

JSON request

Javascript call

Data Store,

Business Logic

XML Server

XML

XML

Test Strategy1. In the area of functional testing:

Test the pillars – Here we can test all the field & form level validations like: Mandatory fields - are they really mandatory. Invalid data input – enter text for a field that is supposed to accept numbers only. Test field dependency – city field becomes mandatory if you select data for country

field. Check the validation fired upon Submit / Save – any event that is supposed to pick

data from the form and send it to server.

SQL Keyword test ideas – Enter the following special characters into the field: Comma (,). Semi Colon (;) Apostrophe (‘). Double Dash / Hyphen (--). Ampersand (&). Forward Slash (/). Asterisk (*).

Test Strategy contd…..

2. In the area of performance testing

Download time is critical. Download time is the time taken by application to download a page along with its links and images on the browser screen.

To simulate maximum no of asynchronous requests.

3. Usability Testing

We need to measure the utilized bandwidth. This can be done using tools Http watch and Ethereal

We need to test whether while doing partial page updates UI is persistent and predictable.

If multiple asynchronous requests are simultaneously done, then how screen updation is happening in parallel and priority wise.

Test Strategy contd…..

4. Installation/Compatibility Testing

This is new approach and need to be tested on all browsers. Some browsers behave strangely with xml. In such cases JSON is used for data transfer. So here challenge is how application behaves in such a browser.

We have an option to disable JavaScript in browser settings. Heart of AJAX is JavaScript. So it is required to test how application responds in different browsers where JavaScript option is disabled.

5. Security Testing

To check whether any secret data is passing through the form. Test cases should include conditions for testing whether data apart from that required

by server is also sent to server. This can be easily done if a particular Security policy is build for applications. While

doing testing we can verify it with un expected inputs.

Test Strategy contd…..

6. Scalability Testing For AJAX applications improves server resources footprint. By doing scalable testing

(few rounds) we can come up with optimum server configuration.

7. Reliability Testing Few conditions can be included for Failure and recovery testing w.r.t. Web services,

Backend server, Network, etc.

Test Ideas Test for timeout of active session. Test for number of users that can login at a time. Any actions under which users is thrown out of a system. Try accessing a secured page from a bookmark. Test the ‘remember me’ or ‘remember my user name’ options. Test the ‘login automatically’ functionality. Test the URL for passing variables directly. Test the URL for session ID display. Test if the same user logs in twice, the session id for each login

is unique. Test if the static part of session ID are easily recognizable. Test than no sensitive information is passed as clear text in

session ID.

Resources/External Links

AJAX Communities on Orkut. Java.sun.com/developer/technicalArticles/J2EE/AJAX/DesignStra

tegies. Adaptivepath.com. W3schools.com Wikis.

Thank You!

Happy Valentines Day!!!!!