Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

Automated Client-Side Monitoring of Web Applications - Georgia

VIEWS: 1 PAGES: 22

									Shauvik Roy Choudhary, Alex Orso
Georgia Institute of Technology
   Paradigm shift from Web 1.0 to Web 2.0
     Heavy client-side scripts
     From synchronous to asynchronous
     Multitude of client-side environments


   New problems for testing



                                     Shauvik Roy Choudhary, Alex Orso | Georgia Tech   2
   More and more logic pushed to
    the browser (Javascript, Flash,
    Silverlight, …)



   Little/no information on the
    server about client-side
    execution



                                      Shauvik Roy Choudhary, Alex Orso | Georgia Tech   3
   Concurrency

   Non-determinism

   Additional complexity
    of testing environment




         Shauvik Roy Choudhary, Alex Orso | Georgia Tech   4
   Browsers      Browser Extensions




                        Shauvik Roy Choudhary, Alex Orso | Georgia Tech   5
   Cookie used check if stats should be
 Cookie used to to track upload status displayed
                                                                               Page A
       URL: http://www.site.com
                      Developer/Tester needsFile Upload
                    client-side insight for errors
                     that might occur only in a
                                                 Page B
                         particular context
                            setCookie(“status”, “uploaded”)             Display Stats


                                               If (!getCookie(“status”)) {
                                                  setCookie(“status”, “display”)
                                                  reloadPage();
 Local           Cookies          Extensions   }
Database
                                                        Shauvik Roy Choudhary, Alex Orso | Georgia Tech   6
                                                                index.html

                                                                 HTTP
HTTP request                                                   response




               Internet




                          Shauvik Roy Choudhary, Alex Orso | Georgia Tech    7
                                      index.html
                                      JS Agent                                      index.html

                                        HTTP                                         HTTP
                                      response                                     response
HTTP request




               Internet
JS Agent


                          Injection
                            policy

                                              Shauvik Roy Choudhary, Alex Orso | Georgia Tech    8
Command
  HTTP request
 Command
response request




                   Web Application
                   Monitoring Data
 JS Agent               Data                                        Commands




                                     Shauvik Roy Choudhary, Alex Orso | Georgia Tech   9
   Query
     HTML DOM node (web page elements)
     Javascript objects, variables, arrays

   Notify – Interact with user
     Display a message (HTML alert or layered dialog)

   Update
     Add/Change a node in the HTML DOM
     Add more Javascript to page or change existing code

   …

                                           Shauvik Roy Choudhary, Alex Orso | Georgia Tech   10
1. <commands>
2.   <cmd>
3.         <id>8de9</id>
4.         <name>ALERT</name>
5.         <param>Hello World!</param>
6.   </cmd>
7.   <cmd>
8.         <id>3bsd</id>
9.         <name>DUMP</name>
10.        <param>myObj</param>
11.        <param>myArray</param>
12. </cmd>
13. </commands>


                                  Shauvik Roy Choudhary, Alex Orso | Georgia Tech   11
1. <commands>
2.   <cmd>
3.         <id>8de9</id>
4.         <name>ALERT</name>
5.         <param>Hello World!</param>
6.   </cmd>
7.   <cmd>
8.         <id>3bsd</id>
9.         <name>DUMP</name>
10.        <param>myObj</param>
11.        <param>myArray</param>
12. </cmd>
13. </commands>


                                  Shauvik Roy Choudhary, Alex Orso | Georgia Tech   12
1. <responses>
2. <resp>
3.   <id>8de9</id>
4.   <status>1</status>
5. </resp>
6. <resp>
7.   <id>3bsd</id>
8.   <message>myObj={ "aString":"Howdy",
                        "anInteger":10,
                        "aBoolean":true }</message>
9.   <message>myArray=[1,"foo","web"]</message>
10. </resp>
11. </responses>


                                   Shauvik Roy Choudhary, Alex Orso | Georgia Tech   13
1. <responses>
2. <resp>
3.   <id>8de9</id>
4.   <status>1</status>
5. </resp>
6. <resp>
7.   <id>3bsd</id>
8.   <message>myObj={ "aString":"Howdy",
                        "anInteger":10,
                        "aBoolean":true }</message>
9.   <message>myArray=[1,"foo","web"]</message>
10. </resp>
11. </responses>


                                   Shauvik Roy Choudhary, Alex Orso | Georgia Tech   14
1. <responses>           <script type="text/javascript">
                             myObj=new Object();
2. <resp>
                             myObj.aString=“Howdy";
3.   <id>8de9</id>           myObj.anInteger=10;
4.   <status>1</status>      myObj.aBoolean=true;
5. </resp>               </script>
6. <resp>
7.   <id>3bsd</id>
8.   <message>myObj={ "aString":"Howdy",
                        "anInteger":10,
                        "aBoolean":true }</message>
9.   <message>myArray=[1,"foo","web"]</message>
10. </resp>
11. </responses>


                                     Shauvik Roy Choudhary, Alex Orso | Georgia Tech   15
1. <responses>           <script type="text/javascript">
                             myArray=new Array();
2. <resp>
                             myArray[0]=1;
3.   <id>8de9</id>           myArray[1]=“foo”;
4.   <status>1</status>      myArray[2]=“web”;
5. </resp>               </script>
6. <resp>
7.   <id>3bsd</id>
8.   <message>myObj={ "aString":"Howdy",
                        "anInteger":10,
                        "aBoolean":true }</message>
9.   <message>myArray=[1,"foo","web"]</message>
10. </resp>
11. </responses>


                                     Shauvik Roy Choudhary, Alex Orso | Georgia Tech   16
   Goal: Measure agent-injection overhead and
    JS agent performance
   Subjects: 10 applications – sample code, open
    source projects and commercial websites


echo framework




 Google
Web Toolkit
                                 Shauvik Roy Choudhary, Alex Orso | Georgia Tech   17
   JSA injection overhead      JSA performance
     index.html                  URL: http://www.site.com
     JS Agent


    Main page




Measure time                      Iterate window
to Inject the                        object and
 main page                       count number of
                                 visited elements

                                          Shauvik Roy Choudhary, Alex Orso | Georgia Tech   18
                       JSA injection overhead               JSA performance
                        0.1 and 8 milliseconds per page         window object iterated in 3-4 ms
                  10
                                                              Application              # Objects               Time (ms)
Time (ms)




                   8
                   6
                   4                                          Mail                     1286                    9
                   2                                          Showcase                 4490                    30
                   0                                          Chat Client              147                     2
                  150                                         Number Guess             144                     3
 Page size (kb)




                  100                                         Interactive Test         147                     2
                                                              Drupal                   118                     1
                   50
                                                              Joomla                   229                     3
                   0                                          Wordpress                176                     3
                                                              iGoogle                  618                     6
                                                              Amazon.com               314                     4
                                                                        Shauvik Roy Choudhary, Alex Orso | Georgia Tech    19
   Error Detection and Debugging
     Logging and Recovery

   Metrics Collection
     Code Coverage
     Click-streams / User Activity
     Browser Statistics

   Memory Profiling
     Count variables, arrays, objects

   Security checks
                                         Shauvik Roy Choudhary, Alex Orso | Georgia Tech   20
   Summary
     General technique for remote monitoring of web
      applications
     Proof-of-concept evaluation
     Example applications

   Future work
     Complete implementation
     Investigate applications
     Additional experimentation

                                      Shauvik Roy Choudhary, Alex Orso | Georgia Tech   21
    Any Questions ?

      shauvik@cc.gatech.edu
http://www.cc.gatech.edu/~shauvik


                            Shauvik Roy Choudhary, Alex Orso | Georgia Tech   22

								
To top