WAAT 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/Gemfile +19 -0
- data/LICENSE.txt +13 -0
- data/README +1 -0
- data/README.rdoc +41 -0
- data/Rakefile +52 -0
- data/VERSION +1 -0
- data/WAAT.gemspec +95 -0
- data/features/WAAT-ruby.feature +19 -0
- data/features/step_definitions/WAAT-ruby_steps.rb +41 -0
- data/features/support/env.rb +42 -0
- data/features/support/hook.rb +34 -0
- data/lib/WAAT.rb +188 -0
- data/lib/WAAT/LICENSE.txt +13 -0
- data/lib/WAAT/docs/Jpcap_Install.html +131 -0
- data/lib/WAAT/docs/README +32 -0
- data/lib/WAAT/docs/README.rdoc +38 -0
- data/lib/WAAT/docs/WAAT Readme.doc +0 -0
- data/lib/WAAT/docs/WAAT Readme.docx +0 -0
- data/lib/WAAT/docs/WAAT Readme.html +2150 -0
- data/lib/WAAT/docs/WAAT Readme.pdf +0 -0
- data/lib/WAAT/lib/WAAT_v1.4.jar +0 -0
- data/lib/WAAT/lib/commons-lang-2.3.jar +0 -0
- data/lib/WAAT/lib/httpSniffer/Linux/jpcap-0.7-1.i386.rpm +0 -0
- data/lib/WAAT/lib/httpSniffer/Linux/jpcap-0.7.deb +0 -0
- data/lib/WAAT/lib/httpSniffer/Linux/libpcap-1.1.1.tar.gz +0 -0
- data/lib/WAAT/lib/httpSniffer/Windows/JpcapSetup-0.7.exe +0 -0
- data/lib/WAAT/lib/httpSniffer/Windows/System32/Jpcap.dll +0 -0
- data/lib/WAAT/lib/httpSniffer/Windows/System32/Packet.dll +0 -0
- data/lib/WAAT/lib/httpSniffer/Windows/System32/drivers/npf.sys +0 -0
- data/lib/WAAT/lib/httpSniffer/Windows/System32/pthreadVC.dll +0 -0
- data/lib/WAAT/lib/httpSniffer/Windows/System32/wpcap.dll +0 -0
- data/lib/WAAT/lib/httpSniffer/Windows/WinPcap_4_1_2.exe +0 -0
- data/lib/WAAT/lib/httpSniffer/jpcap.jar +0 -0
- data/lib/WAAT/lib/jpcap.jar +0 -0
- data/lib/WAAT/lib/log4j-1.2.16.jar +0 -0
- data/lib/WAAT/lib/xstream-1.3.1.jar +0 -0
- data/lib/WAAT/resources/log4j.properties +20 -0
- data/lib/WAAT/sampledata/TestData.xml +86 -0
- data/lib/WAAT/samplescripts/com/thoughtworks/webanalyticsautomation/scriptrunner/SeleniumScriptRunner.java +49 -0
- data/lib/WAAT/samplescripts/com/thoughtworks/webanalyticsautomation/scriptrunner/WebDriverScriptRunner.java +67 -0
- data/sampledata/TestData.xml +66 -0
- metadata +187 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
Copyright 2010 Anand Bagmar (abagmar@gmail.com).
|
2
|
+
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
you may not use this file except in compliance with the License.
|
5
|
+
You may obtain a copy of the License at
|
6
|
+
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
See the License for the specific language governing permissions and
|
13
|
+
limitations under the License.
|
@@ -0,0 +1,131 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html lang="en-us"><head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta http-equiv="Content-Language" content="en-us"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"><title>Jpcap - Install</title> <link rel="stylesheet" href="style.css" type="text/css"></head>
|
3
|
+
<body topmargin="10" leftmargin="10" alink="#ffffff" link="#ffffff" vlink="#ffffff"><table bgcolor="#339933" border="0" cellpadding="5" height="50" width="100%"> <tbody> <tr> <td><i><b><font color="#ffffff" size="7"> Jpcap</font></b></i></td>
|
4
|
+
<td align="right" valign="bottom"><font color="#ffffff"><b><i>a Java library for
|
5
|
+
capturing and sending network packets</i></b></font></td>
|
6
|
+
</tr> </tbody></table><table style="width: 100%;" border="0" cellpadding="10" cellspacing="0"> <tbody>
|
7
|
+
<tr>
|
8
|
+
<td style="background-color: rgb(153, 255, 153);" align="center" bgcolor="#00ff99" valign="top" width="100"> <table bordercolorlight="#008000" bordercolordark="#00FF99" style="background-color: rgb(153, 255, 153); width: 138px; text-align: left; margin-left: auto; margin-right: auto;" border="0" bordercolor="#00ff99" cellpadding="5" cellspacing="3"> <tbody> <tr> <td style="width: 120px; vertical-align: middle; text-align: left; background-color: rgb(51, 204, 51);"><b><font color="#ffffff"> <a href="index.html">Home</a></font></b></td>
|
9
|
+
</tr> <tr> <td style="background-color: rgb(51, 204, 51); text-align: left;" width="120"><b><font color="#ffffff">
|
10
|
+
<a href="download.html">Download</a></font></b></td>
|
11
|
+
</tr> <tr> <td style="width: 120px; text-align: left; background-color: rgb(51, 153, 51);"><b><font color="#ffffff"> </font></b><b><font color="#ffffff"><a href="install.html">Install</a></font></b></td>
|
12
|
+
</tr> <tr align="left"> <td style="background-color: rgb(51, 204, 51);"><b><font color="#ffffff"> </font></b><span style="font-weight: bold; text-decoration: underline;"></span><a href="javadoc/index.html"><span style="font-weight: bold; text-decoration: underline;">API</span></a></td>
|
13
|
+
</tr> <tr align="left"> <td style="background-color: rgb(51, 204, 51);"><b><font color="#ffffff"> </font></b><span style="font-weight: bold; text-decoration: underline;"></span><a href="tutorial/index.html"><span style="font-weight: bold; text-decoration: underline;">Tutorial</span></a></td>
|
14
|
+
</tr> <tr align="left"> <td style="background-color: rgb(51, 204, 51);"><b><font color="#ffffff"> </font></b><b><font color="#ffffff"><a href="samples.html">Samples</a></font></b></td>
|
15
|
+
</tr> <tr align="left"> <td style="background-color: rgb(51, 204, 51);" width="120"><b><font color="#ffffff"> </font></b><b><font color="#ffffff"><a href="faq.html">FAQ</a></font></b></td>
|
16
|
+
</tr> <tr align="left"> <td style="background-color: rgb(51, 204, 51);" width="120"><b><font color="#ffffff"> </font></b><span style="text-decoration: underline;"><span style="font-weight: bold;"></span></span><a href="http://groups.google.com/group/jpcap"><span style="text-decoration: underline;"><span style="font-weight: bold;">Discussion</span></span></a></td>
|
17
|
+
</tr> <tr align="left"> <td style="background-color: rgb(51, 204, 51);" width="120"><b><font color="#ffffff"> </font></b><b><font color="#ffffff"><a href="links.html">Links</a></font></b></td>
|
18
|
+
</tr> </tbody> </table> <p> </p> <script type="text/javascript"><!--
|
19
|
+
google_ad_client = "pub-2830188173693566";
|
20
|
+
google_ad_width = 120;
|
21
|
+
google_ad_height = 240;
|
22
|
+
google_ad_format = "120x240_as";
|
23
|
+
google_ad_type = "text";
|
24
|
+
google_ad_channel ="";
|
25
|
+
google_color_border = "336699";
|
26
|
+
google_color_bg = "FFFFFF";
|
27
|
+
google_color_link = "0000FF";
|
28
|
+
google_color_url = "008000";
|
29
|
+
google_color_text = "000000";
|
30
|
+
//--></script>
|
31
|
+
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
32
|
+
</script></td><td valign="top"> <table style="color: rgb(255, 255, 255); background-color: rgb(51, 204, 51); width: 100%; height: 19px; font-weight: bold;" bordercolorlight="#000000" bordercolordark="#000000" border="0" bordercolor="#ffffff" cellpadding="5" cellspacing="0"> <tbody> <tr> <td style="width: 100%; height: 13px;"><font size="+1">How
|
33
|
+
to Install</font></td> </tr> </tbody> </table>
|
34
|
+
<br> <span style="font-weight: bold;"><Microsoft
|
35
|
+
Windows></span> <ol> <li>Download and
|
36
|
+
install <a href="http://www.java.com"><font color="#008000">Java Runtime Environment 6</font></a><font style="color: rgb(0, 0, 0);" color="#008000"> (if you
|
37
|
+
want to simply run Jpcap-based applications) or <a style="color: rgb(0, 128, 0);" href="http://java.sun.com/javase/downloads/index.jsp">JDK 6</a>
|
38
|
+
(if you want to develop Jpcap-based
|
39
|
+
applications).</font> </li> <li>Download and
|
40
|
+
install the latest <a href="http://winpcap.polito.it/"><font color="#008000">WinPcap</font></a>. </li>
|
41
|
+
<li><a style="color: rgb(0, 128, 0);" href="download.html">Download</a> and run
|
42
|
+
Jpcap <span style="color: rgb(0, 0, 0);">Self
|
43
|
+
Installer for windows</span>.</li> </ol><table style="background-color: rgb(255, 255, 204); width: 80%; text-align: left; margin-left: auto; margin-right: auto;" border="1" cellpadding="5" cellspacing="0"><tbody><tr><td>If
|
44
|
+
you have the previous version of Jpcap, please uninstall it first
|
45
|
+
before installing a new version.<br>If you forgot to uninstall
|
46
|
+
the previous version, search '<span style="font-weight: bold;">Jpcap.dll</span>'
|
47
|
+
and '<span style="font-weight: bold;">jpcap.jar</span>'
|
48
|
+
from your system, delete them, and then install a new version.</td></tr></tbody></table><br><table style="background-color: rgb(255, 255, 204); width: 80%; text-align: left; margin-left: auto; margin-right: auto;" border="1" cellpadding="5" cellspacing="0"><tbody><tr><td>It
|
49
|
+
is recommended to use JRE/JDK 6 or higher because Jpcap installer
|
50
|
+
assumes JRE/JDK 6.<br>If you are using JRE/JDK 5, set your '<span style="font-weight: bold;">CLASSPATH</span>' to
|
51
|
+
include '<span style="font-style: italic; font-weight: bold;">%SystemRoot%\Sun\Java\lib\ext</span>'</td></tr></tbody></table>
|
52
|
+
<span style="font-weight: bold;"><Linux><br></span><span style="text-decoration: underline;"><br>Use RPM
|
53
|
+
package (Fedora, RedHat)</span> <br><div style="margin-left: 40px;"><a style="color: rgb(0, 128, 0);" href="download.html">Download</a>
|
54
|
+
and install Jpcap RPM package.<br>For some distributions (e.g.,
|
55
|
+
Mandriva), JDK6 is also installed automatically.<br>However,
|
56
|
+
for some distributions (e.g., Fedora Core), you have to manually
|
57
|
+
install <a href="http://java.sun.com/"><font color="#008000">Sun's JDK6 for Linux</font></a>
|
58
|
+
as a RPM package before installing Jpcap RPM package. </div><ol>
|
59
|
+
</ol><span style="text-decoration: underline;">Use
|
60
|
+
Debian package (Ubuntu, GNU/Debian)</span><br style="text-decoration: underline;"><div style="margin-left: 40px;"><a style="color: rgb(0, 128, 0);" href="download.html">Download</a>
|
61
|
+
and install Jpcap Debian package.<br>For some distributions
|
62
|
+
(e.g., Ubuntu), JDK6 is also installed automatically.<br>For
|
63
|
+
some distributions (e.g., Debian GNU/Lunux), you may have to edit
|
64
|
+
apt-line (e.g., include "no-free") before installing Jpcap Debian
|
65
|
+
package. Also, you may have to update your GLIBC to version 2.4 or
|
66
|
+
higher. <br><br>If you cannot install using RPM/Debian
|
67
|
+
package, you can try to <a style="color: rgb(0, 128, 0);" href="#source">build from the source</a>.<br><br></div><div style="text-align: left;"><table style="background-color: rgb(255, 255, 204); width: 80%; text-align: left; margin-left: auto; margin-right: auto;" border="1" cellpadding="5" cellspacing="0"><tbody><tr><td>It
|
68
|
+
is recommended to use Sun's JRE/JDK 6 or higher because Jpcap package
|
69
|
+
assumes JRE/JDK 6.<br>If you are using JRE/JDK 5, set your '<span style="font-weight: bold;">CLASSPATH</span>' to
|
70
|
+
include '<tt style="font-weight: bold; font-style: italic;">/usr/java/packages/lib/ext</tt>'<br>Also,
|
71
|
+
Jpcap currently does not work with gcj / gij, so please use Sun's
|
72
|
+
JRE/JDK.</td></tr></tbody></table></div><div style="margin-left: 40px;"><br></div><span style="font-weight: bold;"><Mac OS
|
73
|
+
X></span> <br> <ol> <li>Both Java and
|
74
|
+
libpcap are preinstalled on Mac OS X. <br>
|
75
|
+
If any of them is
|
76
|
+
missing you should be able to install them from the Mac OS X install
|
77
|
+
DVD. </li> <li>Download and install <a style="color: rgb(0, 128, 0);" href="http://developer.apple.com/tools/xcode/">Xcode</a>.
|
78
|
+
<br>The default
|
79
|
+
installation of Xcode should provide you with the toolchain required
|
80
|
+
for compiling Jpcap.</li> <li><a style="color: rgb(0, 128, 0);" href="download.html">Download</a>
|
81
|
+
and extract Jpcap
|
82
|
+
source build. </li> <li>Go to <span style="font-style: italic;"><span style="font-weight: bold;">'</span></span><span style="font-weight: bold; font-style: italic;">[Jpcap
|
83
|
+
extracted directory]/src/c</span>' directory. </li>
|
84
|
+
<li>Run '<span style="font-weight: bold;">make</span>'.</li>
|
85
|
+
<li>Copy '<span style="font-weight: bold;">libjpcap.jnilib</span>'
|
86
|
+
to <span style="font-weight: bold;">'</span><i style="font-weight: bold;" class="moz-txt-slash"><span class="moz-txt-tag">/</span>Library/Java/Extensions<span class="moz-txt-tag">/</span></i>'
|
87
|
+
directory. </li> <li>Copy <span style="font-style: italic;">'<span style="font-weight: bold;">[Jpcap
|
88
|
+
extracted directory]/</span></span><span style="font-weight: bold;"><span style="font-style: italic;">lib/</span>jpcap.jar</span>'
|
89
|
+
to '<i style="font-weight: bold;" class="moz-txt-slash"><span class="moz-txt-tag">/</span>Library/Java/Extensions<span class="moz-txt-tag">/</span></i>'<br>
|
90
|
+
Or, place '<span style="font-style: italic;">jpcap.jar</span>'
|
91
|
+
to any directory and include it to
|
92
|
+
your CLASSPATH. </li> </ol> <br> <span style="font-weight: bold;"><a name="source"></a><Source
|
93
|
+
build (Linux/FreeBSD/Solaris)><br> </span><span style="font-weight: bold;"></span> <ol> <li>Make
|
94
|
+
sure you have '<span style="font-weight: bold;">gcc</span>'
|
95
|
+
and '<span style="font-weight: bold;">make</span>'
|
96
|
+
installed to compile Jpcap.<br>Other software/packages may be
|
97
|
+
necessary (for example, you need '<span style="font-weight: bold;">build-essential</span>'
|
98
|
+
package to install on Ubuntu). <span style="color: rgb(0, 0, 0);"></span></li><li><span style="color: rgb(0, 0, 0);">Download and install </span><a href="http://www.tcpdump.org/"><font color="#008000">libpcap</font></a>
|
99
|
+
(ver.0.9.4 or later) if not installed.</li> <li><a style="color: rgb(0, 128, 0);" href="download.html">Download</a>
|
100
|
+
and
|
101
|
+
extract Jpcap source build.</li> <li>Go to <span style="font-style: italic;">'<span style="font-weight: bold;">[Jpcap
|
102
|
+
extracted directory]/src/c</span></span>' directory. </li>
|
103
|
+
<li>Run '<span style="font-weight: bold;">make</span>'.</li><li><font color="#ff0000"><span style="color: rgb(0, 0, 0);"></span></font>Copy
|
104
|
+
<span style="font-style: italic;">'</span><span style="font-weight: bold;">libjpcap.so</span>'
|
105
|
+
to '<span style="font-style: italic; font-weight: bold;">[Java
|
106
|
+
installed directory]/jre/lib/<arch></span>'.
|
107
|
+
<arch> is either <span style="font-weight: bold;">'</span><span style="font-style: italic; font-weight: bold;">i386</span><span style="font-weight: bold;">'</span> or <span style="font-weight: bold;">'</span><span style="font-style: italic; font-weight: bold;">sparc</span><span style="font-weight: bold;">'.</span><br>Or, if
|
108
|
+
you are using Java 6, copy <span style="font-style: italic;">'</span><span style="font-weight: bold;">libjpcap.so</span>' to '<span style="font-weight: bold; font-style: italic;">/usr/java/packages/lib/ext</span>'.<br>
|
109
|
+
Or, place <span style="font-style: italic;">'</span><span style="font-weight: bold;">libjpcap.so</span>'
|
110
|
+
in the directory where your application is located.</li>
|
111
|
+
<li>Copy '<span style="font-weight: bold;"><span style="font-style: italic;">[Jpcap
|
112
|
+
extracted directory]/lib/</span>jpcap.jar</span>' to <span style="font-style: italic;">'<span style="font-weight: bold;">/usr/lib</span></span>'
|
113
|
+
or '<span style="font-style: italic; font-weight: bold;">[Java
|
114
|
+
installed directory]/jre/lib/ext</span>'.<br>
|
115
|
+
Or, place <span style="font-style: italic;">'</span><span style="font-weight: bold;">jpcap.jar</span>'
|
116
|
+
to any directory and include it in your CLASSPATH.</li> </ol>
|
117
|
+
</td> <td style="width: 1%; vertical-align: top;"> <script type="text/javascript"><!--
|
118
|
+
google_ad_client = "pub-2830188173693566";
|
119
|
+
google_ad_width = 120;
|
120
|
+
google_ad_height = 600;
|
121
|
+
google_ad_format = "120x600_as";
|
122
|
+
google_ad_type = "text_image";
|
123
|
+
//2007-05-16: Jpcap
|
124
|
+
google_ad_channel = "6260474890";
|
125
|
+
//-->
|
126
|
+
</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
127
|
+
</script></td>
|
128
|
+
</tr> <tr> <td style="background-color: rgb(153, 255, 153);"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input name="cmd" value="_xclick" type="hidden"><input name="business" value="kfujii@uci.edu" type="hidden"><input name="no_shipping" value="1" type="hidden"><input name="no_note" value="1" type="hidden"><input name="currency_code" value="USD" type="hidden"><input name="tax" value="0" type="hidden"><input src="https://www.paypal.com/images/x-click-but04.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" border="0" height="31" type="image" width="62"></form>
|
129
|
+
</td> <td rowspan="1" style="background-color: rgb(153, 255, 153);" colspan="2" align="right" bgcolor="#00ff99"> (c)
|
130
|
+
Keita Fujii, <a href="mailto:kfujii@uci.edu"><font color="#000000">kfujii@uci.edu</font><br> </a><br>
|
131
|
+
</td> </tr> </tbody></table></body></html>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/**
|
2
|
+
* Created by: Anand Bagmar
|
3
|
+
* Email: abagmar@gmail.com
|
4
|
+
*
|
5
|
+
* Copyright 2010 Anand Bagmar. Distributed under the Apache 2.0 License
|
6
|
+
*
|
7
|
+
**/
|
8
|
+
|
9
|
+
What is Web Analytics
|
10
|
+
|
11
|
+
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.
|
12
|
+
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.
|
13
|
+
|
14
|
+
Web Analytics provides data on the number of visitors, page views, etc. to gauge the traffic popularity trends which helps doing the market research.
|
15
|
+
Official definition of Web Analytics from Wikipedia (http://en.wikipedia.org/wiki/Web_analytics)
|
16
|
+
|
17
|
+
What is WAAT?
|
18
|
+
|
19
|
+
WAAT stands for Web Analytics Automation Testing.
|
20
|
+
|
21
|
+
Latest version
|
22
|
+
Latest version of WAAT v1.3 is available from the dist folder.
|
23
|
+
|
24
|
+
Need for WAAT
|
25
|
+
> Manual testing for Web Analytics is tedious and time consuming (and also boring).
|
26
|
+
> It is possible to miss out on some of the tags for testing that will provide a feed to the Web Analytic system.
|
27
|
+
|
28
|
+
This framework provides a way to automate the verification of name-value pair properties / tags being reported to a Web Analytics System.
|
29
|
+
|
30
|
+
The idea for the WAAT was initially incubated as part of a project for Sears. The author greatly appreciates Sears' support of releasing the WAAT to the public.
|
31
|
+
|
32
|
+
For any other questions, comments, help, email Anand Bagmar @ abagmar@gmail.com
|
@@ -0,0 +1,38 @@
|
|
1
|
+
== WAAT
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Created by: Anand Bagmar
|
5
|
+
* Email: abagmar@gmail.com
|
6
|
+
*
|
7
|
+
* Copyright 2010 Anand Bagmar. Distributed under the Apache 2.0 License
|
8
|
+
*
|
9
|
+
* See LICENSE.txt for further details.
|
10
|
+
**/
|
11
|
+
|
12
|
+
|
13
|
+
== What is Web Analytics
|
14
|
+
|
15
|
+
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.
|
16
|
+
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.
|
17
|
+
|
18
|
+
Web Analytics provides data on the number of visitors, page views, etc. to gauge the traffic popularity trends which helps doing the market research.
|
19
|
+
Official definition of Web Analytics from Wikipedia (http://en.wikipedia.org/wiki/Web_analytics)
|
20
|
+
|
21
|
+
== What is WAAT?
|
22
|
+
|
23
|
+
<b>{WAAT = Web Analytics Automation Testing.}[http://essenceoftesting.blogspot.com/search/label/waat]</b>
|
24
|
+
|
25
|
+
<b>See the {WAAT-Java wiki}[http://github.com/anandbagmar/WAAT/wiki] for answers to questions like what, why, how, and more.</b>
|
26
|
+
|
27
|
+
For any other questions, comments, help, email <b>Anand Bagmar @ abagmar@gmail.com</b>
|
28
|
+
|
29
|
+
== Latest version
|
30
|
+
|
31
|
+
* <b>WAAT-Java v1.3 is available from the {WAAT-Java dist}[http://github.com/anandbagmar/WAAT/tree/master/dist] folder.</b>
|
32
|
+
* <b>WAAT-Ruby v1.3 gem is available from the {WAAT-Ruby pkg}[http://github.com/anandbagmar/WAAT-ruby/tree/master/pkg] folder.</b>
|
33
|
+
|
34
|
+
== Platforms supported
|
35
|
+
|
36
|
+
* <b>{WAAT}[http://github.com/anandbagmar/WAAT] for Java</b>.
|
37
|
+
* <b>{WAAT}[http://github.com/anandbagmar/WAAT-Ruby] for Ruby</b>. The Ruby gem uses RJB (Ruby-Java-Bridge) to invoke APIs defined by WAAT-Java to enable Web Analytics Testing.
|
38
|
+
* See <b><em>{my blog}[http://essenceoftesting.blogspot.com/search/label/waat] for all activity around WAAT</em></b>.
|
Binary file
|
Binary file
|
@@ -0,0 +1,2150 @@
|
|
1
|
+
<html>
|
2
|
+
|
3
|
+
<head>
|
4
|
+
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
|
5
|
+
<meta name=Generator content="Microsoft Word 14 (filtered)">
|
6
|
+
<title>WAAT Readme</title>
|
7
|
+
<style>
|
8
|
+
<!--
|
9
|
+
/* Font Definitions */
|
10
|
+
@font-face
|
11
|
+
{font-family:Wingdings;
|
12
|
+
panose-1:5 0 0 0 0 0 0 0 0 0;}
|
13
|
+
@font-face
|
14
|
+
{font-family:Wingdings;
|
15
|
+
panose-1:5 0 0 0 0 0 0 0 0 0;}
|
16
|
+
@font-face
|
17
|
+
{font-family:Cambria;
|
18
|
+
panose-1:2 4 5 3 5 4 6 3 2 4;}
|
19
|
+
@font-face
|
20
|
+
{font-family:Calibri;
|
21
|
+
panose-1:2 15 5 2 2 2 4 3 2 4;}
|
22
|
+
@font-face
|
23
|
+
{font-family:Tahoma;
|
24
|
+
panose-1:2 11 6 4 3 5 4 4 2 4;}
|
25
|
+
/* Style Definitions */
|
26
|
+
p.MsoNormal, li.MsoNormal, div.MsoNormal
|
27
|
+
{margin-top:0in;
|
28
|
+
margin-right:0in;
|
29
|
+
margin-bottom:10.0pt;
|
30
|
+
margin-left:0in;
|
31
|
+
line-height:115%;
|
32
|
+
font-size:11.0pt;
|
33
|
+
font-family:"Calibri","sans-serif";}
|
34
|
+
h1
|
35
|
+
{mso-style-link:"Heading 1 Char";
|
36
|
+
margin-top:24.0pt;
|
37
|
+
margin-right:0in;
|
38
|
+
margin-bottom:0in;
|
39
|
+
margin-left:.25in;
|
40
|
+
margin-bottom:.0001pt;
|
41
|
+
text-indent:-.25in;
|
42
|
+
line-height:115%;
|
43
|
+
page-break-after:avoid;
|
44
|
+
font-size:14.0pt;
|
45
|
+
font-family:"Calibri","sans-serif";
|
46
|
+
color:#365F91;}
|
47
|
+
h2
|
48
|
+
{mso-style-link:"Heading 2 Char";
|
49
|
+
margin-top:10.0pt;
|
50
|
+
margin-right:0in;
|
51
|
+
margin-bottom:0in;
|
52
|
+
margin-left:.5in;
|
53
|
+
margin-bottom:.0001pt;
|
54
|
+
text-indent:-.5in;
|
55
|
+
line-height:115%;
|
56
|
+
page-break-after:avoid;
|
57
|
+
font-size:13.0pt;
|
58
|
+
font-family:"Calibri","sans-serif";
|
59
|
+
color:#4F81BD;}
|
60
|
+
h3
|
61
|
+
{mso-style-link:"Heading 3 Char";
|
62
|
+
margin-top:10.0pt;
|
63
|
+
margin-right:0in;
|
64
|
+
margin-bottom:0in;
|
65
|
+
margin-left:.75in;
|
66
|
+
margin-bottom:.0001pt;
|
67
|
+
text-indent:-.75in;
|
68
|
+
line-height:115%;
|
69
|
+
page-break-after:avoid;
|
70
|
+
font-size:12.0pt;
|
71
|
+
font-family:"Calibri","sans-serif";
|
72
|
+
color:#4F81BD;}
|
73
|
+
h4
|
74
|
+
{mso-style-link:"Heading 4 Char";
|
75
|
+
margin-top:10.0pt;
|
76
|
+
margin-right:0in;
|
77
|
+
margin-bottom:0in;
|
78
|
+
margin-left:0in;
|
79
|
+
margin-bottom:.0001pt;
|
80
|
+
line-height:115%;
|
81
|
+
page-break-after:avoid;
|
82
|
+
font-size:11.0pt;
|
83
|
+
font-family:"Cambria","serif";
|
84
|
+
color:#4F81BD;
|
85
|
+
font-style:italic;}
|
86
|
+
p.MsoToc1, li.MsoToc1, div.MsoToc1
|
87
|
+
{margin-top:0in;
|
88
|
+
margin-right:0in;
|
89
|
+
margin-bottom:5.0pt;
|
90
|
+
margin-left:0in;
|
91
|
+
line-height:115%;
|
92
|
+
font-size:11.0pt;
|
93
|
+
font-family:"Calibri","sans-serif";}
|
94
|
+
p.MsoToc2, li.MsoToc2, div.MsoToc2
|
95
|
+
{margin-top:0in;
|
96
|
+
margin-right:0in;
|
97
|
+
margin-bottom:5.0pt;
|
98
|
+
margin-left:11.0pt;
|
99
|
+
line-height:115%;
|
100
|
+
font-size:11.0pt;
|
101
|
+
font-family:"Calibri","sans-serif";}
|
102
|
+
p.MsoToc3, li.MsoToc3, div.MsoToc3
|
103
|
+
{margin-top:0in;
|
104
|
+
margin-right:0in;
|
105
|
+
margin-bottom:5.0pt;
|
106
|
+
margin-left:22.0pt;
|
107
|
+
line-height:115%;
|
108
|
+
font-size:11.0pt;
|
109
|
+
font-family:"Calibri","sans-serif";}
|
110
|
+
p.MsoHeader, li.MsoHeader, div.MsoHeader
|
111
|
+
{mso-style-link:"Header Char";
|
112
|
+
margin:0in;
|
113
|
+
margin-bottom:.0001pt;
|
114
|
+
font-size:11.0pt;
|
115
|
+
font-family:"Calibri","sans-serif";}
|
116
|
+
p.MsoFooter, li.MsoFooter, div.MsoFooter
|
117
|
+
{mso-style-link:"Footer Char";
|
118
|
+
margin:0in;
|
119
|
+
margin-bottom:.0001pt;
|
120
|
+
font-size:11.0pt;
|
121
|
+
font-family:"Calibri","sans-serif";}
|
122
|
+
p.MsoTitle, li.MsoTitle, div.MsoTitle
|
123
|
+
{mso-style-link:"Title Char";
|
124
|
+
margin-top:0in;
|
125
|
+
margin-right:0in;
|
126
|
+
margin-bottom:15.0pt;
|
127
|
+
margin-left:0in;
|
128
|
+
border:none;
|
129
|
+
padding:0in;
|
130
|
+
font-size:26.0pt;
|
131
|
+
font-family:"Calibri","sans-serif";
|
132
|
+
color:#17365D;
|
133
|
+
letter-spacing:.25pt;
|
134
|
+
font-weight:bold;}
|
135
|
+
p.MsoTitleCxSpFirst, li.MsoTitleCxSpFirst, div.MsoTitleCxSpFirst
|
136
|
+
{mso-style-link:"Title Char";
|
137
|
+
margin:0in;
|
138
|
+
margin-bottom:.0001pt;
|
139
|
+
border:none;
|
140
|
+
padding:0in;
|
141
|
+
font-size:26.0pt;
|
142
|
+
font-family:"Calibri","sans-serif";
|
143
|
+
color:#17365D;
|
144
|
+
letter-spacing:.25pt;
|
145
|
+
font-weight:bold;}
|
146
|
+
p.MsoTitleCxSpMiddle, li.MsoTitleCxSpMiddle, div.MsoTitleCxSpMiddle
|
147
|
+
{mso-style-link:"Title Char";
|
148
|
+
margin:0in;
|
149
|
+
margin-bottom:.0001pt;
|
150
|
+
border:none;
|
151
|
+
padding:0in;
|
152
|
+
font-size:26.0pt;
|
153
|
+
font-family:"Calibri","sans-serif";
|
154
|
+
color:#17365D;
|
155
|
+
letter-spacing:.25pt;
|
156
|
+
font-weight:bold;}
|
157
|
+
p.MsoTitleCxSpLast, li.MsoTitleCxSpLast, div.MsoTitleCxSpLast
|
158
|
+
{mso-style-link:"Title Char";
|
159
|
+
margin-top:0in;
|
160
|
+
margin-right:0in;
|
161
|
+
margin-bottom:15.0pt;
|
162
|
+
margin-left:0in;
|
163
|
+
border:none;
|
164
|
+
padding:0in;
|
165
|
+
font-size:26.0pt;
|
166
|
+
font-family:"Calibri","sans-serif";
|
167
|
+
color:#17365D;
|
168
|
+
letter-spacing:.25pt;
|
169
|
+
font-weight:bold;}
|
170
|
+
p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
|
171
|
+
{mso-style-link:"Subtitle Char";
|
172
|
+
margin-top:0in;
|
173
|
+
margin-right:0in;
|
174
|
+
margin-bottom:10.0pt;
|
175
|
+
margin-left:0in;
|
176
|
+
line-height:115%;
|
177
|
+
font-size:12.0pt;
|
178
|
+
font-family:"Cambria","serif";
|
179
|
+
color:#4F81BD;
|
180
|
+
letter-spacing:.75pt;
|
181
|
+
font-style:italic;}
|
182
|
+
a:link, span.MsoHyperlink
|
183
|
+
{color:blue;
|
184
|
+
text-decoration:underline;}
|
185
|
+
a:visited, span.MsoHyperlinkFollowed
|
186
|
+
{color:purple;
|
187
|
+
text-decoration:underline;}
|
188
|
+
em
|
189
|
+
{font-family:"Calibri","sans-serif";
|
190
|
+
font-weight:bold;}
|
191
|
+
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
|
192
|
+
{mso-style-link:"Balloon Text Char";
|
193
|
+
margin:0in;
|
194
|
+
margin-bottom:.0001pt;
|
195
|
+
font-size:8.0pt;
|
196
|
+
font-family:"Tahoma","sans-serif";}
|
197
|
+
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
|
198
|
+
{margin:0in;
|
199
|
+
margin-bottom:.0001pt;
|
200
|
+
font-size:11.0pt;
|
201
|
+
font-family:"Calibri","sans-serif";}
|
202
|
+
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
|
203
|
+
{margin-top:0in;
|
204
|
+
margin-right:0in;
|
205
|
+
margin-bottom:10.0pt;
|
206
|
+
margin-left:.5in;
|
207
|
+
line-height:115%;
|
208
|
+
font-size:11.0pt;
|
209
|
+
font-family:"Calibri","sans-serif";}
|
210
|
+
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
|
211
|
+
{margin-top:0in;
|
212
|
+
margin-right:0in;
|
213
|
+
margin-bottom:0in;
|
214
|
+
margin-left:.5in;
|
215
|
+
margin-bottom:.0001pt;
|
216
|
+
line-height:115%;
|
217
|
+
font-size:11.0pt;
|
218
|
+
font-family:"Calibri","sans-serif";}
|
219
|
+
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
|
220
|
+
{margin-top:0in;
|
221
|
+
margin-right:0in;
|
222
|
+
margin-bottom:0in;
|
223
|
+
margin-left:.5in;
|
224
|
+
margin-bottom:.0001pt;
|
225
|
+
line-height:115%;
|
226
|
+
font-size:11.0pt;
|
227
|
+
font-family:"Calibri","sans-serif";}
|
228
|
+
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
|
229
|
+
{margin-top:0in;
|
230
|
+
margin-right:0in;
|
231
|
+
margin-bottom:10.0pt;
|
232
|
+
margin-left:.5in;
|
233
|
+
line-height:115%;
|
234
|
+
font-size:11.0pt;
|
235
|
+
font-family:"Calibri","sans-serif";}
|
236
|
+
span.MsoSubtleEmphasis
|
237
|
+
{color:gray;
|
238
|
+
font-style:italic;}
|
239
|
+
span.MsoIntenseEmphasis
|
240
|
+
{color:#4F81BD;
|
241
|
+
font-weight:bold;
|
242
|
+
font-style:italic;}
|
243
|
+
span.MsoBookTitle
|
244
|
+
{font-variant:small-caps;
|
245
|
+
letter-spacing:.25pt;
|
246
|
+
font-weight:bold;}
|
247
|
+
p.MsoTocHeading, li.MsoTocHeading, div.MsoTocHeading
|
248
|
+
{margin-top:24.0pt;
|
249
|
+
margin-right:0in;
|
250
|
+
margin-bottom:0in;
|
251
|
+
margin-left:.25in;
|
252
|
+
margin-bottom:.0001pt;
|
253
|
+
text-indent:-.25in;
|
254
|
+
line-height:115%;
|
255
|
+
page-break-after:avoid;
|
256
|
+
font-size:14.0pt;
|
257
|
+
font-family:"Calibri","sans-serif";
|
258
|
+
color:#365F91;
|
259
|
+
font-weight:bold;}
|
260
|
+
span.TitleChar
|
261
|
+
{mso-style-name:"Title Char";
|
262
|
+
mso-style-link:Title;
|
263
|
+
font-family:"Times New Roman","serif";
|
264
|
+
color:#17365D;
|
265
|
+
letter-spacing:.25pt;
|
266
|
+
font-weight:bold;}
|
267
|
+
span.Heading1Char
|
268
|
+
{mso-style-name:"Heading 1 Char";
|
269
|
+
mso-style-link:"Heading 1";
|
270
|
+
font-family:"Times New Roman","serif";
|
271
|
+
color:#365F91;
|
272
|
+
font-weight:bold;}
|
273
|
+
span.BalloonTextChar
|
274
|
+
{mso-style-name:"Balloon Text Char";
|
275
|
+
mso-style-link:"Balloon Text";
|
276
|
+
font-family:"Tahoma","sans-serif";}
|
277
|
+
span.HeaderChar
|
278
|
+
{mso-style-name:"Header Char";
|
279
|
+
mso-style-link:Header;}
|
280
|
+
span.FooterChar
|
281
|
+
{mso-style-name:"Footer Char";
|
282
|
+
mso-style-link:Footer;}
|
283
|
+
span.Heading2Char
|
284
|
+
{mso-style-name:"Heading 2 Char";
|
285
|
+
mso-style-link:"Heading 2";
|
286
|
+
font-family:"Times New Roman","serif";
|
287
|
+
color:#4F81BD;
|
288
|
+
font-weight:bold;}
|
289
|
+
span.Heading3Char
|
290
|
+
{mso-style-name:"Heading 3 Char";
|
291
|
+
mso-style-link:"Heading 3";
|
292
|
+
font-family:"Times New Roman","serif";
|
293
|
+
color:#4F81BD;
|
294
|
+
font-weight:bold;}
|
295
|
+
span.SubtitleChar
|
296
|
+
{mso-style-name:"Subtitle Char";
|
297
|
+
mso-style-link:Subtitle;
|
298
|
+
font-family:"Cambria","serif";
|
299
|
+
color:#4F81BD;
|
300
|
+
letter-spacing:.75pt;
|
301
|
+
font-style:italic;}
|
302
|
+
span.Heading4Char
|
303
|
+
{mso-style-name:"Heading 4 Char";
|
304
|
+
mso-style-link:"Heading 4";
|
305
|
+
font-family:"Cambria","serif";
|
306
|
+
color:#4F81BD;
|
307
|
+
font-weight:bold;
|
308
|
+
font-style:italic;}
|
309
|
+
.MsoChpDefault
|
310
|
+
{font-size:10.0pt;
|
311
|
+
font-family:"Calibri","sans-serif";}
|
312
|
+
/* Page Definitions */
|
313
|
+
@page WordSection1
|
314
|
+
{size:595.35pt 841.95pt;
|
315
|
+
margin:49.5pt 1.0in 49.5pt 1.0in;}
|
316
|
+
div.WordSection1
|
317
|
+
{page:WordSection1;}
|
318
|
+
/* List Definitions */
|
319
|
+
ol
|
320
|
+
{margin-bottom:0in;}
|
321
|
+
ul
|
322
|
+
{margin-bottom:0in;}
|
323
|
+
-->
|
324
|
+
</style>
|
325
|
+
|
326
|
+
</head>
|
327
|
+
|
328
|
+
<body lang=EN-US link=blue vlink=purple>
|
329
|
+
|
330
|
+
<div class=WordSection1>
|
331
|
+
|
332
|
+
<div style='border:none;border-bottom:solid #4F81BD 1.0pt;padding:0in 0in 4.0pt 0in'>
|
333
|
+
|
334
|
+
<p class=MsoTitle>WAAT � Web Analytics Automation Testing Framework</p>
|
335
|
+
|
336
|
+
</div>
|
337
|
+
|
338
|
+
<p class=MsoSubtitle><em><span style='font-size:14.0pt;line-height:115%;
|
339
|
+
font-style:normal'>Anand Bagmar</span></em></p>
|
340
|
+
|
341
|
+
<p class=MsoNormal><a href="mailto:abagmar@gmail.com"><span
|
342
|
+
class=MsoIntenseEmphasis><span style='text-decoration:none'>abagmar@gmail.com</span></span></a></p>
|
343
|
+
|
344
|
+
<p class=MsoNormal><a href="http://www.essenceoftesting.blogspot.com"><span
|
345
|
+
class=MsoIntenseEmphasis><span style='text-decoration:none'>http://www.essenceoftesting.blogspot.com</span></span></a></p>
|
346
|
+
|
347
|
+
<p class=MsoNormal><span class=MsoIntenseEmphasis> </span></p>
|
348
|
+
|
349
|
+
<p class=MsoNormal><b>Copyright 2010 Anand Bagmar.� Distributed under the
|
350
|
+
Apache 2.0 License<br clear=all style='page-break-before:always'>
|
351
|
+
</b></p>
|
352
|
+
|
353
|
+
<p class=MsoToc1><span class=MsoBookTitle><span style='font-variant:normal !important;
|
354
|
+
text-transform:uppercase'>Contents</span></span></p>
|
355
|
+
|
356
|
+
<p class=MsoToc1><a
|
357
|
+
href="#_Toc284419642">1.<span style='color:windowtext;text-decoration:none'>����� </span>What
|
358
|
+
is Web Analytics<span style='color:windowtext;display:none;text-decoration:
|
359
|
+
none'>. </span><span
|
360
|
+
style='color:windowtext;display:none;text-decoration:none'>3</span></a></p>
|
361
|
+
|
362
|
+
<p class=MsoToc1><a href="#_Toc284419643">2.<span style='color:windowtext;
|
363
|
+
text-decoration:none'>����� </span>What is WAAT?<span style='color:windowtext;
|
364
|
+
display:none;text-decoration:none'>. </span><span
|
365
|
+
style='color:windowtext;display:none;text-decoration:none'>3</span></a></p>
|
366
|
+
|
367
|
+
<p class=MsoToc1><a href="#_Toc284419644">3.<span style='color:windowtext;
|
368
|
+
text-decoration:none'>����� </span>Need for WAAT<span style='color:windowtext;
|
369
|
+
display:none;text-decoration:none'>. </span><span
|
370
|
+
style='color:windowtext;display:none;text-decoration:none'>3</span></a></p>
|
371
|
+
|
372
|
+
<p class=MsoToc1><a href="#_Toc284419645">4.<span style='color:windowtext;
|
373
|
+
text-decoration:none'>����� </span>WAAT Architecture<span style='color:windowtext;
|
374
|
+
display:none;text-decoration:none'>. </span><span
|
375
|
+
style='color:windowtext;display:none;text-decoration:none'>4</span></a></p>
|
376
|
+
|
377
|
+
<p class=MsoToc1><a href="#_Toc284419646">5.<span style='color:windowtext;
|
378
|
+
text-decoration:none'>����� </span>WAAT Setup<span style='color:windowtext;
|
379
|
+
display:none;text-decoration:none'>. </span><span
|
380
|
+
style='color:windowtext;display:none;text-decoration:none'>4</span></a></p>
|
381
|
+
|
382
|
+
<p class=MsoToc1><a href="#_Toc284419647">6.<span style='color:windowtext;
|
383
|
+
text-decoration:none'>����� </span>How to use WAAT?<span style='color:windowtext;
|
384
|
+
display:none;text-decoration:none'>. </span><span
|
385
|
+
style='color:windowtext;display:none;text-decoration:none'>4</span></a></p>
|
386
|
+
|
387
|
+
<p class=MsoToc1><a href="#_Toc284419648">6.1<span style='color:windowtext;
|
388
|
+
text-decoration:none'>�������� </span>WAAT using Omniture Debugger<span
|
389
|
+
style='color:windowtext;display:none;text-decoration:none'>. </span><span
|
390
|
+
style='color:windowtext;display:none;text-decoration:none'>4</span></a></p>
|
391
|
+
|
392
|
+
<p class=MsoToc2><a href="#_Toc284419649">6.1.1<span style='color:windowtext;
|
393
|
+
text-decoration:none'>��������� </span>Approach<span style='color:windowtext;
|
394
|
+
display:none;text-decoration:none'>. </span><span
|
395
|
+
style='color:windowtext;display:none;text-decoration:none'>4</span></a></p>
|
396
|
+
|
397
|
+
<p class=MsoToc2><a href="#_Toc284419650">6.1.2<span style='color:windowtext;
|
398
|
+
text-decoration:none'>��������� </span>Create an implementation of the
|
399
|
+
ScriptRunner interface<span style='color:windowtext;display:none;text-decoration:
|
400
|
+
none'>. </span><span
|
401
|
+
style='color:windowtext;display:none;text-decoration:none'>5</span></a></p>
|
402
|
+
|
403
|
+
<p class=MsoToc2><a href="#_Toc284419651">6.1.3<span style='color:windowtext;
|
404
|
+
text-decoration:none'>��������� </span>Selenium ScriptRunner<span
|
405
|
+
style='color:windowtext;display:none;text-decoration:none'>. </span><span
|
406
|
+
style='color:windowtext;display:none;text-decoration:none'>5</span></a></p>
|
407
|
+
|
408
|
+
<p class=MsoToc2><a href="#_Toc284419652">6.1.4<span style='color:windowtext;
|
409
|
+
text-decoration:none'>��������� </span>WebDriver ScriptRunner<span
|
410
|
+
style='color:windowtext;display:none;text-decoration:none'>. </span><span
|
411
|
+
style='color:windowtext;display:none;text-decoration:none'>5</span></a></p>
|
412
|
+
|
413
|
+
<p class=MsoToc2><a href="#_Toc284419653">6.1.5<span style='color:windowtext;
|
414
|
+
text-decoration:none'>��������� </span>Other ScriptRunner<span
|
415
|
+
style='color:windowtext;display:none;text-decoration:none'>. </span><span
|
416
|
+
style='color:windowtext;display:none;text-decoration:none'>5</span></a></p>
|
417
|
+
|
418
|
+
<p class=MsoToc2><a href="#_Toc284419654">6.1.6<span style='color:windowtext;
|
419
|
+
text-decoration:none'>��������� </span>Define Test data<span style='color:windowtext;
|
420
|
+
display:none;text-decoration:none'>. </span><span
|
421
|
+
style='color:windowtext;display:none;text-decoration:none'>5</span></a></p>
|
422
|
+
|
423
|
+
<p class=MsoToc2><a href="#_Toc284419655">6.1.7<span style='color:windowtext;
|
424
|
+
text-decoration:none'>��������� </span>Test code changes<span style='color:
|
425
|
+
windowtext;display:none;text-decoration:none'>. </span><span
|
426
|
+
style='color:windowtext;display:none;text-decoration:none'>5</span></a></p>
|
427
|
+
|
428
|
+
<p class=MsoToc3><a href="#_Toc284419656">6.1.7.1<span style='color:windowtext;
|
429
|
+
text-decoration:none'>����� </span>Selenium-based test changes<span
|
430
|
+
style='color:windowtext;display:none;text-decoration:none'>. </span><span
|
431
|
+
style='color:windowtext;display:none;text-decoration:none'>5</span></a></p>
|
432
|
+
|
433
|
+
<p class=MsoToc3><a href="#_Toc284419657">6.1.7.2<span style='color:windowtext;
|
434
|
+
text-decoration:none'>����� </span>WebDriver-based test changes<span
|
435
|
+
style='color:windowtext;display:none;text-decoration:none'>. </span><span
|
436
|
+
style='color:windowtext;display:none;text-decoration:none'>8</span></a></p>
|
437
|
+
|
438
|
+
<p class=MsoToc1><a href="#_Toc284419658">6.2<span style='color:windowtext;
|
439
|
+
text-decoration:none'>�������� </span>WAAT using HttpSniffer<span
|
440
|
+
style='color:windowtext;display:none;text-decoration:none'>. </span><span
|
441
|
+
style='color:windowtext;display:none;text-decoration:none'>10</span></a></p>
|
442
|
+
|
443
|
+
<p class=MsoToc2><a href="#_Toc284419659">6.2.1<span style='color:windowtext;
|
444
|
+
text-decoration:none'>��������� </span>Approach<span style='color:windowtext;
|
445
|
+
display:none;text-decoration:none'>. </span><span
|
446
|
+
style='color:windowtext;display:none;text-decoration:none'>10</span></a></p>
|
447
|
+
|
448
|
+
<p class=MsoToc2><a href="#_Toc284419660">6.2.2<span style='color:windowtext;
|
449
|
+
text-decoration:none'>��������� </span>Setup 3<sup>rd</sup>-party libraries<span
|
450
|
+
style='color:windowtext;display:none;text-decoration:none'>. </span><span
|
451
|
+
style='color:windowtext;display:none;text-decoration:none'>10</span></a></p>
|
452
|
+
|
453
|
+
<p class=MsoToc2><a href="#_Toc284419661">6.2.3<span style='color:windowtext;
|
454
|
+
text-decoration:none'>��������� </span>Define Test data<span style='color:windowtext;
|
455
|
+
display:none;text-decoration:none'>. </span><span
|
456
|
+
style='color:windowtext;display:none;text-decoration:none'>10</span></a></p>
|
457
|
+
|
458
|
+
<p class=MsoToc2><a href="#_Toc284419662">6.2.4<span style='color:windowtext;
|
459
|
+
text-decoration:none'>��������� </span>Test code changes<span style='color:
|
460
|
+
windowtext;display:none;text-decoration:none'>. </span><span
|
461
|
+
style='color:windowtext;display:none;text-decoration:none'>10</span></a></p>
|
462
|
+
|
463
|
+
<p class=MsoToc1><a href="#_Toc284419663">7.<span style='color:windowtext;
|
464
|
+
text-decoration:none'>����� </span>Jpcap setup<span style='color:windowtext;
|
465
|
+
display:none;text-decoration:none'>. </span><span
|
466
|
+
style='color:windowtext;display:none;text-decoration:none'>13</span></a></p>
|
467
|
+
|
468
|
+
<p class=MsoToc2><a href="#_Toc284419664">7.1.1<span style='color:windowtext;
|
469
|
+
text-decoration:none'>��������� </span>What is Jpcap?<span style='color:windowtext;
|
470
|
+
display:none;text-decoration:none'>. </span><span
|
471
|
+
style='color:windowtext;display:none;text-decoration:none'>13</span></a></p>
|
472
|
+
|
473
|
+
<p class=MsoToc2><a href="#_Toc284419665">7.1.2<span style='color:windowtext;
|
474
|
+
text-decoration:none'>��������� </span>Custom installation<span
|
475
|
+
style='color:windowtext;display:none;text-decoration:none'>. </span><span
|
476
|
+
style='color:windowtext;display:none;text-decoration:none'>13</span></a></p>
|
477
|
+
|
478
|
+
<p class=MsoToc3><a href="#_Toc284419666">7.1.2.1<span style='color:windowtext;
|
479
|
+
text-decoration:none'>����� </span>Windows<span style='color:windowtext;
|
480
|
+
display:none;text-decoration:none'>. </span><span
|
481
|
+
style='color:windowtext;display:none;text-decoration:none'>13</span></a></p>
|
482
|
+
|
483
|
+
<p class=MsoToc3><a href="#_Toc284419667">7.1.2.2<span style='color:windowtext;
|
484
|
+
text-decoration:none'>����� </span>Fedora, RedHat<span style='color:windowtext;
|
485
|
+
display:none;text-decoration:none'>. </span><span
|
486
|
+
style='color:windowtext;display:none;text-decoration:none'>13</span></a></p>
|
487
|
+
|
488
|
+
<p class=MsoToc3><a href="#_Toc284419668">7.1.2.3<span style='color:windowtext;
|
489
|
+
text-decoration:none'>����� </span>Ubuntu, GNU/Debian<span style='color:windowtext;
|
490
|
+
display:none;text-decoration:none'>. </span><span
|
491
|
+
style='color:windowtext;display:none;text-decoration:none'>13</span></a></p>
|
492
|
+
|
493
|
+
<p class=MsoToc2><a href="#_Toc284419669">7.1.3<span style='color:windowtext;
|
494
|
+
text-decoration:none'>��������� </span>Default installation<span
|
495
|
+
style='color:windowtext;display:none;text-decoration:none'>. </span><span
|
496
|
+
style='color:windowtext;display:none;text-decoration:none'>13</span></a></p>
|
497
|
+
|
498
|
+
<p class=MsoToc1><a href="#_Toc284419670">8.<span style='color:windowtext;
|
499
|
+
text-decoration:none'>����� </span>FAQs<span style='color:windowtext;
|
500
|
+
display:none;text-decoration:none'>. </span><span
|
501
|
+
style='color:windowtext;display:none;text-decoration:none'>14</span></a></p>
|
502
|
+
|
503
|
+
<p class=MsoNormal style='line-height:normal'><span style='font-size:12.0pt'> </span></p>
|
504
|
+
|
505
|
+
<span style='font-size:12.0pt;font-family:"Calibri","sans-serif"'><br
|
506
|
+
clear=all style='page-break-before:always'>
|
507
|
+
</span>
|
508
|
+
|
509
|
+
<p class=MsoNormal style='line-height:normal'><a name="_Toc284331572"></a><b><span
|
510
|
+
style='font-size:12.0pt;color:#365F91'> </span></b></p>
|
511
|
+
|
512
|
+
<h1><a name="_Toc284419642"><span style='font-weight:normal'>1.<span
|
513
|
+
style='font:7.0pt "Times New Roman"'> </span></span>What
|
514
|
+
is Web Analytics</a></h1>
|
515
|
+
|
516
|
+
<p class=MsoNormal>Web Analytics is the measurement, collection, analysis and
|
517
|
+
reporting of internet data for purposes of understanding and optimizing web
|
518
|
+
usage. Web Analytics is not just a tool for measuring website traffic, but can
|
519
|
+
also be used as a tool for business research and market research.</p>
|
520
|
+
|
521
|
+
<p class=MsoNormal>Web Analytics applications can also help companies measure
|
522
|
+
the results of traditional print advertising campaigns. It helps one to
|
523
|
+
estimate how the traffic to the web site changed after the launch of a new
|
524
|
+
advertising campaign.</p>
|
525
|
+
|
526
|
+
<p class=MsoNormal>Web Analytics provides data on the number of visitors, page
|
527
|
+
views, etc. to gauge the traffic popularity trends which helps doing the market
|
528
|
+
research.</p>
|
529
|
+
|
530
|
+
<p class=MsoNormal><a href="http://en.wikipedia.org/wiki/Web_analytics">Official
|
531
|
+
definition of Web Analytics from Wikipedia</a></p>
|
532
|
+
|
533
|
+
<h1><a name="_Toc284419643"><span style='font-weight:normal'>2.<span
|
534
|
+
style='font:7.0pt "Times New Roman"'> </span></span>What
|
535
|
+
is WAAT?</a></h1>
|
536
|
+
|
537
|
+
<p class=MsoNormal>WAAT stands for Web Analytics Automation Testing.</p>
|
538
|
+
|
539
|
+
<h1><a name="_Toc284419644"><span style='font-weight:normal'>3.<span
|
540
|
+
style='font:7.0pt "Times New Roman"'> </span></span>Need
|
541
|
+
for WAAT</a></h1>
|
542
|
+
|
543
|
+
<p class=MsoListParagraphCxSpFirst style='text-indent:-.25in'><span
|
544
|
+
style='font-family:Wingdings'>�<span style='font:7.0pt "Times New Roman"'>
|
545
|
+
</span></span>Manual testing for Web Analytics is tedious and time consuming
|
546
|
+
(and also boring).</p>
|
547
|
+
|
548
|
+
<p class=MsoListParagraphCxSpLast style='text-indent:-.25in'><span
|
549
|
+
style='font-family:Wingdings'>�<span style='font:7.0pt "Times New Roman"'>
|
550
|
+
</span></span>It is possible to miss out on some of the tags for testing that
|
551
|
+
will provide a feed to the Web Analytic system.</p>
|
552
|
+
|
553
|
+
<p class=MsoNormal>This framework provides a way to automate the verification of
|
554
|
+
name-value pair properties / tags being reported to a Web Analytics System.</p>
|
555
|
+
|
556
|
+
<h1><a name="_Toc284419645"><span style='font-weight:normal'>4.<span
|
557
|
+
style='font:7.0pt "Times New Roman"'> </span></span>WAAT
|
558
|
+
Architecture</a></h1>
|
559
|
+
|
560
|
+
<p class=MsoNormal><img border=0 width=602 height=451 id="Picture 2"
|
561
|
+
src="WAAT%20Readme_files/image001.jpg"></p>
|
562
|
+
|
563
|
+
<h1><a name="_Toc284419646"><span style='font-weight:normal'>5.<span
|
564
|
+
style='font:7.0pt "Times New Roman"'> </span></span>WAAT
|
565
|
+
Setup</a></h1>
|
566
|
+
|
567
|
+
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'><span
|
568
|
+
style='font-family:Wingdings'>�<span style='font:7.0pt "Times New Roman"'>
|
569
|
+
</span></span>Download WAAT for the platform of your choice (Windows / Linux /
|
570
|
+
Unix / MacOS) .</p>
|
571
|
+
|
572
|
+
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'><span
|
573
|
+
style='font-family:Wingdings'>�<span style='font:7.0pt "Times New Roman"'>
|
574
|
+
</span></span>Unzip the downloaded file in the lib folder of your existing
|
575
|
+
project (say, c:\myProject\lib).</p>
|
576
|
+
|
577
|
+
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'><span
|
578
|
+
style='font-family:Wingdings'>�<span style='font:7.0pt "Times New Roman"'>
|
579
|
+
</span></span>Add c:\myProject\lib\WAAT\lib to your library classpath.</p>
|
580
|
+
|
581
|
+
<h1><a name="_Toc284419647"><span style='font-weight:normal'>6.<span
|
582
|
+
style='font:7.0pt "Times New Roman"'> </span></span>How
|
583
|
+
to use WAAT?</a></h1>
|
584
|
+
|
585
|
+
<p class=MsoNormal>WAAT can be used in 2 ways � Omniture Debugger, or,
|
586
|
+
HttpSniffer.</p>
|
587
|
+
|
588
|
+
<h1 style='margin-left:.5in;text-indent:-.5in'><a name="_Toc284419648">6.1<span
|
589
|
+
style='font:7.0pt "Times New Roman"'>
|
590
|
+
</span>WAAT using Omniture Debugger</a></h1>
|
591
|
+
|
592
|
+
<h2><a name="_Toc284419649"><span style='font-size:11.0pt;line-height:115%;
|
593
|
+
color:#365F91'>6.1.1<span style='font:7.0pt "Times New Roman"'>
|
594
|
+
</span></span>Approach</a></h2>
|
595
|
+
|
596
|
+
<p class=MsoNormal style='line-height:normal'><span style='font-size:12.0pt'>The
|
597
|
+
Omniture Debugger works by executing a javascript (provided by Omniture SiteCatalyst)
|
598
|
+
in the same browser where your UI test is executing. This action opens a new
|
599
|
+
window and shows the list of name/value pair properties reported to
|
600
|
+
SiteCatalyst.</span></p>
|
601
|
+
|
602
|
+
<p class=MsoNormal style='line-height:normal'><span style='font-size:12.0pt'>This
|
603
|
+
approach makes used of the UI framework being used.</span></p>
|
604
|
+
|
605
|
+
<p class=MsoNormal style='line-height:normal'><span style='font-size:12.0pt'>To
|
606
|
+
use WAAT in this approach, you need to follow the steps mentioned below.</span></p>
|
607
|
+
|
608
|
+
<p class=MsoNormal style='line-height:normal'><span style='font-size:12.0pt'> </span></p>
|
609
|
+
|
610
|
+
<h2><a name="_Toc284419650"></a><a name="_Create_an_implementation"></a><span
|
611
|
+
style='font-size:11.0pt;line-height:115%;color:#365F91'>6.1.2<span
|
612
|
+
style='font:7.0pt "Times New Roman"'>
|
613
|
+
</span></span>Create an implementation of the ScriptRunner interface</h2>
|
614
|
+
|
615
|
+
<p class=MsoNormal style='line-height:normal'><span style='font-size:12.0pt'>Your
|
616
|
+
test framework could be using any of the available UI drivers (example:
|
617
|
+
Selenium, WebDriver, Sahi, etc.). </span></p>
|
618
|
+
|
619
|
+
<p class=MsoNormal style='line-height:normal'><span style='font-size:12.0pt'>To
|
620
|
+
work with WAAT, you will first need to implement a ScriptRunner class. This
|
621
|
+
class provides a hook for the WAAT framework to execute the javascript in the
|
622
|
+
currently executing browser instance to open, and capture the data being sent
|
623
|
+
to SiteCatalyst.</span></p>
|
624
|
+
|
625
|
+
<p class=MsoNormal style='line-height:normal'><span style='font-size:12.0pt'>Selenium
|
626
|
+
and WebDriver sample script runners are provided with the WAAT distribution.
|
627
|
+
See the SeleniumScriptRunner.java and WebDriverScriptRunner.java files in folder
|
628
|
+
- \samplescripts\com\thoughtworks\webanalyticsautomation\scriptrunner in the
|
629
|
+
downloaded zip distribution for reference.</span></p>
|
630
|
+
|
631
|
+
<p class=MsoNormal style='line-height:normal'><span style='font-size:12.0pt'>Copy
|
632
|
+
the relevant ScriptRunner file in your test framework, update its namespace and
|
633
|
+
your ScriptRunner class is ready for use.</span></p>
|
634
|
+
|
635
|
+
<h2><a name="_Toc284419651"><span style='font-size:11.0pt;line-height:115%;
|
636
|
+
color:#365F91'>6.1.3<span style='font:7.0pt "Times New Roman"'>
|
637
|
+
</span></span>Selenium ScriptRunner</a></h2>
|
638
|
+
|
639
|
+
<p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;line-height:normal'><span
|
640
|
+
style='font-size:12.0pt;font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
641
|
+
</span></span><span style='font-size:12.0pt'>Copy the SeleniumScriptRunner.java
|
642
|
+
from \samplescripts\com\thoughtworks\webanalyticsautomation\scriptrunner in the
|
643
|
+
downloaded zip file to your test framework,</span></p>
|
644
|
+
|
645
|
+
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in;line-height:normal'><span
|
646
|
+
style='font-size:12.0pt;font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
647
|
+
</span></span><span style='font-size:12.0pt'>Update its namespace</span></p>
|
648
|
+
|
649
|
+
<p class=MsoListParagraphCxSpLast style='text-indent:-.25in;line-height:normal'><span
|
650
|
+
style='font-size:12.0pt;font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
651
|
+
</span></span><span style='font-size:12.0pt'>Your ScriptRunner class is ready
|
652
|
+
for use.</span></p>
|
653
|
+
|
654
|
+
<h2><a name="OmniDbg_Sel_ImplementScriptRunner"></a><a name="_Toc284419652"><span
|
655
|
+
style='font-size:11.0pt;line-height:115%;color:#365F91'>6.1.4<span
|
656
|
+
style='font:7.0pt "Times New Roman"'>
|
657
|
+
</span></span>WebDriver ScriptRunner</a></h2>
|
658
|
+
|
659
|
+
<p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;line-height:normal'><span
|
660
|
+
style='font-size:12.0pt;font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
661
|
+
</span></span><span style='font-size:12.0pt'>Copy the WebDriverScriptRunner.java
|
662
|
+
from \samplescripts\com\thoughtworks\webanalyticsautomation\scriptrunner in the
|
663
|
+
downloaded zip file to your test framework,</span></p>
|
664
|
+
|
665
|
+
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in;line-height:normal'><span
|
666
|
+
style='font-size:12.0pt;font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
667
|
+
</span></span><span style='font-size:12.0pt'>Update its namespace</span></p>
|
668
|
+
|
669
|
+
<p class=MsoListParagraphCxSpLast style='text-indent:-.25in;line-height:normal'><span
|
670
|
+
style='font-size:12.0pt;font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
671
|
+
</span></span><span style='font-size:12.0pt'>Your ScriptRunner class is ready
|
672
|
+
for use.</span></p>
|
673
|
+
|
674
|
+
<h2><a name="_Toc284419653"><span style='font-size:11.0pt;line-height:115%;
|
675
|
+
color:#365F91'>6.1.5<span style='font:7.0pt "Times New Roman"'>
|
676
|
+
</span></span>Other ScriptRunner</a></h2>
|
677
|
+
|
678
|
+
<p class=MsoNormal style='line-height:normal'><span style='font-size:12.0pt'>If
|
679
|
+
you are using any other UI testing framework, you can create a class similar to
|
680
|
+
the SeleniumScriptRunner.java or WebDriverScriptRunner.jar by implementing the
|
681
|
+
com.thoughtworks.webanalyticsautomation.scriptrunner.ScriptRunner interface.</span></p>
|
682
|
+
|
683
|
+
<h2><a name="_Toc284419654"><span style='font-size:11.0pt;line-height:115%;
|
684
|
+
color:#365F91'>6.1.6<span style='font:7.0pt "Times New Roman"'>
|
685
|
+
</span></span>Define Test data</a></h2>
|
686
|
+
|
687
|
+
<p class=MsoNormal>Provide the test data to be validated for each action in an
|
688
|
+
xml file. Sample XML file is provided <a href="../sampledata/TestData.xml">here</a>.</p>
|
689
|
+
|
690
|
+
<h2><a name="_Toc284419655"><span style='font-size:11.0pt;line-height:115%;
|
691
|
+
color:#365F91'>6.1.7<span style='font:7.0pt "Times New Roman"'>
|
692
|
+
</span></span>Test code changes</a></h2>
|
693
|
+
|
694
|
+
<p class=MsoNormal>You will need to make changes in your existing / new tests.</p>
|
695
|
+
|
696
|
+
<p class=MsoNormal>See the sections below for samples of Selenium and
|
697
|
+
WebDriver-based changes.</p>
|
698
|
+
|
699
|
+
<h3><a name="_Toc284419656"><span style='line-height:115%;color:#365F91'>6.1.7.1<span
|
700
|
+
style='font:7.0pt "Times New Roman"'>
|
701
|
+
</span></span>Selenium-based test changes</a></h3>
|
702
|
+
|
703
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
704
|
+
style='font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
705
|
+
</span></span><a href="#OmniDbj_Sel_ImportPackages"><span style='font-size:
|
706
|
+
12.0pt'>Import relevant packages</span></a></p>
|
707
|
+
|
708
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
709
|
+
style='font-family:Symbol;color:blue'>�<span style='font:7.0pt "Times New Roman"'>
|
710
|
+
</span></span><a href="#OmniDbj_Sel_DefineVariables"><span style='font-size:
|
711
|
+
12.0pt'>Define & provide parameter values</span></a></p>
|
712
|
+
|
713
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
714
|
+
style='font-family:Symbol;color:blue'>�<span style='font:7.0pt "Times New Roman"'>
|
715
|
+
</span></span><a href="#OmniDbj_Sel_InitializeEngine"><span style='font-size:
|
716
|
+
12.0pt'>Initialize Engine</span></a></p>
|
717
|
+
|
718
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
719
|
+
style='font-family:Symbol;color:blue'>�<span style='font:7.0pt "Times New Roman"'>
|
720
|
+
</span></span><a href="#OmniDbj_Sel_EnableWebAnalyticsTesting"><span
|
721
|
+
style='font-size:12.0pt'>Enable Web Analytics Testing</span></a></p>
|
722
|
+
|
723
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
724
|
+
style='font-family:Symbol;color:blue'>�<span style='font:7.0pt "Times New Roman"'>
|
725
|
+
</span></span><a href="#OmniDbj_Sel_Verify"><span style='font-size:12.0pt'>Verify
|
726
|
+
Web Analytics reporting</span></a></p>
|
727
|
+
|
728
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
729
|
+
style='font-family:Symbol;color:blue'>�<span style='font:7.0pt "Times New Roman"'>
|
730
|
+
</span></span><a href="#OmniDbj_Sel_SampleValidations"><span style='font-size:
|
731
|
+
12.0pt'>Sample validations</span></a></p>
|
732
|
+
|
733
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
734
|
+
class=MsoHyperlink><span style='font-family:Symbol;text-decoration:none'>�<span
|
735
|
+
style='font:7.0pt "Times New Roman"'>
|
736
|
+
</span></span></span><a href="#OmniDbj_Sel_DisableWebAnalyticsTesting"><span
|
737
|
+
style='font-size:12.0pt'>Disable Web Analytics reporting</span></a></p>
|
738
|
+
|
739
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.5in'> </p>
|
740
|
+
|
741
|
+
<div style='border:solid windowtext 1.0pt;padding:1.0pt 1.0pt 1.0pt 1.0pt'>
|
742
|
+
|
743
|
+
<p class=MsoNormal style='border:none;padding:0in'><span style='font-size:10.0pt;
|
744
|
+
line-height:115%'>package com.thoughtworks.webanalyticsautomation;</span></p>
|
745
|
+
|
746
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
747
|
+
10.0pt;background:yellow'>/**</span></p>
|
748
|
+
|
749
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
750
|
+
10.0pt;background:yellow'>�* Created by: Anand Bagmar</span></p>
|
751
|
+
|
752
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
753
|
+
10.0pt;background:yellow'>�* Email: abagmar@gmail.com</span></p>
|
754
|
+
|
755
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
756
|
+
10.0pt;background:yellow'>�* Date: Dec 29, 2010</span></p>
|
757
|
+
|
758
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
759
|
+
10.0pt;background:yellow'>�* Time: 9:34:02 AM</span></p>
|
760
|
+
|
761
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
762
|
+
10.0pt;background:yellow'>�* </span></p>
|
763
|
+
|
764
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
765
|
+
10.0pt;background:yellow'>�* Copyright 2010 Anand Bagmar (abagmar@gmail.com).�
|
766
|
+
Distributed under the Apache 2.0 License </span></p>
|
767
|
+
|
768
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
769
|
+
10.0pt;background:yellow'>**/</span></p>
|
770
|
+
|
771
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
772
|
+
10.0pt'> </span></p>
|
773
|
+
|
774
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><strong><span
|
775
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
776
|
+
|
777
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><a
|
778
|
+
name="OmniDbj_Sel_ImportPackages"><strong><span style='font-size:10.0pt;
|
779
|
+
font-family:"Calibri","sans-serif";background:aqua'>Import packages</span></strong></a></p>
|
780
|
+
|
781
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><strong><span
|
782
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
783
|
+
|
784
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
785
|
+
10.0pt;background:aqua'>import
|
786
|
+
com.thoughtworks.webanalyticsautomation.common.BROWSER;</span></p>
|
787
|
+
|
788
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
789
|
+
10.0pt;background:aqua'>import
|
790
|
+
com.thoughtworks.webanalyticsautomation.plugins.WebAnalyticTool;</span></p>
|
791
|
+
|
792
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
793
|
+
10.0pt;background:aqua'>import
|
794
|
+
com.thoughtworks.webanalyticsautomation.scriptrunner.SeleniumScriptRunner;</span></p>
|
795
|
+
|
796
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
797
|
+
10.0pt;background:aqua'>import static
|
798
|
+
com.thoughtworks.webanalyticsautomation.Controller.getInstance;</span></p>
|
799
|
+
|
800
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
801
|
+
10.0pt;background:aqua'>import static
|
802
|
+
com.thoughtworks.webanalyticsautomation.common.Utils.currentDirectory;</span></p>
|
803
|
+
|
804
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
805
|
+
10.0pt;background:aqua'>import static
|
806
|
+
com.thoughtworks.webanalyticsautomation.common.Utils.fileSeparator;</span></p>
|
807
|
+
|
808
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
809
|
+
10.0pt'> </span></p>
|
810
|
+
|
811
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
812
|
+
10.0pt'>import org.apache.log4j.Logger;</span></p>
|
813
|
+
|
814
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
815
|
+
10.0pt'>import
|
816
|
+
com.thoughtworks.webanalyticsautomation.utils.SeleniumScriptRunnerHelper;</span></p>
|
817
|
+
|
818
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
819
|
+
10.0pt'> </span></p>
|
820
|
+
|
821
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
822
|
+
10.0pt'>import org.testng.annotations.AfterMethod;</span></p>
|
823
|
+
|
824
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
825
|
+
10.0pt'>import org.testng.annotations.Test;</span></p>
|
826
|
+
|
827
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
828
|
+
10.0pt'>import static org.testng.Assert.assertEquals;</span></p>
|
829
|
+
|
830
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
831
|
+
10.0pt'>import static org.testng.Assert.assertNotNull;</span></p>
|
832
|
+
|
833
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
834
|
+
10.0pt'> </span></p>
|
835
|
+
|
836
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
837
|
+
10.0pt'>import static
|
838
|
+
com.thoughtworks.selenium.grid.tools.ThreadSafeSeleniumSessionStorage.session;</span></p>
|
839
|
+
|
840
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
841
|
+
10.0pt'>import com.thoughtworks.selenium.Selenium;</span></p>
|
842
|
+
|
843
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
844
|
+
10.0pt'> </span></p>
|
845
|
+
|
846
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
847
|
+
10.0pt'>public class OmnitureDebuggerWithSeleniumTest {</span></p>
|
848
|
+
|
849
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
850
|
+
10.0pt'>��� private SeleniumScriptRunnerHelper seleniumScriptRunnerHelper;</span></p>
|
851
|
+
|
852
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
853
|
+
10.0pt'>��� private Logger logger = Logger.getLogger(getClass());</span></p>
|
854
|
+
|
855
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
856
|
+
10.0pt'> </span></p>
|
857
|
+
|
858
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><strong><span
|
859
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
860
|
+
|
861
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><a
|
862
|
+
name="OmniDbj_Sel_DefineVariables"><strong><span style='font-size:10.0pt;
|
863
|
+
font-family:"Calibri","sans-serif";background:aqua'>Define & provide parameter
|
864
|
+
values</span></strong></a></p>
|
865
|
+
|
866
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><strong><span
|
867
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
868
|
+
|
869
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
870
|
+
10.0pt;background:aqua'>��� private Engine engine;</span></p>
|
871
|
+
|
872
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
873
|
+
10.0pt;background:aqua'>��� private WebAnalyticTool webAnalyticTool =
|
874
|
+
WebAnalyticTool.OMNITURE_DEBUGGER;</span></p>
|
875
|
+
|
876
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
877
|
+
10.0pt;background:aqua'>��� private InputFileType inputFileType =
|
878
|
+
InputFileType.XML;</span></p>
|
879
|
+
|
880
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
881
|
+
10.0pt;background:aqua'>��� private boolean keepLoadedFileInMemory = true;</span></p>
|
882
|
+
|
883
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
884
|
+
10.0pt;background:aqua'>��� private String log4jPropertiesAbsoluteFilePath =
|
885
|
+
currentDirectory() + fileSeparator() + "resources"� + fileSeparator()
|
886
|
+
+ "log4j.properties";</span></p>
|
887
|
+
|
888
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
889
|
+
10.0pt;background:aqua'>��� private String inputDataFileName =
|
890
|
+
currentDirectory() + fileSeparator() + "test"� + fileSeparator() +
|
891
|
+
"sampledata"� + fileSeparator() + "TestData.xml";</span></p>
|
892
|
+
|
893
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
894
|
+
10.0pt;background:aqua'>��� private String actionName = "OpenUpcomingPage_OmnitureDebugger_Selenium";</span></p>
|
895
|
+
|
896
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
897
|
+
10.0pt'> </span></p>
|
898
|
+
|
899
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
900
|
+
10.0pt'>��� @Test</span></p>
|
901
|
+
|
902
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
903
|
+
10.0pt'>��� public void
|
904
|
+
captureAndVerifyDataReportedToWebAnalytics_Selenium_IE() throws Exception {</span></p>
|
905
|
+
|
906
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
907
|
+
10.0pt;background:aqua'> </span></p>
|
908
|
+
|
909
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
910
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
911
|
+
|
912
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><a
|
913
|
+
name="OmniDbj_Sel_InitializeEngine"><strong><span style='font-size:10.0pt;
|
914
|
+
font-family:"Calibri","sans-serif";background:aqua'>Initialize Engine</span></strong></a></p>
|
915
|
+
|
916
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
917
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
918
|
+
|
919
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
920
|
+
10.0pt;background:aqua'>������� engine = Controller.getInstance (</span></p>
|
921
|
+
|
922
|
+
<p class=MsoNoSpacing style='text-indent:1.0in;border:none;padding:0in'><span
|
923
|
+
style='font-size:10.0pt;background:aqua'>webAnalyticTool, </span></p>
|
924
|
+
|
925
|
+
<p class=MsoNoSpacing style='text-indent:1.0in;border:none;padding:0in'><span
|
926
|
+
style='font-size:10.0pt;background:aqua'>inputFileType, </span></p>
|
927
|
+
|
928
|
+
<p class=MsoNoSpacing style='text-indent:1.0in;border:none;padding:0in'><span
|
929
|
+
style='font-size:10.0pt;background:aqua'>keepLoadedFileInMemory, </span></p>
|
930
|
+
|
931
|
+
<p class=MsoNoSpacing style='text-indent:1.0in;border:none;padding:0in'><span
|
932
|
+
style='font-size:10.0pt;background:aqua'>log4jPropertiesAbsoluteFilePath</span></p>
|
933
|
+
|
934
|
+
<p class=MsoNoSpacing style='text-indent:1.0in;border:none;padding:0in'><span
|
935
|
+
style='font-size:10.0pt;background:aqua'>);</span></p>
|
936
|
+
|
937
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
938
|
+
10.0pt;background:aqua'> </span></p>
|
939
|
+
|
940
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
941
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
942
|
+
|
943
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><a
|
944
|
+
name="OmniDbj_Sel_EnableWebAnalyticsTesting"><strong><span style='font-size:
|
945
|
+
10.0pt;font-family:"Calibri","sans-serif";background:aqua'>Enable Web Analytics
|
946
|
+
Testing</span></strong></a></p>
|
947
|
+
|
948
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
949
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
950
|
+
|
951
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
952
|
+
10.0pt;background:aqua'>������� engine.enableWebAnalyticsTesting();</span></p>
|
953
|
+
|
954
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
955
|
+
10.0pt'> </span></p>
|
956
|
+
|
957
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
958
|
+
style='font-size:10.0pt;background:yellow'>/*</span></p>
|
959
|
+
|
960
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
961
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:yellow'>Existing
|
962
|
+
test / test framework code</span></strong></p>
|
963
|
+
|
964
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
965
|
+
style='font-size:10.0pt;background:yellow'>*/</span></p>
|
966
|
+
|
967
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
968
|
+
10.0pt'>������� session().open(SeleniumScriptRunnerHelper.BASE_URL +
|
969
|
+
"/upcoming");</span></p>
|
970
|
+
|
971
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
972
|
+
10.0pt'> </span></p>
|
973
|
+
|
974
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
975
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
976
|
+
|
977
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><a
|
978
|
+
name="OmniDbj_Sel_Verify"><strong><span style='font-size:10.0pt;font-family:
|
979
|
+
"Calibri","sans-serif";background:aqua'>Verify Web Analytics Reporting</span></strong></a></p>
|
980
|
+
|
981
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
982
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
983
|
+
|
984
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
985
|
+
10.0pt'>������� <span style='background:aqua'>Result verificationResult =
|
986
|
+
engine.verifyWebAnalyticsData (inputDataFileName, actionName, new
|
987
|
+
SeleniumScriptRunner(session()));</span></span></p>
|
988
|
+
|
989
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
990
|
+
10.0pt;background:aqua'> </span></p>
|
991
|
+
|
992
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
993
|
+
style='font-size:10.0pt;background:aqua'>/*</span></p>
|
994
|
+
|
995
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><a
|
996
|
+
name="OmniDbj_Sel_SampleValidations"><strong><span style='font-size:10.0pt;
|
997
|
+
font-family:"Calibri","sans-serif";background:aqua'>Sample validations</span></strong></a></p>
|
998
|
+
|
999
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
1000
|
+
style='font-size:10.0pt;background:aqua'>*/</span></p>
|
1001
|
+
|
1002
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1003
|
+
10.0pt;background:aqua'>�������
|
1004
|
+
assertNotNull(verificationResult.getVerificationStatus(), "Verification
|
1005
|
+
status should NOT be NULL");</span></p>
|
1006
|
+
|
1007
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1008
|
+
10.0pt;background:aqua'>�������
|
1009
|
+
assertNotNull(verificationResult.getListOfErrors(), "Failure details
|
1010
|
+
should NOT be NULL");</span></p>
|
1011
|
+
|
1012
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1013
|
+
10.0pt;background:aqua'>������� logVerificationErrors(verificationResult);</span></p>
|
1014
|
+
|
1015
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1016
|
+
10.0pt;background:aqua'>�������
|
1017
|
+
assertEquals(verificationResult.getVerificationStatus(), Status.PASS,
|
1018
|
+
"Verification status should be PASS");</span></p>
|
1019
|
+
|
1020
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1021
|
+
10.0pt;background:aqua'>�������
|
1022
|
+
assertEquals(verificationResult.getListOfErrors().size(), 0, "Failure
|
1023
|
+
details should be empty");</span></p>
|
1024
|
+
|
1025
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1026
|
+
10.0pt'>��� }</span></p>
|
1027
|
+
|
1028
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1029
|
+
10.0pt'>}</span></p>
|
1030
|
+
|
1031
|
+
<p class=MsoNormal style='line-height:normal;border:none;padding:0in'><span
|
1032
|
+
style='font-size:10.0pt'> </span></p>
|
1033
|
+
|
1034
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><strong><span
|
1035
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1036
|
+
|
1037
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><a
|
1038
|
+
name="OmniDbj_Sel_DisableWebAnalyticsTesting"><strong><span style='font-size:
|
1039
|
+
10.0pt;font-family:"Calibri","sans-serif";background:aqua'>Disable Web Analytics
|
1040
|
+
Testing</span></strong></a></p>
|
1041
|
+
|
1042
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><strong><span
|
1043
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1044
|
+
|
1045
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1046
|
+
style='font-size:10.0pt;background:aqua'>/* </span></p>
|
1047
|
+
|
1048
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1049
|
+
style='font-size:10.0pt;background:aqua'>*������� If using TestNG, override the
|
1050
|
+
@AfterMethod annotation</span></p>
|
1051
|
+
|
1052
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1053
|
+
style='font-size:10.0pt;background:aqua'>*������� If using JUnit, override the
|
1054
|
+
@After annotation</span></p>
|
1055
|
+
|
1056
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1057
|
+
style='font-size:10.0pt;background:aqua'>*������� and add the following line in
|
1058
|
+
it:</span></p>
|
1059
|
+
|
1060
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1061
|
+
style='font-size:10.0pt;background:aqua'>*����������������������� �������
|
1062
|
+
engine.disableWebAnalyticsTesting();</span></p>
|
1063
|
+
|
1064
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1065
|
+
style='font-size:10.0pt;background:aqua'>*������� See the example shown below</span></p>
|
1066
|
+
|
1067
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1068
|
+
style='font-size:10.0pt;background:aqua'>*/</span></p>
|
1069
|
+
|
1070
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><b><span
|
1071
|
+
style='font-size:10.0pt'>��� <span style='background:yellow'>@AfterMethod()</span></span></b></p>
|
1072
|
+
|
1073
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1074
|
+
10.0pt'>��� public void tearDown() throws Exception {</span></p>
|
1075
|
+
|
1076
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1077
|
+
10.0pt'>������� <span style='background:aqua'>engine.disableWebAnalyticsTesting();</span></span></p>
|
1078
|
+
|
1079
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1080
|
+
10.0pt'>������� seleniumScriptRunnerHelper.stopSeleniumDriver();</span></p>
|
1081
|
+
|
1082
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1083
|
+
10.0pt'>��� }</span></p>
|
1084
|
+
|
1085
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1086
|
+
10.0pt'>}</span></p>
|
1087
|
+
|
1088
|
+
</div>
|
1089
|
+
|
1090
|
+
<p class=MsoNormal style='line-height:normal'><b><span style='font-size:12.0pt;
|
1091
|
+
color:#365F91'> </span></b></p>
|
1092
|
+
|
1093
|
+
<span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif"'><br
|
1094
|
+
clear=all style='page-break-before:always'>
|
1095
|
+
</span>
|
1096
|
+
|
1097
|
+
<p class=MsoNormal><b><span style='font-size:12.0pt;line-height:115%;
|
1098
|
+
color:#4F81BD'> </span></b></p>
|
1099
|
+
|
1100
|
+
<h3><a name="_Toc284419657"><span style='color:#365F91'>6.1.7.2<span
|
1101
|
+
style='font:7.0pt "Times New Roman"'>
|
1102
|
+
</span></span>WebDriver-based test changes</a></h3>
|
1103
|
+
|
1104
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
1105
|
+
style='font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
1106
|
+
</span></span><a href="#OmniDbg_WebDriver_ImportPackages"><span
|
1107
|
+
style='font-size:12.0pt'>Import relevant packages</span></a></p>
|
1108
|
+
|
1109
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
1110
|
+
style='font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
1111
|
+
</span></span><a href="#OmniDbg_WebDriver_DefineVariables"><span
|
1112
|
+
style='font-size:12.0pt'>Define & provide parameter values</span></a></p>
|
1113
|
+
|
1114
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
1115
|
+
style='font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
1116
|
+
</span></span><a href="#OmniDbg_WebDriver_InitializeEngine"><span
|
1117
|
+
style='font-size:12.0pt'>Initialize Engine</span></a></p>
|
1118
|
+
|
1119
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
1120
|
+
style='font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
1121
|
+
</span></span><a href="#OmniDbg_WebDriver_EnableWebAnalyticsTest"><span
|
1122
|
+
style='font-size:12.0pt'>Enable Web Analytics Testing</span></a></p>
|
1123
|
+
|
1124
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
1125
|
+
style='font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
1126
|
+
</span></span><a href="#OmniDbg_WebDriver_Verify"><span style='font-size:12.0pt'>Verify
|
1127
|
+
Web Analytics reporting using WAAT</span></a></p>
|
1128
|
+
|
1129
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
1130
|
+
style='font-family:Symbol'>�<span style='font:7.0pt "Times New Roman"'>
|
1131
|
+
</span></span><a href="#OmniDbj_WebDriver_SampleValidations"><span
|
1132
|
+
style='font-size:12.0pt'>Sample Validations</span></a></p>
|
1133
|
+
|
1134
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'><span
|
1135
|
+
class=MsoHyperlink><span style='font-family:Symbol;color:windowtext;text-decoration:
|
1136
|
+
none'>�<span style='font:7.0pt "Times New Roman"'>
|
1137
|
+
</span></span></span><a href="#OmniDbg_WebDriver_DisableWebAnalyticTest"><span
|
1138
|
+
style='font-size:12.0pt'>Disable Web Analytics reporting</span></a></p>
|
1139
|
+
|
1140
|
+
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.5in'> </p>
|
1141
|
+
|
1142
|
+
<div style='border:solid windowtext 1.0pt;padding:1.0pt 1.0pt 1.0pt 1.0pt'>
|
1143
|
+
|
1144
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1145
|
+
10.0pt'>package com.thoughtworks.webanalyticsautomation;</span></p>
|
1146
|
+
|
1147
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><strong><span
|
1148
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif"'> </span></strong></p>
|
1149
|
+
|
1150
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1151
|
+
10.0pt;background:yellow'>/**</span></p>
|
1152
|
+
|
1153
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1154
|
+
10.0pt;background:yellow'>�* Created by: Anand Bagmar</span></p>
|
1155
|
+
|
1156
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1157
|
+
10.0pt;background:yellow'>�* Email: abagmar@gmail.com</span></p>
|
1158
|
+
|
1159
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1160
|
+
10.0pt;background:yellow'>�* Date: Jan 4, 2011</span></p>
|
1161
|
+
|
1162
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1163
|
+
10.0pt;background:yellow'>�* Time: 10:36:28 AM</span></p>
|
1164
|
+
|
1165
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1166
|
+
10.0pt;background:yellow'>�* </span></p>
|
1167
|
+
|
1168
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1169
|
+
10.0pt;background:yellow'>�* Copyright 2010 Anand Bagmar (abagmar@gmail.com).�
|
1170
|
+
Distributed under the Apache 2.0 License </span></p>
|
1171
|
+
|
1172
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1173
|
+
10.0pt;background:yellow'>**/</span></p>
|
1174
|
+
|
1175
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1176
|
+
10.0pt'> </span></p>
|
1177
|
+
|
1178
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><strong><span
|
1179
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1180
|
+
|
1181
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><a
|
1182
|
+
name="OmniDbg_WebDriver_ImportPackages"><strong><span style='font-size:10.0pt;
|
1183
|
+
font-family:"Calibri","sans-serif";background:aqua'>Import packages</span></strong></a></p>
|
1184
|
+
|
1185
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><strong><span
|
1186
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1187
|
+
|
1188
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1189
|
+
10.0pt;background:aqua'>import
|
1190
|
+
com.thoughtworks.webanalyticsautomation.scriptrunner.WebDriverScriptRunner;</span></p>
|
1191
|
+
|
1192
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1193
|
+
10.0pt;background:aqua'>import com.thoughtworks.webanalyticsautomation.common.BROWSER;</span></p>
|
1194
|
+
|
1195
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1196
|
+
10.0pt;background:aqua'>import
|
1197
|
+
com.thoughtworks.webanalyticsautomation.inputdata.InputFileType;</span></p>
|
1198
|
+
|
1199
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1200
|
+
10.0pt;background:aqua'>import
|
1201
|
+
com.thoughtworks.webanalyticsautomation.plugins.WebAnalyticTool;</span></p>
|
1202
|
+
|
1203
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1204
|
+
10.0pt;background:aqua'>import static
|
1205
|
+
com.thoughtworks.webanalyticsautomation.Controller.getInstance;</span></p>
|
1206
|
+
|
1207
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1208
|
+
10.0pt;background:aqua'>import static com.thoughtworks.webanalyticsautomation.common.Utils.currentDirectory;</span></p>
|
1209
|
+
|
1210
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1211
|
+
10.0pt;background:aqua'>import static
|
1212
|
+
com.thoughtworks.webanalyticsautomation.common.Utils.fileSeparator;</span></p>
|
1213
|
+
|
1214
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1215
|
+
10.0pt'> </span></p>
|
1216
|
+
|
1217
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1218
|
+
10.0pt'>import
|
1219
|
+
com.thoughtworks.webanalyticsautomation.scriptrunner.helper.WebDriverScriptRunnerHelper;</span></p>
|
1220
|
+
|
1221
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1222
|
+
10.0pt'>import org.openqa.selenium.WebDriver;</span></p>
|
1223
|
+
|
1224
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1225
|
+
10.0pt'> </span></p>
|
1226
|
+
|
1227
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1228
|
+
10.0pt'>import org.testng.annotations.AfterMethod;</span></p>
|
1229
|
+
|
1230
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1231
|
+
10.0pt'>import org.testng.annotations.BeforeMethod;</span></p>
|
1232
|
+
|
1233
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1234
|
+
10.0pt'>import org.testng.annotations.Test;</span></p>
|
1235
|
+
|
1236
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1237
|
+
10.0pt'>import static org.testng.Assert.assertEquals;</span></p>
|
1238
|
+
|
1239
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1240
|
+
10.0pt'>import static org.testng.Assert.assertNotNull;</span></p>
|
1241
|
+
|
1242
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1243
|
+
10.0pt'> </span></p>
|
1244
|
+
|
1245
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1246
|
+
10.0pt'>public class OmnitureDebuggerWithWebDriverTest {</span></p>
|
1247
|
+
|
1248
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1249
|
+
10.0pt'>��� private WebDriverScriptRunnerHelper webDriverScriptRunnerHelper;</span></p>
|
1250
|
+
|
1251
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1252
|
+
10.0pt'>��� private WebDriver driverInstance;</span></p>
|
1253
|
+
|
1254
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1255
|
+
10.0pt'> </span></p>
|
1256
|
+
|
1257
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><strong><span
|
1258
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1259
|
+
|
1260
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><a
|
1261
|
+
name="OmniDbg_WebDriver_DefineVariables"><strong><span style='font-size:10.0pt;
|
1262
|
+
font-family:"Calibri","sans-serif";background:aqua'>Define & provide
|
1263
|
+
parameter values</span></strong></a></p>
|
1264
|
+
|
1265
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><strong><span
|
1266
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1267
|
+
|
1268
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1269
|
+
10.0pt'>��� <span style='background:aqua'>private Engine engine;</span></span></p>
|
1270
|
+
|
1271
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1272
|
+
10.0pt'>��� <span style='background:aqua'>private WebAnalyticTool webAnalyticTool
|
1273
|
+
= WebAnalyticTool.OMNITURE_DEBUGGER;</span></span></p>
|
1274
|
+
|
1275
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1276
|
+
10.0pt;background:aqua'>��� private InputFileType inputFileType =
|
1277
|
+
InputFileType.XML;</span></p>
|
1278
|
+
|
1279
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1280
|
+
10.0pt;background:aqua'>��� private boolean keepLoadedFileInMemory = true;</span></p>
|
1281
|
+
|
1282
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1283
|
+
10.0pt'>��� <span style='background:aqua'>private String
|
1284
|
+
log4jPropertiesAbsoluteFilePath = currentDirectory() + fileSeparator() +
|
1285
|
+
"resources"� + fileSeparator() + "log4j.properties";</span></span></p>
|
1286
|
+
|
1287
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1288
|
+
10.0pt;background:aqua'>��� private String inputDataFileName =
|
1289
|
+
currentDirectory() + fileSeparator() + "test"� + fileSeparator() +
|
1290
|
+
"sampledata"� + fileSeparator() + "TestData.xml";</span></p>
|
1291
|
+
|
1292
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1293
|
+
10.0pt'>��� <span style='background:aqua'>private String actionName = "OpenUpcomingPage_OmnitureDebugger_WebDriver";</span></span></p>
|
1294
|
+
|
1295
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1296
|
+
10.0pt'> </span></p>
|
1297
|
+
|
1298
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1299
|
+
10.0pt'>��� @Test</span></p>
|
1300
|
+
|
1301
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1302
|
+
10.0pt'>��� public void
|
1303
|
+
captureAndVerifyDataReportedToWebAnalytics_WebDriver_IE() throws Exception {</span></p>
|
1304
|
+
|
1305
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1306
|
+
10.0pt;background:aqua'> </span></p>
|
1307
|
+
|
1308
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
1309
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1310
|
+
|
1311
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><a
|
1312
|
+
name="OmniDbg_WebDriver_InitializeEngine"><strong><span style='font-size:10.0pt;
|
1313
|
+
font-family:"Calibri","sans-serif";background:aqua'>Initialize Engine</span></strong></a></p>
|
1314
|
+
|
1315
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
1316
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1317
|
+
|
1318
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1319
|
+
10.0pt;background:aqua'>������� engine = Controller.getInstance (</span></p>
|
1320
|
+
|
1321
|
+
<p class=MsoNoSpacing style='text-indent:1.0in;border:none;padding:0in'><span
|
1322
|
+
style='font-size:10.0pt;background:aqua'>webAnalyticTool, </span></p>
|
1323
|
+
|
1324
|
+
<p class=MsoNoSpacing style='text-indent:1.0in;border:none;padding:0in'><span
|
1325
|
+
style='font-size:10.0pt;background:aqua'>inputFileType, </span></p>
|
1326
|
+
|
1327
|
+
<p class=MsoNoSpacing style='text-indent:1.0in;border:none;padding:0in'><span
|
1328
|
+
style='font-size:10.0pt;background:aqua'>keepLoadedFileInMemory, </span></p>
|
1329
|
+
|
1330
|
+
<p class=MsoNoSpacing style='text-indent:1.0in;border:none;padding:0in'><span
|
1331
|
+
style='font-size:10.0pt;background:aqua'>log4jPropertiesAbsoluteFilePath</span></p>
|
1332
|
+
|
1333
|
+
<p class=MsoNoSpacing style='text-indent:1.0in;border:none;padding:0in'><span
|
1334
|
+
style='font-size:10.0pt;background:aqua'>);</span></p>
|
1335
|
+
|
1336
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1337
|
+
10.0pt;background:aqua'> </span></p>
|
1338
|
+
|
1339
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
1340
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1341
|
+
|
1342
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><a
|
1343
|
+
name="OmniDbg_WebDriver_EnableWebAnalyticsTest"><strong><span style='font-size:
|
1344
|
+
10.0pt;font-family:"Calibri","sans-serif";background:aqua'>Enable Web Analytics
|
1345
|
+
Testing</span></strong></a></p>
|
1346
|
+
|
1347
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
1348
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1349
|
+
|
1350
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1351
|
+
10.0pt;background:aqua'>������� engine.enableWebAnalyticsTesting();</span></p>
|
1352
|
+
|
1353
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1354
|
+
10.0pt'> </span></p>
|
1355
|
+
|
1356
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
1357
|
+
style='font-size:10.0pt;background:yellow'>/*</span></p>
|
1358
|
+
|
1359
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
1360
|
+
style='font-size:10.0pt;background:yellow'>*��� Existing test / test framework
|
1361
|
+
code</span></p>
|
1362
|
+
|
1363
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
1364
|
+
style='font-size:10.0pt;background:yellow'>*/</span></p>
|
1365
|
+
|
1366
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1367
|
+
10.0pt'>������� driverInstance.get(WebDriverScriptRunnerHelper.BASE_URL +
|
1368
|
+
"/upcoming");</span></p>
|
1369
|
+
|
1370
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1371
|
+
10.0pt'> </span></p>
|
1372
|
+
|
1373
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
1374
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1375
|
+
|
1376
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><a
|
1377
|
+
name="OmniDbg_WebDriver_Verify"><strong><span style='font-size:10.0pt;
|
1378
|
+
font-family:"Calibri","sans-serif";background:aqua'>Verify Web Analytics
|
1379
|
+
Reporting using WAAT</span></strong></a></p>
|
1380
|
+
|
1381
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
1382
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1383
|
+
|
1384
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1385
|
+
10.0pt'>������� <span style='background:aqua'>Result verificationResult =
|
1386
|
+
engine.verifyWebAnalyticsData (inputDataFileName, actionName, new WebDriverScriptRunner(driverInstance));</span></span></p>
|
1387
|
+
|
1388
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1389
|
+
10.0pt;background:aqua'> </span></p>
|
1390
|
+
|
1391
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
1392
|
+
style='font-size:10.0pt;background:aqua'>/*</span></p>
|
1393
|
+
|
1394
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><a
|
1395
|
+
name="OmniDbj_WebDriver_SampleValidations"><strong><span style='font-size:10.0pt;
|
1396
|
+
font-family:"Calibri","sans-serif";background:aqua'>Sample validations</span></strong></a></p>
|
1397
|
+
|
1398
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
1399
|
+
style='font-size:10.0pt;background:aqua'>*/</span></p>
|
1400
|
+
|
1401
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1402
|
+
10.0pt;background:aqua'>�������
|
1403
|
+
assertNotNull(verificationResult.getVerificationStatus(), "Verification
|
1404
|
+
status should NOT be NULL");</span></p>
|
1405
|
+
|
1406
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1407
|
+
10.0pt;background:aqua'>�������
|
1408
|
+
assertNotNull(verificationResult.getListOfErrors(), "Failure details should
|
1409
|
+
NOT be NULL");</span></p>
|
1410
|
+
|
1411
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1412
|
+
10.0pt;background:aqua'>������� logVerificationErrors(verificationResult);</span></p>
|
1413
|
+
|
1414
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1415
|
+
10.0pt;background:aqua'>�������
|
1416
|
+
assertEquals(verificationResult.getVerificationStatus(), Status.PASS,
|
1417
|
+
"Verification status should be PASS");</span></p>
|
1418
|
+
|
1419
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1420
|
+
10.0pt;background:aqua'>�������
|
1421
|
+
assertEquals(verificationResult.getListOfErrors().size(), 0, "Failure
|
1422
|
+
details should be empty");</span></p>
|
1423
|
+
|
1424
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1425
|
+
10.0pt'>��� }</span></p>
|
1426
|
+
|
1427
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><strong><span
|
1428
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif"'> </span></strong></p>
|
1429
|
+
|
1430
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><strong><span
|
1431
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1432
|
+
|
1433
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><a
|
1434
|
+
name="OmniDbg_WebDriver_DisableWebAnalyticTest"><strong><span style='font-size:
|
1435
|
+
10.0pt;font-family:"Calibri","sans-serif";background:aqua'>Disable Web
|
1436
|
+
Analytics Testing</span></strong></a></p>
|
1437
|
+
|
1438
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><strong><span
|
1439
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1440
|
+
|
1441
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><span
|
1442
|
+
style='font-size:10.0pt;background:aqua'>/* </span></p>
|
1443
|
+
|
1444
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><span
|
1445
|
+
style='font-size:10.0pt;background:aqua'>*��������� If using TestNG, override
|
1446
|
+
the @AfterMethod annotation</span></p>
|
1447
|
+
|
1448
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><span
|
1449
|
+
style='font-size:10.0pt;background:aqua'>*��������� If using JUnit, override
|
1450
|
+
the @After annotation</span></p>
|
1451
|
+
|
1452
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><span
|
1453
|
+
style='font-size:10.0pt;background:aqua'>*��������� and add the following line
|
1454
|
+
in it:</span></p>
|
1455
|
+
|
1456
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><span
|
1457
|
+
style='font-size:10.0pt;background:aqua'>*������������������������� �������
|
1458
|
+
engine.disableWebAnalyticsTesting();</span></p>
|
1459
|
+
|
1460
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><span
|
1461
|
+
style='font-size:10.0pt;background:aqua'>*��������� See the example shown below</span></p>
|
1462
|
+
|
1463
|
+
<p class=MsoNoSpacing style='text-indent:9.0pt;border:none;padding:0in'><span
|
1464
|
+
style='font-size:10.0pt;background:aqua'>*/</span></p>
|
1465
|
+
|
1466
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1467
|
+
10.0pt'>��� <span style='background:yellow'>@AfterMethod()</span></span></p>
|
1468
|
+
|
1469
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1470
|
+
10.0pt'>��� public void tearDown() throws Exception {</span></p>
|
1471
|
+
|
1472
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1473
|
+
10.0pt'>������� <span style='background:aqua'>engine.disableWebAnalyticsTesting();</span></span></p>
|
1474
|
+
|
1475
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1476
|
+
10.0pt'>������� webDriverScriptRunnerHelper.stopDriver();</span></p>
|
1477
|
+
|
1478
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1479
|
+
10.0pt'>��� }</span></p>
|
1480
|
+
|
1481
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1482
|
+
10.0pt'>}</span></p>
|
1483
|
+
|
1484
|
+
</div>
|
1485
|
+
|
1486
|
+
<span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif"'><br
|
1487
|
+
clear=all style='page-break-before:always'>
|
1488
|
+
</span>
|
1489
|
+
|
1490
|
+
<p class=MsoNormal><b><span style='font-size:14.0pt;line-height:115%;
|
1491
|
+
font-family:"Cambria","serif";color:#365F91'> </span></b></p>
|
1492
|
+
|
1493
|
+
<h1 style='margin-left:.5in;text-indent:-.5in'><a name="_Toc284419658">6.2<span
|
1494
|
+
style='font:7.0pt "Times New Roman"'>
|
1495
|
+
</span>WAAT using HttpSniffer</a></h1>
|
1496
|
+
|
1497
|
+
<h2><a name="_Toc284419659"><span style='font-size:11.0pt;line-height:115%;
|
1498
|
+
color:#365F91'>6.2.1<span style='font:7.0pt "Times New Roman"'>
|
1499
|
+
</span></span>Approach</a></h2>
|
1500
|
+
|
1501
|
+
<p class=MsoNormal style='line-height:normal'><span style='font-size:12.0pt'>This
|
1502
|
+
is a generic approach to Web Analytics Test Automation. Regardless of the
|
1503
|
+
end-product doing Web Analytics reporting and analysis (example: Omniture,
|
1504
|
+
Google Analytics, etc.), you can use this approach to test, in an automated way,
|
1505
|
+
if correct name/value properties are being reported by the product / system
|
1506
|
+
under test.</span></p>
|
1507
|
+
|
1508
|
+
<p class=MsoNormal style='line-height:normal'><span style='font-size:12.0pt'>This
|
1509
|
+
approach captures TCP packets on the network layer, from all the network
|
1510
|
+
devices available. Based on the criteria specified in your tests, only those
|
1511
|
+
relevant packets are filtered out, and used for analysis and verifications.</span></p>
|
1512
|
+
|
1513
|
+
<h2><a name="_Toc284419660"><span style='font-size:11.0pt;line-height:115%;
|
1514
|
+
color:#365F91'>6.2.2<span style='font:7.0pt "Times New Roman"'>
|
1515
|
+
</span></span>Setup 3<sup>rd</sup>-party libraries</a></h2>
|
1516
|
+
|
1517
|
+
<p class=MsoNormal style='margin-left:.5in'>In order to enable packet
|
1518
|
+
capturing, the WAAT framework needs helps of some 3-rd party open-source
|
1519
|
+
libraries. These libraries are available for various different operating
|
1520
|
+
systems in the download section of the WAAT project.</p>
|
1521
|
+
|
1522
|
+
<p class=MsoNormal style='margin-left:.5in'>Refer to the <a href="#_Jpcap_setup">Jpcap
|
1523
|
+
Setup</a> section for platform specific install instructions.</p>
|
1524
|
+
|
1525
|
+
<h2><a name="_Toc284419661"><span style='font-size:11.0pt;line-height:115%;
|
1526
|
+
color:#365F91'>6.2.3<span style='font:7.0pt "Times New Roman"'>
|
1527
|
+
</span></span>Define Test data</a></h2>
|
1528
|
+
|
1529
|
+
<p class=MsoNormal>Provide the test data to be validated for each action in an
|
1530
|
+
xml file. Sample XML file is provided <a href="../sampledata/TestData.xml">here</a>.</p>
|
1531
|
+
|
1532
|
+
<h2><a name="_Toc284419662"><span style='font-size:11.0pt;line-height:115%;
|
1533
|
+
color:#365F91'>6.2.4<span style='font:7.0pt "Times New Roman"'>
|
1534
|
+
</span></span>Test code changes</a></h2>
|
1535
|
+
|
1536
|
+
<p class=MsoNormal style='text-indent:.5in'>You will need to make the following
|
1537
|
+
changes in your existing / new tests.</p>
|
1538
|
+
|
1539
|
+
<p class=MsoNoSpacing style='margin-left:.75in;text-indent:-.75in'><b><span
|
1540
|
+
style='font-size:12.0pt;color:#365F91'>6.2.4.1<span style='font:7.0pt "Times New Roman"'>
|
1541
|
+
</span></span></b><a href="#HttpSniffer_ImportPackages"><span style='font-size:
|
1542
|
+
12.0pt'>Import relevant packages</span></a></p>
|
1543
|
+
|
1544
|
+
<p class=MsoNoSpacing style='margin-left:.75in;text-indent:-.75in'><b><span
|
1545
|
+
style='font-size:12.0pt;color:#365F91'>6.2.4.2<span style='font:7.0pt "Times New Roman"'>
|
1546
|
+
</span></span></b><a href="#HttpSniffer_DefineVariables"><span
|
1547
|
+
style='font-size:12.0pt'>Define & provide parameter values</span></a></p>
|
1548
|
+
|
1549
|
+
<p class=MsoNoSpacing style='margin-left:.75in;text-indent:-.75in'><b><span
|
1550
|
+
style='font-size:12.0pt;color:#365F91'>6.2.4.3<span style='font:7.0pt "Times New Roman"'>
|
1551
|
+
</span></span></b><a href="#HttpSniffer_InitializeEngine"><span
|
1552
|
+
style='font-size:12.0pt'>Initialize Engine</span></a></p>
|
1553
|
+
|
1554
|
+
<p class=MsoNoSpacing style='margin-left:.75in;text-indent:-.75in'><b><span
|
1555
|
+
style='font-size:12.0pt;color:#365F91'>6.2.4.4<span style='font:7.0pt "Times New Roman"'>
|
1556
|
+
</span></span></b><a href="#HttpSniffer_EnableWebAnalyticsTest"><span
|
1557
|
+
style='font-size:12.0pt'>Enable Web Analytics Testing</span></a></p>
|
1558
|
+
|
1559
|
+
<p class=MsoNoSpacing style='margin-left:.75in;text-indent:-.75in'><b><span
|
1560
|
+
style='font-size:12.0pt;color:#365F91'>6.2.4.5<span style='font:7.0pt "Times New Roman"'>
|
1561
|
+
</span></span></b><a href="#HttpSniffer_Verify"><span style='font-size:12.0pt'>Verify
|
1562
|
+
Web Analytics reporting using WAAT</span></a></p>
|
1563
|
+
|
1564
|
+
<p class=MsoNoSpacing style='margin-left:.75in;text-indent:-.75in'><span
|
1565
|
+
class=MsoHyperlink><b><span style='font-size:12.0pt;color:#365F91;text-decoration:
|
1566
|
+
none'>6.2.4.6<span style='font:7.0pt "Times New Roman"'>
|
1567
|
+
</span></span></b></span><span style='font-size:12.0pt'><a
|
1568
|
+
href="#HttpSniffer_SampleValidations">Sample validations</a></span></p>
|
1569
|
+
|
1570
|
+
<p class=MsoNoSpacing style='margin-left:.75in;text-indent:-.75in'><span
|
1571
|
+
class=MsoHyperlink><b><span style='font-size:12.0pt;color:#365F91;text-decoration:
|
1572
|
+
none'>6.2.4.7<span style='font:7.0pt "Times New Roman"'>
|
1573
|
+
</span></span></b></span><a href="#HttpSniffer_DisableWebAnalyticTest"><span
|
1574
|
+
style='font-size:12.0pt'>Disable Web Analytics reporting</span></a></p>
|
1575
|
+
|
1576
|
+
<p class=MsoNoSpacing style='margin-left:.75in'> </p>
|
1577
|
+
|
1578
|
+
<div style='border:solid windowtext 1.0pt;padding:1.0pt 1.0pt 1.0pt 1.0pt'>
|
1579
|
+
|
1580
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1581
|
+
10.0pt'>package com.thoughtworks.webanalyticsautomation;</span></p>
|
1582
|
+
|
1583
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><strong><span
|
1584
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'> </span></strong></p>
|
1585
|
+
|
1586
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1587
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:yellow'>/**</span></p>
|
1588
|
+
|
1589
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1590
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:yellow'>�*
|
1591
|
+
Created by: Anand Bagmar</span></p>
|
1592
|
+
|
1593
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1594
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:yellow'>�*
|
1595
|
+
Email: abagmar@gmail.com</span></p>
|
1596
|
+
|
1597
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1598
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:yellow'>�*
|
1599
|
+
Date: Jan 31, 2011</span></p>
|
1600
|
+
|
1601
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1602
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:yellow'>�*
|
1603
|
+
Time: 12:14:04 PM</span></p>
|
1604
|
+
|
1605
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1606
|
+
10.0pt;background:yellow'>�* </span></p>
|
1607
|
+
|
1608
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1609
|
+
10.0pt;background:yellow'>�* Copyright 2010 Anand Bagmar (abagmar@gmail.com).�
|
1610
|
+
Distributed under the Apache 2.0 License </span></p>
|
1611
|
+
|
1612
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1613
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:yellow'>**/</span></p>
|
1614
|
+
|
1615
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><strong><span
|
1616
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'> </span></strong></p>
|
1617
|
+
|
1618
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><strong><span
|
1619
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1620
|
+
|
1621
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><a
|
1622
|
+
name="HttpSniffer_ImportPackages"><strong><span style='font-size:10.0pt;
|
1623
|
+
font-family:"Calibri","sans-serif";background:aqua'>Import packages</span></strong></a></p>
|
1624
|
+
|
1625
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><strong><span
|
1626
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1627
|
+
|
1628
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1629
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>import
|
1630
|
+
com.thoughtworks.webanalyticsautomation.common.BROWSER;</span></p>
|
1631
|
+
|
1632
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1633
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>import
|
1634
|
+
com.thoughtworks.webanalyticsautomation.plugins.WebAnalyticTool;</span></p>
|
1635
|
+
|
1636
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1637
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>import
|
1638
|
+
static com.thoughtworks.webanalyticsautomation.Controller.getInstance;</span></p>
|
1639
|
+
|
1640
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1641
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>import
|
1642
|
+
static com.thoughtworks.webanalyticsautomation.common.Utils.currentDirectory;</span></p>
|
1643
|
+
|
1644
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1645
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>import
|
1646
|
+
static com.thoughtworks.webanalyticsautomation.common.Utils.fileSeparator;</span></p>
|
1647
|
+
|
1648
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1649
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'> </span></p>
|
1650
|
+
|
1651
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1652
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>import com.thoughtworks.selenium.Selenium;</span></p>
|
1653
|
+
|
1654
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1655
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>import
|
1656
|
+
org.testng.annotations.AfterMethod;</span></p>
|
1657
|
+
|
1658
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1659
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>import
|
1660
|
+
org.testng.annotations.BeforeMethod;</span></p>
|
1661
|
+
|
1662
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1663
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>import
|
1664
|
+
org.testng.annotations.Test;</span></p>
|
1665
|
+
|
1666
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1667
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>import static
|
1668
|
+
org.testng.Assert.assertEquals;</span></p>
|
1669
|
+
|
1670
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1671
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>import static
|
1672
|
+
org.testng.Assert.assertNotNull;</span></p>
|
1673
|
+
|
1674
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1675
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'> </span></p>
|
1676
|
+
|
1677
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1678
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>public class HttpSnifferTest
|
1679
|
+
{</span></p>
|
1680
|
+
|
1681
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1682
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>��� private
|
1683
|
+
Selenium selenium;</span></p>
|
1684
|
+
|
1685
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><strong><span
|
1686
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1687
|
+
|
1688
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><a
|
1689
|
+
name="HttpSniffer_DefineVariables"><strong><span style='font-size:10.0pt;
|
1690
|
+
font-family:"Calibri","sans-serif";background:aqua'>Define & provide
|
1691
|
+
parameter values</span></strong></a></p>
|
1692
|
+
|
1693
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><strong><span
|
1694
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1695
|
+
|
1696
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1697
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>��� <span
|
1698
|
+
style='background:aqua'>private Engine engine;</span></span></p>
|
1699
|
+
|
1700
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1701
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>�������
|
1702
|
+
private String baseURL = "http://essenceoftesting.blogspot.com";</span></p>
|
1703
|
+
|
1704
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1705
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>�������
|
1706
|
+
private String navigateToURL = baseURL +
|
1707
|
+
"/2010/12/waat-web-analytics-automation-testing.html";</span></p>
|
1708
|
+
|
1709
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1710
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>�������
|
1711
|
+
private String[] urlPatterns = new String[] {"GET
|
1712
|
+
/ps/ifr?container=friendconnect&mid=0"};</span></p>
|
1713
|
+
|
1714
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1715
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>�������
|
1716
|
+
private int minimumNumberOfPackets = 1;</span></p>
|
1717
|
+
|
1718
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1719
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'> </span></p>
|
1720
|
+
|
1721
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1722
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>���
|
1723
|
+
����private String actionName = "</span><span style='background:aqua'> </span><span
|
1724
|
+
style='font-size:10.0pt;background:aqua'>OpenWAATArticleOnBlog_HttpSniffer";</span></p>
|
1725
|
+
|
1726
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1727
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>�������
|
1728
|
+
private WebAnalyticTool webAnalyticTool = WebAnalyticTool.HTTP_SNIFFER;</span></p>
|
1729
|
+
|
1730
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1731
|
+
10.0pt;background:aqua'>��� ����private IputFileType inputFileType =
|
1732
|
+
InputFileType.XML;</span></p>
|
1733
|
+
|
1734
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1735
|
+
10.0pt;background:aqua'>��� ����private boolean keepLoadedFileInMemory = true;</span></p>
|
1736
|
+
|
1737
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1738
|
+
10.0pt'>��� ����<span style='background:aqua'>private String
|
1739
|
+
log4jPropertiesAbsoluteFilePath = currentDirectory() + fileSeparator() +
|
1740
|
+
"resources"� + fileSeparator() + "log4j.properties";</span></span></p>
|
1741
|
+
|
1742
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><span style='font-size:
|
1743
|
+
10.0pt;background:aqua'>��� ����private String inputDataFileName =
|
1744
|
+
currentDirectory() + fileSeparator() + "test"� + fileSeparator() +
|
1745
|
+
"sampledata"� + fileSeparator() + "TestData.xml";</span></p>
|
1746
|
+
|
1747
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1748
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'> </span></p>
|
1749
|
+
|
1750
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1751
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>��� @Test</span></p>
|
1752
|
+
|
1753
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1754
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>��� public void
|
1755
|
+
captureAndVerifyDataReportedToWebAnalytics_HTTPSniffer_GoogleAnalytics_Selenium_IE()
|
1756
|
+
throws Exception {</span></p>
|
1757
|
+
|
1758
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1759
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'> </span></p>
|
1760
|
+
|
1761
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
1762
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1763
|
+
|
1764
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><a
|
1765
|
+
name="HttpSniffer_InitializeEngine"><strong><span style='font-size:10.0pt;
|
1766
|
+
font-family:"Calibri","sans-serif";background:aqua'>Initialize Engine</span></strong></a></p>
|
1767
|
+
|
1768
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
1769
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1770
|
+
|
1771
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1772
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>������� <span
|
1773
|
+
style='background:aqua'>engine = getInstance(webAnalyticTool, inputFileType,
|
1774
|
+
keepLoadedFileInMemory, log4jPropertiesAbsoluteFilePath);</span></span></p>
|
1775
|
+
|
1776
|
+
<p class=MsoNoSpacing style='border:none;padding:0in'><strong><span
|
1777
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif"'> </span></strong></p>
|
1778
|
+
|
1779
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
1780
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1781
|
+
|
1782
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><a
|
1783
|
+
name="HttpSniffer_EnableWebAnalyticsTest"><strong><span style='font-size:10.0pt;
|
1784
|
+
font-family:"Calibri","sans-serif";background:aqua'>Enable Web Analytics
|
1785
|
+
Testing</span></strong></a></p>
|
1786
|
+
|
1787
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
1788
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1789
|
+
|
1790
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1791
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>������� <span
|
1792
|
+
style='background:aqua'>engine.enableWebAnalyticsTesting();</span></span></p>
|
1793
|
+
|
1794
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1795
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'> </span></p>
|
1796
|
+
|
1797
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
1798
|
+
style='font-size:10.0pt;background:yellow'>/*</span></p>
|
1799
|
+
|
1800
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
1801
|
+
style='font-size:10.0pt;background:yellow'>*��� Existing test / test framework
|
1802
|
+
code</span></p>
|
1803
|
+
|
1804
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
1805
|
+
style='font-size:10.0pt;background:yellow'>*/</span></p>
|
1806
|
+
|
1807
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1808
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>�������
|
1809
|
+
selenium.open(navigateToURL);</span></p>
|
1810
|
+
|
1811
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1812
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'> </span></p>
|
1813
|
+
|
1814
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
1815
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1816
|
+
|
1817
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><a
|
1818
|
+
name="HttpSniffer_Verify"><strong><span style='font-size:10.0pt;font-family:
|
1819
|
+
"Calibri","sans-serif";background:aqua'>Verify Web Analytics Reporting using
|
1820
|
+
WAAT</span></strong></a></p>
|
1821
|
+
|
1822
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><strong><span
|
1823
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1824
|
+
|
1825
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1826
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>������� <span
|
1827
|
+
style='background:aqua'>Result verificationResult =
|
1828
|
+
engine.verifyWebAnalyticsData (inputDataFileName, actionName, urlPatterns,
|
1829
|
+
minimumNumberOfPackets);</span></span></p>
|
1830
|
+
|
1831
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1832
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'> </span></p>
|
1833
|
+
|
1834
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
1835
|
+
style='font-size:10.0pt;background:aqua'>/*</span></p>
|
1836
|
+
|
1837
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><a
|
1838
|
+
name="HttpSniffer_SampleValidations"><strong><span style='font-size:10.0pt;
|
1839
|
+
font-family:"Calibri","sans-serif";background:aqua'>Sample validations</span></strong></a></p>
|
1840
|
+
|
1841
|
+
<p class=MsoNoSpacing style='text-indent:22.5pt;border:none;padding:0in'><span
|
1842
|
+
style='font-size:10.0pt;background:aqua'>*/</span></p>
|
1843
|
+
|
1844
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1845
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>�������
|
1846
|
+
assertNotNull(verificationResult.getVerificationStatus(), "Verification
|
1847
|
+
status should NOT be NULL");</span></p>
|
1848
|
+
|
1849
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1850
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>�������
|
1851
|
+
assertNotNull(verificationResult.getListOfErrors(), "Failure details
|
1852
|
+
should NOT be NULL");</span></p>
|
1853
|
+
|
1854
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1855
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>�������
|
1856
|
+
logVerificationErrors(verificationResult);</span></p>
|
1857
|
+
|
1858
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1859
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>�������
|
1860
|
+
assertEquals(verificationResult.getVerificationStatus(), Status.PASS,
|
1861
|
+
"Verification status should be PASS");</span></p>
|
1862
|
+
|
1863
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1864
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt;background:aqua'>�������
|
1865
|
+
assertEquals(verificationResult.getListOfErrors().size(), 0, "Failure
|
1866
|
+
details should be empty");</span></p>
|
1867
|
+
|
1868
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1869
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>��� }</span></p>
|
1870
|
+
|
1871
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1872
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'> </span></p>
|
1873
|
+
|
1874
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><strong><span
|
1875
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>/*</span></strong></p>
|
1876
|
+
|
1877
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><a
|
1878
|
+
name="HttpSniffer_DisableWebAnalyticTest"><strong><span style='font-size:10.0pt;
|
1879
|
+
font-family:"Calibri","sans-serif";background:aqua'>Disable Web Analytics
|
1880
|
+
Testing</span></strong></a></p>
|
1881
|
+
|
1882
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><strong><span
|
1883
|
+
style='font-size:10.0pt;font-family:"Calibri","sans-serif";background:aqua'>*/</span></strong></p>
|
1884
|
+
|
1885
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1886
|
+
style='font-size:10.0pt;background:aqua'>/* </span></p>
|
1887
|
+
|
1888
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1889
|
+
style='font-size:10.0pt;background:aqua'>*������� If using TestNG, override the
|
1890
|
+
@AfterMethod annotation</span></p>
|
1891
|
+
|
1892
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1893
|
+
style='font-size:10.0pt;background:aqua'>*������� If using JUnit, override the
|
1894
|
+
@After annotation</span></p>
|
1895
|
+
|
1896
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1897
|
+
style='font-size:10.0pt;background:aqua'>*������� and add the following line in
|
1898
|
+
it:</span></p>
|
1899
|
+
|
1900
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1901
|
+
style='font-size:10.0pt;background:aqua'>*����������������������� �������
|
1902
|
+
engine.disableWebAnalyticsTesting();</span></p>
|
1903
|
+
|
1904
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1905
|
+
style='font-size:10.0pt;background:aqua'>*������� See the example shown below</span></p>
|
1906
|
+
|
1907
|
+
<p class=MsoNoSpacing style='text-indent:13.5pt;border:none;padding:0in'><span
|
1908
|
+
style='font-size:10.0pt;background:aqua'>*/</span></p>
|
1909
|
+
|
1910
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1911
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>��� <span
|
1912
|
+
style='background:yellow'>@AfterMethod</span></span></p>
|
1913
|
+
|
1914
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1915
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>��� public void
|
1916
|
+
tearDown() throws Exception {</span></p>
|
1917
|
+
|
1918
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1919
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>������� <span
|
1920
|
+
style='background:aqua'>engine.disableWebAnalyticsTesting();</span></span></p>
|
1921
|
+
|
1922
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1923
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>�������
|
1924
|
+
seleniumScriptRunnerHelper.stopDriver();</span></p>
|
1925
|
+
|
1926
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1927
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>��� }</span></p>
|
1928
|
+
|
1929
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1930
|
+
normal;border:none;padding:0in'><span style='font-size:10.0pt'>}</span></p>
|
1931
|
+
|
1932
|
+
</div>
|
1933
|
+
|
1934
|
+
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
|
1935
|
+
normal'><span style='font-size:12.0pt'> </span></p>
|
1936
|
+
|
1937
|
+
<span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif"'><br
|
1938
|
+
clear=all style='page-break-before:always'>
|
1939
|
+
</span>
|
1940
|
+
|
1941
|
+
<p class=MsoNormal><b><span style='font-size:14.0pt;line-height:115%;
|
1942
|
+
color:#365F91'> </span></b></p>
|
1943
|
+
|
1944
|
+
<h1><a name="_Toc284419663"></a><a name="_Jpcap_setup"></a><span
|
1945
|
+
style='font-weight:normal'>7.<span style='font:7.0pt "Times New Roman"'>
|
1946
|
+
</span></span>Jpcap setup</h1>
|
1947
|
+
|
1948
|
+
<h2><a name="_Toc284419664"><span style='font-size:11.0pt;line-height:115%;
|
1949
|
+
color:#365F91'>7.1.1<span style='font:7.0pt "Times New Roman"'>
|
1950
|
+
</span></span>What is Jpcap?</a></h2>
|
1951
|
+
|
1952
|
+
<p class=MsoNoSpacing><a
|
1953
|
+
href="http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html">Jpcap</a> �
|
1954
|
+
is a Java library for capturing and sending network packets. </p>
|
1955
|
+
|
1956
|
+
<p class=MsoNoSpacing>For information specific to this library, please contact
|
1957
|
+
Keita Fujii, <a href="mailto:kfujii@uci.edu">kfujii@uci.edu</a>. </p>
|
1958
|
+
|
1959
|
+
<p class=MsoNormal> </p>
|
1960
|
+
|
1961
|
+
<h2><a name="_Toc284419665"><span style='font-size:11.0pt;line-height:115%;
|
1962
|
+
color:#365F91'>7.1.2<span style='font:7.0pt "Times New Roman"'>
|
1963
|
+
</span></span>Custom installation</a></h2>
|
1964
|
+
|
1965
|
+
<p class=MsoNormal>You can use the binaries packaged (and tested) with WAAT
|
1966
|
+
using the instructions provided below.</p>
|
1967
|
+
|
1968
|
+
<h3><a name="_Toc284419666"><span style='color:#365F91'>7.1.2.1<span
|
1969
|
+
style='font:7.0pt "Times New Roman"'>
|
1970
|
+
</span></span>Windows</a></h3>
|
1971
|
+
|
1972
|
+
<p class=MsoNormal>You can use one of the following approaches to setup Jpcap
|
1973
|
+
and its dependencies on Windows OS:</p>
|
1974
|
+
|
1975
|
+
<h4 style='margin-left:.75in;text-indent:-.75in'>7.1.2.1.1<span
|
1976
|
+
style='font:7.0pt "Times New Roman"'>
|
1977
|
+
</span>Copy dependent files</h4>
|
1978
|
+
|
1979
|
+
<p class=MsoListParagraphCxSpFirst style='margin-left:.25in;text-indent:-.25in'><span
|
1980
|
+
style='font-family:Wingdings'>�<span style='font:7.0pt "Times New Roman"'>
|
1981
|
+
</span></span>Copy all dlls from \WAAT\lib\httpSniffer\Windows\System32 to
|
1982
|
+
C:\Windows\System32 directory.</p>
|
1983
|
+
|
1984
|
+
<p class=MsoListParagraphCxSpLast style='margin-left:.25in;text-indent:-.25in'><span
|
1985
|
+
style='font-family:Wingdings'>�<span style='font:7.0pt "Times New Roman"'>
|
1986
|
+
</span></span>Copy npf.sys from \WAAT\lib\httpSniffer\Windows\System32\drivers
|
1987
|
+
to C:\Windows\System32\drivers directory.</p>
|
1988
|
+
|
1989
|
+
<h4 style='margin-left:.75in;text-indent:-.75in'>7.1.2.1.2<span
|
1990
|
+
style='font:7.0pt "Times New Roman"'>
|
1991
|
+
</span>Install dependent files</h4>
|
1992
|
+
|
1993
|
+
<p class=MsoListParagraphCxSpFirst style='margin-left:.25in;text-indent:-.25in'><span
|
1994
|
+
style='font-family:Wingdings'>�<span style='font:7.0pt "Times New Roman"'>
|
1995
|
+
</span></span>Install WinPcap_4_1_2.exe from \WAAT\lib\httpSniffer\Windows directory.</p>
|
1996
|
+
|
1997
|
+
<p class=MsoListParagraphCxSpLast style='margin-left:.25in;text-indent:-.25in'><span
|
1998
|
+
style='font-family:Wingdings'>�<span style='font:7.0pt "Times New Roman"'>
|
1999
|
+
</span></span>Install JpcapSetup-0.7.exe from \WAAT\lib\httpSniffer\Windows
|
2000
|
+
directory.</p>
|
2001
|
+
|
2002
|
+
<h3><a name="_Toc284419667"><span style='color:#365F91'>7.1.2.2<span
|
2003
|
+
style='font:7.0pt "Times New Roman"'>
|
2004
|
+
</span></span>Fedora, RedHat</a></h3>
|
2005
|
+
|
2006
|
+
<p class=MsoNormal>Install the Jpcap RPM package available in
|
2007
|
+
\WAAT\lib\httpSniffer\Linux\jpcap-0.7-1.i386.rpm</p>
|
2008
|
+
|
2009
|
+
<h3><a name="_Toc284419668"><span style='color:#365F91'>7.1.2.3<span
|
2010
|
+
style='font:7.0pt "Times New Roman"'>
|
2011
|
+
</span></span>Ubuntu, GNU/Debian</a></h3>
|
2012
|
+
|
2013
|
+
<p class=MsoNormal>Install the Jpcap RPM package available in
|
2014
|
+
\WAAT\lib\httpSniffer\Linux\jpcap-0.7.deb</p>
|
2015
|
+
|
2016
|
+
<p class=MsoNormal> </p>
|
2017
|
+
|
2018
|
+
<h2><a name="_Toc284419669"><span style='font-size:11.0pt;line-height:115%;
|
2019
|
+
color:#365F91'>7.1.3<span style='font:7.0pt "Times New Roman"'>
|
2020
|
+
</span></span>Default installation</a></h2>
|
2021
|
+
|
2022
|
+
<p class=MsoNoSpacing>Install Jpcap and its dependencies directly based on the
|
2023
|
+
instructions provided on the <a
|
2024
|
+
href="http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/install.html">Jpcap
|
2025
|
+
website</a> or a local copy of that installation document available <a
|
2026
|
+
href="Jpcap_Install.html">here</a>.</p>
|
2027
|
+
|
2028
|
+
<span style='font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-serif"'><br
|
2029
|
+
clear=all style='page-break-before:always'>
|
2030
|
+
</span>
|
2031
|
+
|
2032
|
+
<p class=MsoNormal><b><span style='font-size:14.0pt;line-height:115%;
|
2033
|
+
color:#365F91'> </span></b></p>
|
2034
|
+
|
2035
|
+
<h1><a name="_Toc284419670"><span style='font-weight:normal'>8.<span
|
2036
|
+
style='font:7.0pt "Times New Roman"'> </span></span>FAQs</a></h1>
|
2037
|
+
|
2038
|
+
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'><strong><span
|
2039
|
+
style='font-family:Wingdings;font-weight:normal'>�<span style='font:7.0pt "Times New Roman"'>
|
2040
|
+
</span></span></strong><strong><span style='font-family:"Calibri","sans-serif"'>What
|
2041
|
+
languages are supported by WAAT?</span></strong></p>
|
2042
|
+
|
2043
|
+
<p class=MsoNoSpacing style='margin-left:.5in'>WAAT is available as a Java
|
2044
|
+
framework. There are plans to make this available as a Ruby gem file and a .NET
|
2045
|
+
dll.</p>
|
2046
|
+
|
2047
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2048
|
+
"Calibri","sans-serif";font-weight:normal'> </span></strong></p>
|
2049
|
+
|
2050
|
+
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'><strong><span
|
2051
|
+
style='font-family:Wingdings;font-weight:normal'>�<span style='font:7.0pt "Times New Roman"'>
|
2052
|
+
</span></span></strong><strong><span style='font-family:"Calibri","sans-serif"'>What
|
2053
|
+
UI Testing frameworks are supported by WAAT?</span></strong></p>
|
2054
|
+
|
2055
|
+
<p class=MsoNoSpacing style='text-indent:.5in'><strong><span style='font-family:
|
2056
|
+
"Calibri","sans-serif";font-weight:normal'> </span></strong></p>
|
2057
|
+
|
2058
|
+
<p class=MsoNoSpacing style='text-indent:.5in'><strong><span style='font-family:
|
2059
|
+
"Calibri","sans-serif"'>WAAT using Omniture Debugger approach:</span></strong></p>
|
2060
|
+
|
2061
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2062
|
+
"Calibri","sans-serif";font-weight:normal'>WAAT is not dependent on any
|
2063
|
+
particular UI testing framework. </span></strong></p>
|
2064
|
+
|
2065
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2066
|
+
"Calibri","sans-serif";font-weight:normal'>This has been tested with Selenium
|
2067
|
+
and WebDriver. However, if you are using any other framework, all you need to
|
2068
|
+
do is </span></strong><a href="#_Create_an_implementation">implement the
|
2069
|
+
ScriptRunner interface</a><strong><span style='font-family:"Calibri","sans-serif";
|
2070
|
+
font-weight:normal'> in your existing framework, and you will be good to go.</span></strong></p>
|
2071
|
+
|
2072
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2073
|
+
"Calibri","sans-serif";font-weight:normal'> </span></strong></p>
|
2074
|
+
|
2075
|
+
<p class=MsoNoSpacing style='text-indent:.5in'><strong><span style='font-family:
|
2076
|
+
"Calibri","sans-serif"'>WAAT using HttpSniffer approach:</span></strong></p>
|
2077
|
+
|
2078
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2079
|
+
"Calibri","sans-serif";font-weight:normal'>This is UI framework independent.</span></strong></p>
|
2080
|
+
|
2081
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2082
|
+
"Calibri","sans-serif";font-weight:normal'> </span></strong></p>
|
2083
|
+
|
2084
|
+
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'><strong><span
|
2085
|
+
style='font-family:Wingdings;font-weight:normal'>�<span style='font:7.0pt "Times New Roman"'>
|
2086
|
+
</span></span></strong><strong><span style='font-family:"Calibri","sans-serif"'>What
|
2087
|
+
Web Analytic systems are supported by WAAT?</span></strong></p>
|
2088
|
+
|
2089
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2090
|
+
"Calibri","sans-serif";font-weight:normal'>WAAT has been tested with sites
|
2091
|
+
reporting to Omniture SiteCatalyst and Google Analytics. This framework can be
|
2092
|
+
used by any site sending name-value pair of properties / tags as parameters in
|
2093
|
+
the request URL for any Web Analytic tool.</span></strong></p>
|
2094
|
+
|
2095
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2096
|
+
"Calibri","sans-serif";font-weight:normal'>�</span></strong></p>
|
2097
|
+
|
2098
|
+
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'><strong><span
|
2099
|
+
style='font-family:Wingdings;font-weight:normal'>�<span style='font:7.0pt "Times New Roman"'>
|
2100
|
+
</span></span></strong><strong><span style='font-family:"Calibri","sans-serif"'>What
|
2101
|
+
Browsers are supported by WAAT?</span></strong></p>
|
2102
|
+
|
2103
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2104
|
+
"Calibri","sans-serif";font-weight:normal'>WAAT is Browser independent.</span></strong></p>
|
2105
|
+
|
2106
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2107
|
+
"Calibri","sans-serif";font-weight:normal'> </span></strong></p>
|
2108
|
+
|
2109
|
+
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'><strong><span
|
2110
|
+
style='font-family:Wingdings;font-weight:normal'>�<span style='font:7.0pt "Times New Roman"'>
|
2111
|
+
</span></span></strong><strong><span style='font-family:"Calibri","sans-serif"'>What
|
2112
|
+
Operating Systems are supported by WAAT?</span></strong></p>
|
2113
|
+
|
2114
|
+
<p class=MsoNoSpacing style='margin-left:.5in'>It has been tested on Windows 7,
|
2115
|
+
Windows XP, Ubuntu Linux and Mac OS.</p>
|
2116
|
+
|
2117
|
+
<p class=MsoNoSpacing style='margin-left:.5in'> </p>
|
2118
|
+
|
2119
|
+
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'><strong><span
|
2120
|
+
style='font-family:Wingdings;font-weight:normal'>�<span style='font:7.0pt "Times New Roman"'>
|
2121
|
+
</span></span></strong><strong><span style='font-family:"Calibri","sans-serif"'>When
|
2122
|
+
using WAAT using HttpSniffer, I get the following runtime error:</span></strong></p>
|
2123
|
+
|
2124
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2125
|
+
"Calibri","sans-serif";font-weight:normal'> </span></strong></p>
|
2126
|
+
|
2127
|
+
<div style='border:solid windowtext 1.0pt;padding:1.0pt 4.0pt 1.0pt 4.0pt;
|
2128
|
+
margin-left:.5in;margin-right:0in'>
|
2129
|
+
|
2130
|
+
<p class=MsoNoSpacing align=center style='text-align:center;border:none;
|
2131
|
+
padding:0in'><strong><i><span style='font-family:"Calibri","sans-serif";
|
2132
|
+
font-weight:normal'>java.lang.UnsatisfiedLinkError: no jpcap in
|
2133
|
+
java.library.path</span></i></strong></p>
|
2134
|
+
|
2135
|
+
</div>
|
2136
|
+
|
2137
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2138
|
+
"Calibri","sans-serif";font-weight:normal'> </span></strong></p>
|
2139
|
+
|
2140
|
+
<p class=MsoNoSpacing style='margin-left:.5in'><strong><span style='font-family:
|
2141
|
+
"Calibri","sans-serif";font-weight:normal'>This is because the HttpSniffer
|
2142
|
+
dependencies have not been set. Refer to the </span></strong><a
|
2143
|
+
href="#_Jpcap_setup">Jpcap setup</a><strong><span style='font-family:"Calibri","sans-serif";
|
2144
|
+
font-weight:normal'> section.</span></strong></p>
|
2145
|
+
|
2146
|
+
</div>
|
2147
|
+
|
2148
|
+
</body>
|
2149
|
+
|
2150
|
+
</html>
|