https://wiki.zimbra.com/api.php?action=feedcontributions&user=Jhidayat&feedformat=atomZimbra :: Tech Center - User contributions [en]2024-03-28T21:12:22ZUser contributionsMediaWiki 1.39.0https://wiki.zimbra.com/index.php?title=Testing:_Selenium:_Running_ZimbraDesktop&diff=37134Testing: Selenium: Running ZimbraDesktop2011-12-09T08:03:52Z<p>Jhidayat: /* Rest of the steps... */</p>
<hr />
<div>== Important Resources &amp; URLs ==<br />
<br />
*[http://www.zimbra.com/desktop7/help/en_US/Zimbra_Mail_Help.htm http://www.zimbra.com/desktop7/help/en_US/Zimbra_Mail_Help.htm] - Zimbra Desktop 7 Product Help <br />
*[http://help.zimbra.com/?utm_source=mail&utm_medium=zd&utm_content=7.1.1&utm_campaign=help http://help.zimbra.com/?utm_source=mail&amp;utm_medium=zd&amp;utm_content=7.1.1&amp;utm_campaign=help] - Zimbra&nbsp;Desktop 7 User Help <br />
<br />
<br> <br />
<br />
== Zimbra&nbsp;Desktop Test Information ==<br />
<br />
=== Managers In Charge ===<br />
<br />
*Matthew Rhoades (Palo&nbsp;Alto)&nbsp;- [mailto:matt@zimbra.com matt@zimbra.com] <br />
*Sandesh Almeida&nbsp;(Pune)&nbsp;- [mailto:salmeida@zimbra.com salmeida@zimbra.com]<br />
<br />
<br> <br />
<br />
=== Engineers In Charge&nbsp; ===<br />
<br />
*Jeffry Hidayat (Palo Alto) - [mailto:jhidayat@zimbra.com jhidayat@zimbra.com] <br />
*Rupali Rao (Pune) - [mailto:rrao@vmware.com rrao@vmware.com]<br />
<br />
<br> <br />
<br />
=== Developers In Charge ===<br />
<br />
*David Wang (Palo Alto) - [mailto:dywang@zimbra.com dywang@zimbra.com] <br />
*Jeff Flanigan (Pennsylvania) - [mailto:jflanigan@zimbra.com jflanigan@zimbra.com] <br />
*K Karthikeyan&nbsp;(Palo Alto) - [mailto:kkarthikeyan@zimbra.com kkarthikeyan@zimbra.com]&nbsp;<br />
<br />
<br><br />
<br />
== Zimbra Desktop Automation: ==<br />
<br />
=== Description:<br> ===<br />
<blockquote>Parallel to&nbsp;Zimbra Ajax Selenium project (with combination of Selenium and TestNG), Zimbra Desktop Automation mainly focuses on front-end interactions, while also&nbsp;utilizes some back-end interactions (using SOAP) for test set-up &amp;&nbsp;teardown, and Zimbra server-backend verification. There are 3 main packages in Zimbra Desktop automation, they are:</blockquote><blockquote>'''1. Framework package'''</blockquote><blockquote>This package contains low level codes including object helper methods, wrapper to native selenium APIs, and framework-level utility APIs. This package is shared with other selenium-related projects, such as Ajax, HTML, and mobile.&nbsp;</blockquote> <br />
<br> <br />
<blockquote>'''2. UI&nbsp;package'''</blockquote><blockquote>This package contains UI&nbsp;container classes, such as Forms, Dialogs, Pages, Trees, and Toaster. These classes utilize and inherit some classes from Framework package. With Object-oriented structure, each of the UI&nbsp;container classes' APIs function differently from each other.</blockquote> <br />
<br> <br />
<blockquote>'''3. Test package'''</blockquote><blockquote>This package has 2 sub-packages:&nbsp;Core and Tests. In Core package, there are AjaxCommonTest and DesktopInstallUtil classes, while in Test package, there are test classes, which contain test methods (test cases).</blockquote><blockquote>- AjaxCommonTest acts as a parent of Test classes. As TestNG is&nbsp;chosen as test driver for Zimbra selenium project, AjaxCommonTest utilizes and inherits classes from Framework package to build the @BeforeSuite, @BeforeClass, @BeforeMethod, @AfterSuite, @AfterClass, @AfterMethod for framework-level Setup and Teardown respectively, which configurable from config.properties file located inside "conf" folder at project level.</blockquote><blockquote>- DesktopInstallUtil contains methods that are used for Zimbra&nbsp;Desktop Installation and Uninstallation. NOTE: There is a near-future plan of moving this class into Framework-level Utils package.</blockquote><blockquote>- Test classes simply inherit from&nbsp;AjaxCommonTest and contain test methods. The test classes might also have @BeforeMethod and @AfterMethod annotated methods, but they are only limited to UI&nbsp;interactions as part of test setup and cleanup,&nbsp;NOT the framework-level configuration</blockquote><blockquote></blockquote><blockquote>[[Image:ZD Sel Fr.jpg]]</blockquote> <br />
=== <u>How to run it</u><br> ===<br />
<br />
==== Config.properties ====<br />
<br />
To run Zimbra Desktop locally using ant with ZimbraSelenium/build.xml, there are some important elements in config.properties to be set properly:<br> <br />
<br />
- &lt;COMPUTER_NAME&gt;.desktop.test=true <br />
<br />
This parameter is a must. To get the &lt;COMPUTER_NAME&gt;, go to command line console, and type "hostname". Without this paramter set to true, it will run Ajax selenium test. <br />
<br />
<br> <br />
<br />
- ''desktop.productBranch=ZDESKTOP_712'' <br />
<br />
This is to set the product branch, in case the product branch is different (look at zre-matrix column), please change this accordingly (NOTE:&nbsp;keep in mind, '-' is '_' for this parameter).<br> <br />
<br />
<br>''- desktop.forceInstall=true'' <br />
<br />
This is to set whether forceInstallation of Zimbra Desktop will be done. To run with pre-installed Zimbra Desktop build, please set this parameter to false, if other builds are expected, please leave this to true.<br> <br />
<br />
<br>''- desktop.uninstallAfterTest=false'' <br />
<br />
This is to set whether ZD&nbsp;app uninstallation will take place after the test. If cleaning up is expected after the test, please set this to true, otherwise to false. By default this is set to false, so that if there are some bugs, the important information could still be retrieved from the system at the end of test.<br> <br />
<br />
<br> <br />
<br />
''- desktop.buildUrl='' <br />
<br />
Please specify this build URL&nbsp;up to a folder before the binary file, such as:&nbsp;[http://zre-matrix.eng.vmware.com/links/MACOSXx86_10.6/ZDESKTOP-711/20110706070101_ZDESKTOP/ZimbraBuild/i386/ http://zre-matrix.eng.vmware.com/links/MACOSXx86_10.6/ZDESKTOP-711/20110706070101_ZDESKTOP/ZimbraBuild/i386/]&nbsp;. If this is left empty and installation is required (either from desktop.forceInstall=true parameter or no pre-installed Zimbra Desktop), the framework will download and install the latest Zimbra&nbsp;Desktop build from zre-matrix based on the OS and given product name and branch. <br />
<br />
<br> <br />
<br />
==== ZimbraSelenium/build.xml<br> ====<br />
<br />
Target "Run-ExecuteHarnessMain" needs to be fixed up to run ZD&nbsp;properly, please see the underlined word below:<br> <br />
<br />
&nbsp;&lt;target name="Run-ExecuteHarnessMain" depends="jar" description="Run all tests per specified arguments"&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="jarfile" value="${dist.lib.dir}/zimbraselenium.jar"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="pattern" value="projects.<u>'''desktop'''</u>.tests.addressbook"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="groups" value="always,sanity,smoke"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;echo&gt;Executing ...&lt;/echo&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;java classname="framework.core.ExecuteHarnessMain" classpathref="class.path" fork="true" failonerror="true"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;arg line="-j '${jarfile}' -p ${pattern} -g ${groups} -l conf/log4j.properties"/&gt; <br />
&nbsp;&nbsp;&nbsp; &lt;/java&gt;<br />
&nbsp;&lt;/target&gt;<br />
<br />
==== Rest of the steps...<br> ====<br />
<br />
The rest of the steps are exactly similar to http://wiki.zimbra.com/wiki/Testing:_Selenium:_Running_ZimbraSelenium#Running_ZimbraSelenium<br> EXCEPT that you need to run tests with "Administrator" privilege because the test will involve installing/uninstalling Zimbra Desktop application.</div>Jhidayathttps://wiki.zimbra.com/index.php?title=Testing:_Selenium:_Running_ZimbraDesktop&diff=37040Testing: Selenium: Running ZimbraDesktop2011-12-01T19:07:44Z<p>Jhidayat: /* Zimbra&nbsp;Desktop Test Information */</p>
<hr />
<div>== Important Resources &amp; URLs ==<br />
<br />
*[http://www.zimbra.com/desktop7/help/en_US/Zimbra_Mail_Help.htm http://www.zimbra.com/desktop7/help/en_US/Zimbra_Mail_Help.htm] - Zimbra Desktop 7 Product Help <br />
*[http://help.zimbra.com/?utm_source=mail&utm_medium=zd&utm_content=7.1.1&utm_campaign=help http://help.zimbra.com/?utm_source=mail&amp;utm_medium=zd&amp;utm_content=7.1.1&amp;utm_campaign=help] - Zimbra&nbsp;Desktop 7 User Help <br />
<br />
<br> <br />
<br />
== Zimbra&nbsp;Desktop Test Information ==<br />
<br />
=== Managers In Charge ===<br />
<br />
*Matthew Rhoades (Palo&nbsp;Alto)&nbsp;- [mailto:matt@zimbra.com matt@zimbra.com] <br />
*Sandesh Almeida&nbsp;(Pune)&nbsp;- [mailto:salmeida@zimbra.com salmeida@zimbra.com]<br />
<br />
<br> <br />
<br />
=== Engineers In Charge&nbsp; ===<br />
<br />
*Jeffry Hidayat (Palo Alto) - [mailto:jhidayat@zimbra.com jhidayat@zimbra.com] <br />
*Rupali Rao (Pune) - [mailto:rrao@vmware.com rrao@vmware.com]<br />
<br />
<br> <br />
<br />
=== Developers In Charge ===<br />
<br />
*David Wang (Palo Alto) - [mailto:dywang@zimbra.com dywang@zimbra.com] <br />
*Jeff Flanigan (Pennsylvania) - [mailto:jflanigan@zimbra.com jflanigan@zimbra.com] <br />
*K Karthikeyan&nbsp;(Palo Alto) - [mailto:kkarthikeyan@zimbra.com kkarthikeyan@zimbra.com]&nbsp;<br />
<br />
<br><br />
<br />
== Zimbra Desktop Automation: ==<br />
<br />
=== Description:<br> ===<br />
<blockquote>Parallel to&nbsp;Zimbra Ajax Selenium project (with combination of Selenium and TestNG), Zimbra Desktop Automation mainly focuses on front-end interactions, while also&nbsp;utilizes some back-end interactions (using SOAP) for test set-up &amp;&nbsp;teardown, and Zimbra server-backend verification. There are 3 main packages in Zimbra Desktop automation, they are:</blockquote><blockquote>'''1. Framework package'''</blockquote><blockquote>This package contains low level codes including object helper methods, wrapper to native selenium APIs, and framework-level utility APIs. This package is shared with other selenium-related projects, such as Ajax, HTML, and mobile.&nbsp;</blockquote> <br />
<br> <br />
<blockquote>'''2. UI&nbsp;package'''</blockquote><blockquote>This package contains UI&nbsp;container classes, such as Forms, Dialogs, Pages, Trees, and Toaster. These classes utilize and inherit some classes from Framework package. With Object-oriented structure, each of the UI&nbsp;container classes' APIs function differently from each other.</blockquote> <br />
<br> <br />
<blockquote>'''3. Test package'''</blockquote><blockquote>This package has 2 sub-packages:&nbsp;Core and Tests. In Core package, there are AjaxCommonTest and DesktopInstallUtil classes, while in Test package, there are test classes, which contain test methods (test cases).</blockquote><blockquote>- AjaxCommonTest acts as a parent of Test classes. As TestNG is&nbsp;chosen as test driver for Zimbra selenium project, AjaxCommonTest utilizes and inherits classes from Framework package to build the @BeforeSuite, @BeforeClass, @BeforeMethod, @AfterSuite, @AfterClass, @AfterMethod for framework-level Setup and Teardown respectively, which configurable from config.properties file located inside "conf" folder at project level.</blockquote><blockquote>- DesktopInstallUtil contains methods that are used for Zimbra&nbsp;Desktop Installation and Uninstallation. NOTE: There is a near-future plan of moving this class into Framework-level Utils package.</blockquote><blockquote>- Test classes simply inherit from&nbsp;AjaxCommonTest and contain test methods. The test classes might also have @BeforeMethod and @AfterMethod annotated methods, but they are only limited to UI&nbsp;interactions as part of test setup and cleanup,&nbsp;NOT the framework-level configuration</blockquote><blockquote></blockquote><blockquote>[[Image:ZD Sel Fr.jpg]]</blockquote> <br />
=== <u>How to run it</u><br> ===<br />
<br />
==== Config.properties ====<br />
<br />
To run Zimbra Desktop locally using ant with ZimbraSelenium/build.xml, there are some important elements in config.properties to be set properly:<br> <br />
<br />
- &lt;COMPUTER_NAME&gt;.desktop.test=true <br />
<br />
This parameter is a must. To get the &lt;COMPUTER_NAME&gt;, go to command line console, and type "hostname". Without this paramter set to true, it will run Ajax selenium test. <br />
<br />
<br> <br />
<br />
- ''desktop.productBranch=ZDESKTOP_712'' <br />
<br />
This is to set the product branch, in case the product branch is different (look at zre-matrix column), please change this accordingly (NOTE:&nbsp;keep in mind, '-' is '_' for this parameter).<br> <br />
<br />
<br>''- desktop.forceInstall=true'' <br />
<br />
This is to set whether forceInstallation of Zimbra Desktop will be done. To run with pre-installed Zimbra Desktop build, please set this parameter to false, if other builds are expected, please leave this to true.<br> <br />
<br />
<br>''- desktop.uninstallAfterTest=false'' <br />
<br />
This is to set whether ZD&nbsp;app uninstallation will take place after the test. If cleaning up is expected after the test, please set this to true, otherwise to false. By default this is set to false, so that if there are some bugs, the important information could still be retrieved from the system at the end of test.<br> <br />
<br />
<br> <br />
<br />
''- desktop.buildUrl='' <br />
<br />
Please specify this build URL&nbsp;up to a folder before the binary file, such as:&nbsp;[http://zre-matrix.eng.vmware.com/links/MACOSXx86_10.6/ZDESKTOP-711/20110706070101_ZDESKTOP/ZimbraBuild/i386/ http://zre-matrix.eng.vmware.com/links/MACOSXx86_10.6/ZDESKTOP-711/20110706070101_ZDESKTOP/ZimbraBuild/i386/]&nbsp;. If this is left empty and installation is required (either from desktop.forceInstall=true parameter or no pre-installed Zimbra Desktop), the framework will download and install the latest Zimbra&nbsp;Desktop build from zre-matrix based on the OS and given product name and branch. <br />
<br />
<br> <br />
<br />
==== ZimbraSelenium/build.xml<br> ====<br />
<br />
Target "Run-ExecuteHarnessMain" needs to be fixed up to run ZD&nbsp;properly, please see the underlined word below:<br> <br />
<br />
&nbsp;&lt;target name="Run-ExecuteHarnessMain" depends="jar" description="Run all tests per specified arguments"&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="jarfile" value="${dist.lib.dir}/zimbraselenium.jar"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="pattern" value="projects.<u>'''desktop'''</u>.tests.addressbook"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="groups" value="always,sanity,smoke"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;echo&gt;Executing ...&lt;/echo&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;java classname="framework.core.ExecuteHarnessMain" classpathref="class.path" fork="true" failonerror="true"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;arg line="-j '${jarfile}' -p ${pattern} -g ${groups} -l conf/log4j.properties"/&gt; <br />
&nbsp;&nbsp;&nbsp; &lt;/java&gt;<br />
&nbsp;&lt;/target&gt;<br />
<br />
==== Rest of the steps...<br> ====<br />
<br />
The rest of the steps are exactly similar to http://wiki.zimbra.com/wiki/Testing:_Selenium:_Running_ZimbraSelenium#Running_ZimbraSelenium<br></div>Jhidayathttps://wiki.zimbra.com/index.php?title=Testing:_Selenium:_Building_ZimbraDesktop&diff=37039Testing: Selenium: Building ZimbraDesktop2011-12-01T19:04:19Z<p>Jhidayat: /* Downloading the Code */</p>
<hr />
<div>==General Information==<br />
<br />
See [[Building_Zimbra_using_Perforce|Building Zimbra]].<br/><br />
See [[ZimbraSelenium_Overview|Selenium Overview]].<br/><br />
<br />
==Downloading the Code==<br />
<br />
===Downloading the Prerequisites===<br />
Similar to Building Selenium: http://wiki.zimbra.com/wiki/Testing:_Selenium:_Building_ZimbraSelenium#Downloading_the_Prerequisites<br />
<br />
===Downloading ZimbraSelenium===<br />
Similar to Building Selenium: http://wiki.zimbra.com/wiki/Testing:_Selenium:_Building_ZimbraSelenium#Downloading_ZimbraSelenium<br />
<br />
==Building ZimbraSelenium for testing Zimbra Desktop using Eclipse==<br />
<br />
Similar as building ZimbraSelenium project: http://wiki.zimbra.com/wiki/Testing:_Selenium:_Building_ZimbraSelenium#Building_ZimbraSelenium_using_Eclipse<br />
<br />
==Troubleshooting==<br />
<br />
<br />
<br />
{{Article Footer|unknown|11/7/2007}}<br />
<br />
[[Category: Build]]<br />
[[Category: Testing]]<br />
[[Category: Selenium]]</div>Jhidayathttps://wiki.zimbra.com/index.php?title=Testing:_Selenium:_Building_ZimbraDesktop&diff=37038Testing: Selenium: Building ZimbraDesktop2011-12-01T19:02:26Z<p>Jhidayat: </p>
<hr />
<div>==General Information==<br />
<br />
See [[Building_Zimbra_using_Perforce|Building Zimbra]].<br/><br />
See [[ZimbraSelenium_Overview|Selenium Overview]].<br/><br />
<br />
==Downloading the Code==<br />
<br />
===Downloading the Prerequisites===<br />
<br />
The ZimbraSelenium project depends on the following Zimbra projects:<br />
<br />
#ZimbraCommon<br />
#ZimbraIM<br />
#ZimbraNative<br />
#ZimbraServer<br />
#ZimbraSoap<br />
#ZimbraTagLib<br />
#ZimbraWebClient<br />
<br />
Download the prerequisites:<br />
<br />
<pre><br />
export P4PORT=codes.zimbra.com:2666<br />
mkdir -p /home/public/p4<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraCommon/...<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraIM/...<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraNative/...<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraServer/...<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraSoap/...<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraTagLib/...<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraWebClient/...<br />
</pre><br />
<br />
where BRANCH is the release branch to download (e.g. main). All files will be downloaded to /home/public/p4.<br />
<br />
===Downloading ZimbraSelenium===<br />
<br />
Download ZimbraSelenium:<br />
<br />
<pre><br />
export P4PORT=codes.zimbra.com:2666<br />
mkdir -p /home/public/p4<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraSelenium/...<br />
</pre><br />
<br />
where BRANCH is the release branch to download (e.g. main). All files will be downloaded to /home/public/p4.<br />
<br />
==Building ZimbraSelenium for testing Zimbra Desktop using Eclipse==<br />
<br />
Similar as building ZimbraSelenium project: http://wiki.zimbra.com/wiki/Testing:_Selenium:_Building_ZimbraSelenium#Building_ZimbraSelenium_using_Eclipse<br />
<br />
==Troubleshooting==<br />
<br />
<br />
<br />
{{Article Footer|unknown|11/7/2007}}<br />
<br />
[[Category: Build]]<br />
[[Category: Testing]]<br />
[[Category: Selenium]]</div>Jhidayathttps://wiki.zimbra.com/index.php?title=Testing:_Selenium:_Building_ZimbraDesktop&diff=37037Testing: Selenium: Building ZimbraDesktop2011-12-01T18:57:25Z<p>Jhidayat: Created page with "==General Information== See Building Zimbra.<br/> See Selenium Overview.<br/> ==Downloading the Code== ===Downlo..."</p>
<hr />
<div>==General Information==<br />
<br />
See [[Building_Zimbra_using_Perforce|Building Zimbra]].<br/><br />
See [[ZimbraSelenium_Overview|Selenium Overview]].<br/><br />
<br />
==Downloading the Code==<br />
<br />
===Downloading the Prerequisites===<br />
<br />
The ZimbraSelenium project depends on the following Zimbra projects:<br />
<br />
#ZimbraCommon<br />
#ZimbraIM<br />
#ZimbraNative<br />
#ZimbraServer<br />
#ZimbraSoap<br />
#ZimbraTagLib<br />
#ZimbraWebClient<br />
<br />
Download the prerequisites:<br />
<br />
<pre><br />
export P4PORT=codes.zimbra.com:2666<br />
mkdir -p /home/public/p4<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraCommon/...<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraIM/...<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraNative/...<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraServer/...<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraSoap/...<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraTagLib/...<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraWebClient/...<br />
</pre><br />
<br />
where BRANCH is the release branch to download (e.g. main). All files will be downloaded to /home/public/p4.<br />
<br />
===Downloading ZimbraSelenium===<br />
<br />
Download ZimbraSelenium:<br />
<br />
<pre><br />
export P4PORT=codes.zimbra.com:2666<br />
mkdir -p /home/public/p4<br />
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraSelenium/...<br />
</pre><br />
<br />
where BRANCH is the release branch to download (e.g. main). All files will be downloaded to /home/public/p4.<br />
<br />
==Building ZimbraSelenium using Eclipse==<br />
<br />
===Java===<br />
<br />
ZimbraSelenium requires [http://www.java.com/download/ java 1.6]. Download and install java.<br />
<br />
===Eclipse===<br />
<br />
Download and install [http://www.eclipse.org/downloads/ eclipse IDE].<br />
<br />
===Build the Code===<br />
<br />
Use the following steps to build the code:<br />
<br />
# Create new eclipse workspace<br />
## Open eclipse<br />
## Create new workspace in /home/public/p4/BRANCH , where BRANCH is the release branch.<br />
# Add all projects to eclipse<br />
## Select File->New->Project->Java Project<br />
## For "Project Name", enter ZimbraSelenium<br />
## Complete these same steps for all the dependency projects (i.e. ZimbraCommon, ZimbraServer, etc.)<br />
# Build ZimbraSelenium<br />
## Expand the ZimbraSelenium project<br />
## Select build.xml, right click, select "Run As"->"Ant Build"<br />
<br />
The output in the console should display:<br />
<br />
<pre><br />
...<br />
[copy] Copying 3 files to C:\home\public\p4\main\ZimbraServer\build\attrs-src<br />
set-buildinfo-vars:<br />
[echo] Version: 6.0.2_BETA1_1111 Date: 20100721-1203<br />
do-generate-ldap-config:<br />
[javac] Compiling 1 source file to C:\home\public\p4\main\ZimbraSelenium\build\classes<br />
jar:<br />
[jar] Building jar: C:\home\public\p4\main\ZimbraSelenium\build\dist\zimbra-6.0.0\lib\zimbraselenium.jar<br />
BUILD SUCCESSFUL<br />
Total time: 19 seconds<br />
</pre><br />
<br />
==Troubleshooting==<br />
<br />
<br />
<br />
{{Article Footer|unknown|11/7/2007}}<br />
<br />
[[Category: Build]]<br />
[[Category: Testing]]<br />
[[Category: Selenium]]</div>Jhidayathttps://wiki.zimbra.com/index.php?title=File:ZD_Sel_Fr.jpg&diff=37036File:ZD Sel Fr.jpg2011-12-01T18:52:52Z<p>Jhidayat: </p>
<hr />
<div></div>Jhidayathttps://wiki.zimbra.com/index.php?title=Testing:_Selenium:_Running_ZimbraDesktop&diff=37035Testing: Selenium: Running ZimbraDesktop2011-12-01T18:51:20Z<p>Jhidayat: Created page with "== Important Resources &amp; URLs == *[http://www.zimbra.com/desktop7/help/en_US/Zimbra_Mail_Help.htm http://www.zimbra.com/desktop7/help/en_US/Zimbra_Mail_Help.htm] - Zimbra D..."</p>
<hr />
<div>== Important Resources &amp; URLs ==<br />
<br />
*[http://www.zimbra.com/desktop7/help/en_US/Zimbra_Mail_Help.htm http://www.zimbra.com/desktop7/help/en_US/Zimbra_Mail_Help.htm] - Zimbra Desktop 7 Product Help <br />
*[http://help.zimbra.com/?utm_source=mail&utm_medium=zd&utm_content=7.1.1&utm_campaign=help http://help.zimbra.com/?utm_source=mail&amp;utm_medium=zd&amp;utm_content=7.1.1&amp;utm_campaign=help] - Zimbra&nbsp;Desktop 7 User Help <br />
<br />
<br> <br />
<br />
== Zimbra&nbsp;Desktop Test Information ==<br />
<br />
=== Managers In Charge ===<br />
<br />
*Matthew Rhoades (Palo&nbsp;Alto)&nbsp;- [mailto:matt@zimbra.com matt@zimbra.com] <br />
*Sandesh Almeida&nbsp;(Pune)&nbsp;- [mailto:salmeida@zimbra.com salmeida@zimbra.com]<br />
<br />
<br> <br />
<br />
=== Engineers In Charge&nbsp; ===<br />
<br />
*Jeffry Hidayat (Palo Alto) - [mailto:jhidayat@zimbra.com jhidayat@zimbra.com] <br />
*Rupali Rao (Pune) - [mailto:rrao@vmware.com rrao@vmware.com]<br />
<br />
<br> <br />
<br />
=== Developers In Charge ===<br />
<br />
*David Wang (Palo Alto) - [mailto:dywang@zimbra.com dywang@zimbra.com] <br />
*Jeff Flanigan (Pennsylvania) - [mailto:jflanigan@zimbra.com jflanigan@zimbra.com] <br />
*K Karthikeyan&nbsp;(Palo Alto) - [mailto:kkarthikeyan@zimbra.com kkarthikeyan@zimbra.com]&nbsp;<br />
<br />
<br> <br />
<br />
=== Latest Recommended Builds ===<br />
<br />
==== For 7.1.2 RTM&nbsp;Testing ====<br />
<br />
- Windows: [http://zre-matrix.eng.vmware.com/links/WINDOWS/ZDESKTOP-712/20110910070101_ZDESKTOP/ZimbraBuild/i386/ WINDOWS/ZDESKTOP-712/20110910070101_ZDESKTOP] <br />
<br />
- Linux: [http://zre-matrix.eng.vmware.com/links/RHEL4/ZDESKTOP-712/20110910070101_ZDESKTOP/ZimbraBuild/i386/ RHEL4/ZDESKTOP-712/20110910070101_ZDESKTOP] <br />
<br />
- Mac OS: [http://zre-matrix.eng.vmware.com/links/MACOSXx86_10.6/ZDESKTOP-712/20110910070101_ZDESKTOP/ZimbraBuild/i386/ MACOSXx86_10.6/ZDESKTOP-712/20110910070101_ZDESKTOP] <br />
<br />
<br> <br />
<br />
==== For 7.1.1 RTM&nbsp;Testing ====<br />
<br />
- Windows: [http://zre-matrix.eng.vmware.com/links/WINDOWS/ZDESKTOP-711/20110726070101_ZDESKTOP/ZimbraBuild/i386/ WINDOWS/ZDESKTOP-711/20110726070101_ZDESKTOP] <br />
<br />
- Linux: [http://zre-matrix.eng.vmware.com/links/RHEL4/ZDESKTOP-711/20110726070101_ZDESKTOP/ZimbraBuild/i386/ RHEL4/ZDESKTOP-711/20110726070101_ZDESKTOP] <br />
<br />
- Mac OS: [http://zre-matrix.eng.vmware.com/links/MACOSXx86_10.6/ZDESKTOP-711/20110726070101_ZDESKTOP/ZimbraBuild/i386/ MACOSXx86_10.6/ZDESKTOP-711/20110726070101_ZDESKTOP] <br />
<br />
<br> <br />
<br />
<br />
== Zimbra Desktop Automation: ==<br />
<br />
=== Description:<br> ===<br />
<blockquote>Parallel to&nbsp;Zimbra Ajax Selenium project (with combination of Selenium and TestNG), Zimbra Desktop Automation mainly focuses on front-end interactions, while also&nbsp;utilizes some back-end interactions (using SOAP) for test set-up &amp;&nbsp;teardown, and Zimbra server-backend verification. There are 3 main packages in Zimbra Desktop automation, they are:</blockquote><blockquote>'''1. Framework package'''</blockquote><blockquote>This package contains low level codes including object helper methods, wrapper to native selenium APIs, and framework-level utility APIs. This package is shared with other selenium-related projects, such as Ajax, HTML, and mobile.&nbsp;</blockquote> <br />
<br> <br />
<blockquote>'''2. UI&nbsp;package'''</blockquote><blockquote>This package contains UI&nbsp;container classes, such as Forms, Dialogs, Pages, Trees, and Toaster. These classes utilize and inherit some classes from Framework package. With Object-oriented structure, each of the UI&nbsp;container classes' APIs function differently from each other.</blockquote> <br />
<br> <br />
<blockquote>'''3. Test package'''</blockquote><blockquote>This package has 2 sub-packages:&nbsp;Core and Tests. In Core package, there are AjaxCommonTest and DesktopInstallUtil classes, while in Test package, there are test classes, which contain test methods (test cases).</blockquote><blockquote>- AjaxCommonTest acts as a parent of Test classes. As TestNG is&nbsp;chosen as test driver for Zimbra selenium project, AjaxCommonTest utilizes and inherits classes from Framework package to build the @BeforeSuite, @BeforeClass, @BeforeMethod, @AfterSuite, @AfterClass, @AfterMethod for framework-level Setup and Teardown respectively, which configurable from config.properties file located inside "conf" folder at project level.</blockquote><blockquote>- DesktopInstallUtil contains methods that are used for Zimbra&nbsp;Desktop Installation and Uninstallation. NOTE: There is a near-future plan of moving this class into Framework-level Utils package.</blockquote><blockquote>- Test classes simply inherit from&nbsp;AjaxCommonTest and contain test methods. The test classes might also have @BeforeMethod and @AfterMethod annotated methods, but they are only limited to UI&nbsp;interactions as part of test setup and cleanup,&nbsp;NOT the framework-level configuration</blockquote><blockquote></blockquote><blockquote>[[Image:ZD Sel Fr.jpg]]</blockquote> <br />
=== <u>How to run it</u><br> ===<br />
<br />
==== Config.properties ====<br />
<br />
To run Zimbra Desktop locally using ant with ZimbraSelenium/build.xml, there are some important elements in config.properties to be set properly:<br> <br />
<br />
- &lt;COMPUTER_NAME&gt;.desktop.test=true <br />
<br />
This parameter is a must. To get the &lt;COMPUTER_NAME&gt;, go to command line console, and type "hostname". Without this paramter set to true, it will run Ajax selenium test. <br />
<br />
<br> <br />
<br />
- ''desktop.productBranch=ZDESKTOP_712'' <br />
<br />
This is to set the product branch, in case the product branch is different (look at zre-matrix column), please change this accordingly (NOTE:&nbsp;keep in mind, '-' is '_' for this parameter).<br> <br />
<br />
<br>''- desktop.forceInstall=true'' <br />
<br />
This is to set whether forceInstallation of Zimbra Desktop will be done. To run with pre-installed Zimbra Desktop build, please set this parameter to false, if other builds are expected, please leave this to true.<br> <br />
<br />
<br>''- desktop.uninstallAfterTest=false'' <br />
<br />
This is to set whether ZD&nbsp;app uninstallation will take place after the test. If cleaning up is expected after the test, please set this to true, otherwise to false. By default this is set to false, so that if there are some bugs, the important information could still be retrieved from the system at the end of test.<br> <br />
<br />
<br> <br />
<br />
''- desktop.buildUrl='' <br />
<br />
Please specify this build URL&nbsp;up to a folder before the binary file, such as:&nbsp;[http://zre-matrix.eng.vmware.com/links/MACOSXx86_10.6/ZDESKTOP-711/20110706070101_ZDESKTOP/ZimbraBuild/i386/ http://zre-matrix.eng.vmware.com/links/MACOSXx86_10.6/ZDESKTOP-711/20110706070101_ZDESKTOP/ZimbraBuild/i386/]&nbsp;. If this is left empty and installation is required (either from desktop.forceInstall=true parameter or no pre-installed Zimbra Desktop), the framework will download and install the latest Zimbra&nbsp;Desktop build from zre-matrix based on the OS and given product name and branch. <br />
<br />
<br> <br />
<br />
==== ZimbraSelenium/build.xml<br> ====<br />
<br />
Target "Run-ExecuteHarnessMain" needs to be fixed up to run ZD&nbsp;properly, please see the underlined word below:<br> <br />
<br />
&nbsp;&lt;target name="Run-ExecuteHarnessMain" depends="jar" description="Run all tests per specified arguments"&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="jarfile" value="${dist.lib.dir}/zimbraselenium.jar"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="pattern" value="projects.<u>'''desktop'''</u>.tests.addressbook"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="groups" value="always,sanity,smoke"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;echo&gt;Executing ...&lt;/echo&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;java classname="framework.core.ExecuteHarnessMain" classpathref="class.path" fork="true" failonerror="true"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;arg line="-j '${jarfile}' -p ${pattern} -g ${groups} -l conf/log4j.properties"/&gt; <br />
&nbsp;&nbsp;&nbsp; &lt;/java&gt;<br />
&nbsp;&lt;/target&gt;<br />
<br />
==== Rest of the steps...<br> ====<br />
<br />
The rest of the steps are exactly similar to http://wiki.zimbra.com/wiki/Testing:_Selenium:_Running_ZimbraSelenium#Running_ZimbraSelenium<br></div>Jhidayathttps://wiki.zimbra.com/index.php?title=Testing:ZimbraDesktop&diff=37034Testing:ZimbraDesktop2011-12-01T18:49:36Z<p>Jhidayat: Created page with "== Important Resources &amp; URLs == *[http://www.zimbra.com/desktop7/help/en_US/Zimbra_Mail_Help.htm http://www.zimbra.com/desktop7/help/en_US/Zimbra_Mail_Help.htm] - Zimbra D..."</p>
<hr />
<div>== Important Resources &amp; URLs ==<br />
<br />
*[http://www.zimbra.com/desktop7/help/en_US/Zimbra_Mail_Help.htm http://www.zimbra.com/desktop7/help/en_US/Zimbra_Mail_Help.htm] - Zimbra Desktop 7 Product Help <br />
*[http://help.zimbra.com/?utm_source=mail&utm_medium=zd&utm_content=7.1.1&utm_campaign=help http://help.zimbra.com/?utm_source=mail&amp;utm_medium=zd&amp;utm_content=7.1.1&amp;utm_campaign=help] - Zimbra&nbsp;Desktop 7 User Help <br />
<br />
<br> <br />
<br />
== Zimbra&nbsp;Desktop Test Information ==<br />
<br />
=== Managers In Charge ===<br />
<br />
*Matthew Rhoades (Palo&nbsp;Alto)&nbsp;- [mailto:matt@zimbra.com matt@zimbra.com] <br />
*Sandesh Almeida&nbsp;(Pune)&nbsp;- [mailto:salmeida@zimbra.com salmeida@zimbra.com]<br />
<br />
<br> <br />
<br />
=== Engineers In Charge&nbsp; ===<br />
<br />
*Jeffry Hidayat (Palo Alto) - [mailto:jhidayat@zimbra.com jhidayat@zimbra.com] <br />
*Rupali Rao (Pune) - [mailto:rrao@vmware.com rrao@vmware.com]<br />
<br />
<br> <br />
<br />
=== Developers In Charge ===<br />
<br />
*David Wang (Palo Alto) - [mailto:dywang@zimbra.com dywang@zimbra.com] <br />
*Jeff Flanigan (Pennsylvania) - [mailto:jflanigan@zimbra.com jflanigan@zimbra.com] <br />
*K Karthikeyan&nbsp;(Palo Alto) - [mailto:kkarthikeyan@zimbra.com kkarthikeyan@zimbra.com]&nbsp;<br />
<br />
<br> <br />
<br />
=== Latest Recommended Builds ===<br />
<br />
==== For 7.1.2 RTM&nbsp;Testing ====<br />
<br />
- Windows: [http://zre-matrix.eng.vmware.com/links/WINDOWS/ZDESKTOP-712/20110910070101_ZDESKTOP/ZimbraBuild/i386/ WINDOWS/ZDESKTOP-712/20110910070101_ZDESKTOP] <br />
<br />
- Linux: [http://zre-matrix.eng.vmware.com/links/RHEL4/ZDESKTOP-712/20110910070101_ZDESKTOP/ZimbraBuild/i386/ RHEL4/ZDESKTOP-712/20110910070101_ZDESKTOP] <br />
<br />
- Mac OS: [http://zre-matrix.eng.vmware.com/links/MACOSXx86_10.6/ZDESKTOP-712/20110910070101_ZDESKTOP/ZimbraBuild/i386/ MACOSXx86_10.6/ZDESKTOP-712/20110910070101_ZDESKTOP] <br />
<br />
<br> <br />
<br />
==== For 7.1.1 RTM&nbsp;Testing ====<br />
<br />
- Windows: [http://zre-matrix.eng.vmware.com/links/WINDOWS/ZDESKTOP-711/20110726070101_ZDESKTOP/ZimbraBuild/i386/ WINDOWS/ZDESKTOP-711/20110726070101_ZDESKTOP] <br />
<br />
- Linux: [http://zre-matrix.eng.vmware.com/links/RHEL4/ZDESKTOP-711/20110726070101_ZDESKTOP/ZimbraBuild/i386/ RHEL4/ZDESKTOP-711/20110726070101_ZDESKTOP] <br />
<br />
- Mac OS: [http://zre-matrix.eng.vmware.com/links/MACOSXx86_10.6/ZDESKTOP-711/20110726070101_ZDESKTOP/ZimbraBuild/i386/ MACOSXx86_10.6/ZDESKTOP-711/20110726070101_ZDESKTOP] <br />
<br />
<br> <br />
<br />
<br />
== Zimbra Desktop Automation: ==<br />
<br />
=== Description:<br> ===<br />
<blockquote>Parallel to&nbsp;Zimbra Ajax Selenium project (with combination of Selenium and TestNG), Zimbra Desktop Automation mainly focuses on front-end interactions, while also&nbsp;utilizes some back-end interactions (using SOAP) for test set-up &amp;&nbsp;teardown, and Zimbra server-backend verification. There are 3 main packages in Zimbra Desktop automation, they are:</blockquote><blockquote>'''1. Framework package'''</blockquote><blockquote>This package contains low level codes including object helper methods, wrapper to native selenium APIs, and framework-level utility APIs. This package is shared with other selenium-related projects, such as Ajax, HTML, and mobile.&nbsp;</blockquote> <br />
<br> <br />
<blockquote>'''2. UI&nbsp;package'''</blockquote><blockquote>This package contains UI&nbsp;container classes, such as Forms, Dialogs, Pages, Trees, and Toaster. These classes utilize and inherit some classes from Framework package. With Object-oriented structure, each of the UI&nbsp;container classes' APIs function differently from each other.</blockquote> <br />
<br> <br />
<blockquote>'''3. Test package'''</blockquote><blockquote>This package has 2 sub-packages:&nbsp;Core and Tests. In Core package, there are AjaxCommonTest and DesktopInstallUtil classes, while in Test package, there are test classes, which contain test methods (test cases).</blockquote><blockquote>- AjaxCommonTest acts as a parent of Test classes. As TestNG is&nbsp;chosen as test driver for Zimbra selenium project, AjaxCommonTest utilizes and inherits classes from Framework package to build the @BeforeSuite, @BeforeClass, @BeforeMethod, @AfterSuite, @AfterClass, @AfterMethod for framework-level Setup and Teardown respectively, which configurable from config.properties file located inside "conf" folder at project level.</blockquote><blockquote>- DesktopInstallUtil contains methods that are used for Zimbra&nbsp;Desktop Installation and Uninstallation. NOTE: There is a near-future plan of moving this class into Framework-level Utils package.</blockquote><blockquote>- Test classes simply inherit from&nbsp;AjaxCommonTest and contain test methods. The test classes might also have @BeforeMethod and @AfterMethod annotated methods, but they are only limited to UI&nbsp;interactions as part of test setup and cleanup,&nbsp;NOT the framework-level configuration</blockquote><blockquote></blockquote><blockquote>[[Image:ZD Sel Fr.jpg]]</blockquote> <br />
=== <u>How to run it</u><br> ===<br />
<br />
==== Config.properties ====<br />
<br />
To run Zimbra Desktop locally using ant with ZimbraSelenium/build.xml, there are some important elements in config.properties to be set properly:<br> <br />
<br />
- &lt;COMPUTER_NAME&gt;.desktop.test=true <br />
<br />
This parameter is a must. To get the &lt;COMPUTER_NAME&gt;, go to command line console, and type "hostname". Without this paramter set to true, it will run Ajax selenium test. <br />
<br />
<br> <br />
<br />
- ''desktop.productBranch=ZDESKTOP_712'' <br />
<br />
This is to set the product branch, in case the product branch is different (look at zre-matrix column), please change this accordingly (NOTE:&nbsp;keep in mind, '-' is '_' for this parameter).<br> <br />
<br />
<br>''- desktop.forceInstall=true'' <br />
<br />
This is to set whether forceInstallation of Zimbra Desktop will be done. To run with pre-installed Zimbra Desktop build, please set this parameter to false, if other builds are expected, please leave this to true.<br> <br />
<br />
<br>''- desktop.uninstallAfterTest=false'' <br />
<br />
This is to set whether ZD&nbsp;app uninstallation will take place after the test. If cleaning up is expected after the test, please set this to true, otherwise to false. By default this is set to false, so that if there are some bugs, the important information could still be retrieved from the system at the end of test.<br> <br />
<br />
<br> <br />
<br />
''- desktop.buildUrl='' <br />
<br />
Please specify this build URL&nbsp;up to a folder before the binary file, such as:&nbsp;[http://zre-matrix.eng.vmware.com/links/MACOSXx86_10.6/ZDESKTOP-711/20110706070101_ZDESKTOP/ZimbraBuild/i386/ http://zre-matrix.eng.vmware.com/links/MACOSXx86_10.6/ZDESKTOP-711/20110706070101_ZDESKTOP/ZimbraBuild/i386/]&nbsp;. If this is left empty and installation is required (either from desktop.forceInstall=true parameter or no pre-installed Zimbra Desktop), the framework will download and install the latest Zimbra&nbsp;Desktop build from zre-matrix based on the OS and given product name and branch. <br />
<br />
<br> <br />
<br />
==== ZimbraSelenium/build.xml<br> ====<br />
<br />
Target "Run-ExecuteHarnessMain" needs to be fixed up to run ZD&nbsp;properly, please see the underlined word below:<br> <br />
<br />
&nbsp;&lt;target name="Run-ExecuteHarnessMain" depends="jar" description="Run all tests per specified arguments"&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="jarfile" value="${dist.lib.dir}/zimbraselenium.jar"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="pattern" value="projects.<u>'''desktop'''</u>.tests.addressbook"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="groups" value="always,sanity,smoke"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;echo&gt;Executing ...&lt;/echo&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;java classname="framework.core.ExecuteHarnessMain" classpathref="class.path" fork="true" failonerror="true"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;arg line="-j '${jarfile}' -p ${pattern} -g ${groups} -l conf/log4j.properties"/&gt; <br />
&nbsp;&nbsp;&nbsp; &lt;/java&gt;<br />
&nbsp;&lt;/target&gt;<br />
<br />
==== Rest of the steps...<br> ====<br />
<br />
The rest of the steps are exactly similar to http://wiki.zimbra.com/wiki/Testing:_Selenium:_Running_ZimbraSelenium#Running_ZimbraSelenium<br></div>Jhidayat