Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

What is WAAT?


Published on

I presented "What is WAAT" in "vodQA - Chennai" conference in Jan 2012. This is the slide deck I used.
I walked through what is web analytics, and then how WAAT can be used to automate the testing of the web analytics tags being reported from the client browser.

Published in: Technology
  • Be the first to comment

What is WAAT?

  1. 1. What is WAAT? Anand BagmarSoftware Quality Evangelist ThoughtWorks
  2. 2. What is Web Analytics?
  3. 3. Why do we need it?
  4. 4. Performance … Metrics Omniture’sStatCounter SiteCatalyst Who does Web Analytics? Google WebTrends Analytics Mint AWStats
  5. 5. How to test this?
  6. 6. The problem and challenge
  7. 7. Manual
  8. 8. Repeating over-and-over again
  9. 9. The solution
  10. 10. FlavorsWAAT-Java WAAT-RubyOriginal flavor Ruby gem implemented using WAAT- JAVAAvailable on github Available on github and rubygemsSource code + jar Uses RJB – Ruby-Java-BridgeSupports Omniture Debugger + Supports only HttpSniffer solutionHttpSniffer solution
  11. 11. Omniture DebuggerPros ConsOS independent Browser dependent – need to implement ScriptRunner for the UI- driver in useRun using the regular Web-Analytic solutiontest-user dependent - Omniture- SiteCatalyst
  12. 12. HttpSnifferPros ConsWeb-analytic solution 3rd party libraries are OSindependent DependentBrowser independent HTTPs not supported out-of-the-boxUI-driver independent Run tests as ‘root’
  13. 13. Why do we do Testing?
  14. 14. Architecture
  15. 15. How to use WAAT?• Download zip from github• Setup• jpcap / ScriptRunner setup• Update existing tests
  16. 16. Update existing Tests• Import relevant packages• Define & provide parameter values• Initialize Engine• Enable Web Analytics Testing• Define Test Data• Verify Web Analytics reporting using WAAT• Sample validations• Disable Web Analytics Testing
  17. 17. Import relevant packagesImport packagecom.thoughtworks.webanalyticsautomation.common.BROWSER;com.thoughtworks.webanalyticsautomation.plugins.WebAnalyticTool;com.thoughtworks.webanalyticsautomation.Controller.getInstance;
  18. 18. Define parametersParameter Default / Sample valueEngine engineString[] urlPatterns new String[] {"GET /ps/ifr?container=friendconnect&mid=0"};String actionName "OpenWAATArticleOnBlog_HttpSniffer";WebAnalyticTool webAnalyticTool WebAnalyticTool.HTTP_SNIFFER;InputFileType inputFileType InputFileType.XML;boolean keepLoadedFileInMemory true;String log4jPropertiesFilePath currentDirectory() + “/resources/";String inputDataFileName currentDirectory() + “/test/sampledata/TestData.xml";
  19. 19. Initialize Engineengine = getInstance( webAnalyticTool, inputFileType, keepLoadedFileInMemory, log4jPropertiesAbsoluteFilePath );
  20. 20. Enable Web Analytics Testingengine.enableWebAnalyticsTesting();
  21. 21. Define Test Data<Section actionName="OpenUpcomingPage_HttpSniffer" numberOfEventsTriggered="1" tagList="pageName=upcoming:index|| cc=USD|| ch=upcoming|| events=event2||"/>
  22. 22. Verify Web Analytics Reporting Cart.checkout();Result verificationResult = engine.verifyWebAnalyticsData ( inputDataFileName, actionName, urlPatterns, minimumNumberOfPackets);
  23. 23. Sample ValidationsassertNotNull(verificationResult.getVerificationStatus(),"Verification status should NOT be NULL");assertNotNull(verificationResult.getListOfErrors(),"Failure details should NOT be NULL");logVerificationErrors(verificationResult);assertEquals(verificationResult.getVerificationStatus(),Status.PASS, "Verification status should be PASS");assertEquals(verificationResult.getListOfErrors().size(),0, "Failure details should be empty");
  24. 24. Disable Web Analytics Testingengine.disableWebAnalyticsTesting();
  25. 25. RememberMinimal changes to existing test frameworkDoes not depend on junit / testng / …Web Analytic tool independent (HttpSniffer)UI Driver framework independent
  26. 26. For more information• Blog:• Github:• Github:• RubyGems:• Email:,
  27. 27.