Ajax Testing Approach


Published on

Intro to web1.0,web 2.0,RIA and AJAX.
Traditional model and ajax model,test strategy and test ideas for testing ajax apps.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Ajax Testing Approach

  1. 1. Welcome To ST&PT Team Meeting
  2. 2. Harsha V Joshi
  3. 3. Agenda <ul><li>Overview. </li></ul><ul><li>AJAX? </li></ul><ul><li>Why AJAX? </li></ul><ul><li>AJAX Model. </li></ul><ul><li>Testing Strategy. </li></ul><ul><li>Testing ideas. </li></ul><ul><li>Questions?????. </li></ul>
  4. 4. Overview :Web 1.0,Web 2.0/RIA Web Site Data Web Site App App App Data
  5. 5. What is AJAX? <ul><li>AJAX is the acronym for A synchronous J avaScript a nd X ML. </li></ul><ul><li>The purpose is to create more dynamic and responsive web pages. </li></ul><ul><li>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. </li></ul><ul><li>AJAX involves existing technology & standards: JavaScript and XML. </li></ul><ul><li>Page view displayed in a web browser retrieves data or markup fragments from a service and refreshes just a part of the page. </li></ul><ul><li>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. </li></ul><ul><li>AJAX enables major improvements in responsiveness and performance of web applications, e.g. used at G-Mail,Google suggests,Google Maps. </li></ul><ul><li>AJAX is NOT hype – it is very real and very useful for highly interactive applications. </li></ul>
  6. 6. Why to Switch to AJAX Approach <ul><li>Because it addresses - </li></ul><ul><ul><li>Asynchronous communication with server </li></ul></ul><ul><ul><li>Rich User Interface Features </li></ul></ul><ul><ul><li>Highly interactive application </li></ul></ul><ul><ul><li>Increased Productivity </li></ul></ul><ul><ul><li>Required low bandwidth </li></ul></ul><ul><ul><li>SOA compliant </li></ul></ul><ul><ul><li>Enables collaborative applications </li></ul></ul><ul><ul><li>Open standards </li></ul></ul><ul><ul><li>Open source </li></ul></ul><ul><ul><li>Compatible with existing web development technologies </li></ul></ul>
  7. 7. Conventional E-docket Phase1 Application Without AJAX <ul><li>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. </li></ul>Web Sever Web services, Business Logic JSON Response Server-side systems JSON request Data Store, Business Logic XML Server XML XML Browser client User Interface
  8. 8. E-docket phase2 Application with AJAX <ul><li>Advantage: This model provides ‘Rich client’, ‘Handling asynchronous calls’ effectively, ‘Excellent transaction performance’. </li></ul>User Interface Web Sever Web services, Business Logic JSON Response JSON data Server-side systems Browser client E-docket phase2 Application Model with AJAX AJAX Engine JSON request Javascript call Data Store, Business Logic XML Server XML XML
  9. 9. Test Strategy <ul><li>1. In the area of functional testing: </li></ul><ul><ul><li>Test the pillars – Here we can test all the field & form level validations like: </li></ul></ul><ul><ul><ul><li>Mandatory fields - are they really mandatory. </li></ul></ul></ul><ul><ul><ul><li>Invalid data input – enter text for a field that is supposed to accept numbers only. </li></ul></ul></ul><ul><ul><ul><li>Test field dependency – city field becomes mandatory if you select data for country field. </li></ul></ul></ul><ul><ul><ul><li>Check the validation fired upon Submit / Save – any event that is supposed to pick data from the form and send it to server. </li></ul></ul></ul><ul><li>SQL Keyword test ideas – </li></ul><ul><ul><ul><li>Enter the following special characters into the field: </li></ul></ul></ul><ul><ul><ul><li>Comma (,). </li></ul></ul></ul><ul><ul><ul><li>Semi Colon (;) Apostrophe (‘). </li></ul></ul></ul><ul><ul><ul><li>Double Dash / Hyphen (--). </li></ul></ul></ul><ul><ul><ul><li>Ampersand (&). </li></ul></ul></ul><ul><ul><ul><li>Forward Slash (/). </li></ul></ul></ul><ul><ul><ul><li>Asterisk (*). </li></ul></ul></ul>
  10. 10. Test Strategy contd….. <ul><li>2. In the area of performance testing </li></ul><ul><ul><ul><li>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.  </li></ul></ul></ul><ul><ul><ul><li>To simulate maximum no of asynchronous requests. </li></ul></ul></ul><ul><li>3. Usability Testing </li></ul><ul><ul><ul><li>We need to measure the utilized bandwidth. This can be done using tools Http watch and Ethereal </li></ul></ul></ul><ul><ul><ul><li>We need to test whether while doing partial page updates UI is persistent and predictable. </li></ul></ul></ul><ul><ul><ul><li>If multiple asynchronous requests are simultaneously done, then how screen updation is happening in parallel and priority wise. </li></ul></ul></ul>
  11. 11. Test Strategy contd….. <ul><li>4. Installation/Compatibility Testing  </li></ul><ul><ul><ul><li>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. </li></ul></ul></ul><ul><ul><ul><li>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. </li></ul></ul></ul><ul><li>5. Security Testing </li></ul><ul><ul><ul><li>To check whether any secret data is passing through the form. </li></ul></ul></ul><ul><ul><ul><li>Test cases should include conditions for testing whether data apart from that required by server is also sent to server. </li></ul></ul></ul><ul><ul><ul><li>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. </li></ul></ul></ul>
  12. 12. Test Strategy contd….. <ul><li>6. Scalability Testing  </li></ul><ul><ul><ul><li>For AJAX applications improves server resources footprint. By doing scalable testing (few rounds) we can come up with optimum server configuration.  </li></ul></ul></ul><ul><li>7. Reliability Testing  </li></ul><ul><ul><ul><li>Few conditions can be included for Failure and recovery testing w.r.t. Web services, Backend server, Network, etc. </li></ul></ul></ul>
  13. 13. Test Ideas <ul><li>Test for timeout of active session. </li></ul><ul><li>Test for number of users that can login at a time. </li></ul><ul><li>Any actions under which users is thrown out of a system. </li></ul><ul><li>Try accessing a secured page from a bookmark. </li></ul><ul><li>Test the ‘remember me’ or ‘remember my user name’ options. </li></ul><ul><li>Test the ‘login automatically’ functionality. </li></ul><ul><li>Test the URL for passing variables directly. </li></ul><ul><li>Test the URL for session ID display. </li></ul><ul><li>Test if the same user logs in twice, the session id for each login is unique. </li></ul><ul><li>Test if the static part of session ID are easily recognizable. </li></ul><ul><li>Test than no sensitive information is passed as clear text in session ID. </li></ul>
  14. 14. Resources/External Links <ul><li>AJAX Communities on Orkut. </li></ul><ul><li>Java.sun.com/developer/technicalArticles/J2EE/AJAX/DesignStrategies. </li></ul><ul><li>Adaptivepath.com. </li></ul><ul><li>W3schools.com </li></ul><ul><li>Wikis. </li></ul>
  15. 16. Thank You! Happy Valentines Day!!!!!