In the following some ideas are given in order to proceed with the work of monitoring the end user experience. The Javascript file which captures the timings on the browser's side is called JS-File.
Testing
Example Apps for testing overall behavior
- DVD-Store: There are no Ajax-Requests as the webapp is quite static. Therefore you cannot test the XMLHTTPRequest-Hook but only traced pageload timings.
- Example Applications on Tomcat (available in my Gitorious Repository): Testing opportunity with some different Apps which are built with various apps ( Vaadin, ExtJS, Spring, Wicket, etc.).
Testing of JavaScript-file
- The JS-file should be tested separately. This can be done either with "headless" JavaScript testing in the console (only JavaScript engine running, no UI, for example with PhantomJS) or you can use a testing framework such as JSTestDriver or Jasmine which can test the behavior of the script on different browsers. I wrote a test case with JSTestDriver in order to test the Ajax hook.
ToDo:
- We need exhaustive test cases for the JS-File which are tricky to implement. I would suggest to check the sessionStorage for correct results after simulating different user interactions.
- The function getDomPath does not always deliver correct results. Why not, must be examined further.
- The hook in the inspectIT Agent for inserting the JavaScript file does not work with all Application Servers. Especially, if static content ( for example static html files) is requested, the hook does not fire at all. Here, a more generic solution must be found. However, for development and testing purposes, JBoss 6.2 or Tomcat 7 works