/**
* Created by: Anand Bagmar * Email: [email protected] * * Copyright 2010 Anand Bagmar. Distributed under the Apache 2.0 License * * See LICENSE.txt for further details.
**/
Web Analytics is the measurement, collection, analysis and reporting of internet data for purposes of understanding and optimizing web usage. Web Analytics is not just a tool for measuring website traffic, but can also be used as a tool for business research and market research. Web Analytics applications can also help companies measure the results of traditional print advertising campaigns. It helps one to estimate how the traffic to the web site changed after the launch of a new advertising campaign.
Web Analytics provides data on the number of visitors, page views, etc. to gauge the traffic popularity trends which helps doing the market research. Official definition of Web Analytics from Wikipedia (en.wikipedia.org/wiki/Web_analytics)
{WAAT = Web Analytics Automation Testing.}[http://essenceoftesting.blogspot.com/search/label/waat]
See the {WAAT-Java wiki}[http://github.com/anandbagmar/WAAT/wiki] for answers to questions like what, why, how, and more.
For any other questions, comments, help, email Anand Bagmar @ [email protected]
Appium setup for Android- in OS X
-
Brew: ruby -e “$(curl -fsSL raw.githubusercontent.com/Homebrew/install/master/install)”
-
JAVA JDK - www.oracle.com/technetwork/java/javase/downloads/index.html
-
Android SDK - developer.android.com/sdk/index.html [Note: Appium supports Android API >=17]
-
Set ANDROID_HOME and JAVA_HOME
-
Open Terminal and Navigate to Home Directory.
-
Execute command touch .bash_profile
-
Execute command open -e .bash_profile and set the path a shown in image below( Change the path to the android sdk downloaded)
-
Save the file and Execute “set” in your terminal and restart your terminal for the changes to reflect.
-
-
Node.js and Appium:
-
brew install node # get node.js
-
npm install -g appium # get appium
-
npm install wd # get appium client
-
appium-doctor # check if everything is correctly set
-
-
Appium.app (for Appium Inspector) - bitbucket.org/appium/appium.app/downloads/
-
Any IDE: IntelliJ IDEA - www.jetbrains.com/idea/download/
Appium setup for Android- in Windows
-
JAVA JDK - www.oracle.com/technetwork/java/javase/downloads/index.html and set environment variable JAVA_HOME under ‘System variables’.
-
Android SDK - developer.android.com/sdk/index.html [Note: Appium supports Android API >=17] and set environment variable ANDROID_HOME under ‘System variables’.
-
Node.js - nodejs.org/en/download/. Then run following commands on cmd:
* npm install -g appium # get appium * npm install wd # get appium client * appium-doctor # check if everything is correctly set
-
Appium.exe (zip file) (for Appium Inspector) - bitbucket.org/appium/appium.app/downloads/
-
Any IDE: IntelliJ IDEA - www.jetbrains.com/idea/download/
-
Add all the environment variables set(in steps 1,2 and 5) along with platform-tools and npm(node package manager)path to the PATH variable.
-
So, your PATH variable would look something like: C:WindowsSystem32;%JAVA_HOME%bin;%ANDROID_HOME%bin;%M2_HOME%bin;C:UsersAdministratorAppDataLocalAndroidandroid-sdkplatform-tools;C:Program Filesnodejsnode_modulesnpmbin;
Proxy setup for Android device
-
Click Settings.
-
In Settings, click Wi-Fi.
-
Click and hold WiredSSID until a box pops up.
-
Click on “Modify network”.
-
Check the “Show advanced options” box and select Manual from the Proxy Settings menu.
-
Enter your host machine’s IP address in the “Proxy hostname” field, and 5555 in the “proxy port” field and enter the URL to be bypassed.
-
Then click Save.
-
WAAT-Java v1.5.0 is available from the {WAAT-Java dist}[http://github.com/anandbagmar/WAAT/tree/master/dist] folder.
-
WAAT-Ruby v1.4.1 gem is available from http://rubygems.org
-
WAAT-Ruby v1.5.0 gem is available from https://github.com/anandbagmar/WAAT-ruby/downloads
-
{WAAT}[http://github.com/anandbagmar/WAAT] for Java.
-
{WAAT}[http://github.com/anandbagmar/WAAT-Ruby] for Ruby. The Ruby gem uses RJB (Ruby-Java-Bridge) to invoke APIs defined by WAAT-Java to enable Web Analytics Testing.
-
See {my blog}[http://essenceoftesting.blogspot.com/search/label/waat] for all activity around WAAT.
-
HTTPSniffer & JSSniffer will NOT be supported in the new WAAT
-
A new plugin, based on proxy server approach will be available
-
See the {Issues}[https://github.com/anandbagmar/WAAT/issues] in WAAT github repo or {my blog}[http://essenceoftesting.blogspot.com/search/label/waat] for upcoming changes to WAAT.
-
Fork it!
-
Create your feature branch: git checkout -b my-new-feature
-
Commit your changes: git commit -am ‘Add some feature’
-
Push to the branch: git push origin my-new-feature
-
Submit a pull request :D
See the HttpSniffer or JSSniffer wiki page for step-by-step instructions on how to use WAAT-Ruby in your project.
-
Engine.isExpectedTagPresentInActualTagList in engine class is made public
-
Updated Engine to work without creating testData.xml file, and directly sending exceptedSectionList for tags
Added a new method Engine.verifyWebAnalyticsData(String actionName, ArrayList<Section> expectedSectionList, String[] urlPatterns, int minimumNumberOfPackets)
-
Added an empty constructor for Section.java to prevent marshalling error
-
Support Fragmented Packets
-
Updated Engine to support Pattern comparison, instead of String contains
Some APIs have changed between v1.4.0 and v1.5.0.
-
**To use JsSniffer plugin**:
- Set the WebAnalytic Tool: WebAnalyticTool webAnalyticTool = WebAnalyticTool.JS_SNIFFER; - - Initialize the WAAT engine using this: engine = getInstance(webAnalyticTool, inputFileType, keepLoadedFileInMemory, log4jPropertiesAbsoluteFilePath);
-
If you are using the JsSniffer plugin:
You do not need to call the following methods : - engine.enableWebAnalyticsTesting(); - engine.disableWebAnalyticsTesting();
-
The method engine.verifyWebAnalyticsData takes in different parameters for JSSniffer Vs HttpSniffer. Look at the respective wiki pages for detail info on how to use the same.