Testing: Selenium: Building ZimbraSelenium: Difference between revisions

No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 2: Line 2:


See [[Building_Zimbra_using_Perforce|Building Zimbra]].<br/>
See [[Building_Zimbra_using_Perforce|Building Zimbra]].<br/>
See [[ZimbraSelenium_Overview|Selenium Overview]].<br/>


==Downloading the Code==
==Prerequisites==


===Downloading the Prerequisites===
#Create .zcs-deps directory at your %UserProfile%
#Install ant, ivy, Java1.8+ and set respective environment variables.
#Copy following jar at %UserProfile%/.zcs-deps:


The ZimbraSelenium project depends on the following Zimbra projects:


#ZimbraCommon
    ant-contrib-1.0b1.jar
#ZimbraIM
#ZimbraNative
#ZimbraServer
#ZimbraSoap
#ZimbraTagLib
#ZimbraWebClient


Download the prerequisites:
===Downloading the Dependencies===


<pre>
The zm-selenium project depends on the following Zimbra projects:
export P4PORT=codes.zimbra.com:2666
mkdir -p /home/public/p4
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraCommon/...
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraIM/...
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraNative/...
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraServer/...
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraSoap/...
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraTagLib/...
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraWebClient/...
</pre>


where BRANCH is the release branch to download (e.g. main).  All files will be downloaded to /home/public/p4.
#zimbra-package-stub
#zm-zcs
#zm-mailbox
#zm-web-client
#zm-zimlets


===Downloading ZimbraSelenium===
Clone these projects from github in C:/zimbra/ directory as an example:


Download ZimbraSelenium:
<pre>
cd C:/zimbra/
git clone https://github.com/Zimbra/zimbra-package-stub.git
git clone https://github.com/Zimbra/zm-zcs.git
git clone https://github.com/Zimbra/zm-mailbox.git
git clone https://github.com/Zimbra/zm-web-client.git
git clone https://github.com/Zimbra/zm-zimlets.git
</pre>


Build zm-native and zm-common jar using zm-mailbox repo.
<pre>
<pre>
export P4PORT=codes.zimbra.com:2666
Go to zm-mailbox and build using following command.
mkdir -p /home/public/p4
      ant publish-local-all -Dzimbra.buildinfo.version=8.7.6_GA
./p4 -u public -P public1234 -c public-view sync -f //depot/zcs/BRANCH/ZimbraSelenium/...
 
It will create zm-common.jar and zm-native.jar file
</pre>
</pre>


where BRANCH is the release branch to download (e.g. main).  All files will be downloaded to /home/public/p4.
===Downloading zm-selenium===


==Building ZimbraSelenium using Eclipse==
Clone zm-selenium from github in same folder:


===Java===
<pre>
 
git clone https://github.com/Zimbra/zm-selenium.git
ZimbraSelenium requires [http://www.java.com/download/ java 1.6].  Download and install java.
</pre>


===Eclipse===
==Building zm-selenium using Eclipse==


Download and install [http://www.eclipse.org/downloads/ eclipse IDE].
Download and install latest [http://www.eclipse.org/downloads/ eclipse IDE].


===Build the Code===
===Build the Code===
Line 62: Line 59:
# Create new eclipse workspace
# Create new eclipse workspace
## Open eclipse
## Open eclipse
## Create new workspace in /home/public/p4/BRANCH , where BRANCH is the release branch.
## Create new workspace in C:/zimbra/
# Add all projects to eclipse
# Add zm-selenium project to eclipse
## Select File->New->Project->Java Project
## Select File->New->Project->Java Project
## For "Project Name", enter ZimbraSelenium
## For "Project Name", enter zm-selenium
## Complete these same steps for all the dependency projects (i.e. ZimbraCommon, ZimbraServer, etc.)
# Build zm-selenium
# Build ZimbraSelenium
## Expand the zm-selenium project
## Expand the ZimbraSelenium project
## Select build.xml, right click, select "Run As"->"Ant Build"
## Select build.xml, right click, select "Run As"->"Ant Build"
- it will create 3 jars at ..\zm-selenium\build\dist\lib:
coverage.jar, resources.jar and zimbraselenium.jar


The output in the console should display:
The output in the console will look like:


<pre>
<pre>
...
...
    [copy] Copying 3 files to C:\home\public\p4\main\ZimbraServer\build\attrs-src
compile:
set-buildinfo-vars:
     [echo] Compiling framework...
     [echo] Version: 6.0.2_BETA1_1111 Date: 20100721-1203
     [javac] Compiling 1728 source files to C:\zimbra\zm-selenium\build\classes
do-generate-ldap-config:
     [javac] Compiling 1 source file to C:\home\public\p4\main\ZimbraSelenium\build\classes
jar:
jar:
       [jar] Building jar: C:\home\public\p4\main\ZimbraSelenium\build\dist\zimbra-6.0.0\lib\zimbraselenium.jar
       [jar] Building jar: C:\zimbra\zm-selenium\build\dist\lib\zimbraselenium.jar
BUILD SUCCESSFUL
BUILD SUCCESSFUL
Total time: 19 seconds
Total time: 27 seconds
</pre>
</pre>



Latest revision as of 09:57, 26 May 2017

General Information

See Building Zimbra.

Prerequisites

  1. Create .zcs-deps directory at your %UserProfile%
  2. Install ant, ivy, Java1.8+ and set respective environment variables.
  3. Copy following jar at %UserProfile%/.zcs-deps:


   ant-contrib-1.0b1.jar

Downloading the Dependencies

The zm-selenium project depends on the following Zimbra projects:

  1. zimbra-package-stub
  2. zm-zcs
  3. zm-mailbox
  4. zm-web-client
  5. zm-zimlets

Clone these projects from github in C:/zimbra/ directory as an example:

cd C:/zimbra/
git clone https://github.com/Zimbra/zimbra-package-stub.git
git clone https://github.com/Zimbra/zm-zcs.git
git clone https://github.com/Zimbra/zm-mailbox.git
git clone https://github.com/Zimbra/zm-web-client.git
git clone https://github.com/Zimbra/zm-zimlets.git

Build zm-native and zm-common jar using zm-mailbox repo.

Go to zm-mailbox and build using following command.
      ant publish-local-all -Dzimbra.buildinfo.version=8.7.6_GA

It will create zm-common.jar and zm-native.jar file

Downloading zm-selenium

Clone zm-selenium from github in same folder:

git clone https://github.com/Zimbra/zm-selenium.git

Building zm-selenium using Eclipse

Download and install latest eclipse IDE.

Build the Code

Use the following steps to build the code:

  1. Create new eclipse workspace
    1. Open eclipse
    2. Create new workspace in C:/zimbra/
  2. Add zm-selenium project to eclipse
    1. Select File->New->Project->Java Project
    2. For "Project Name", enter zm-selenium
  3. Build zm-selenium
    1. Expand the zm-selenium project
    2. Select build.xml, right click, select "Run As"->"Ant Build"

- it will create 3 jars at ..\zm-selenium\build\dist\lib: coverage.jar, resources.jar and zimbraselenium.jar

The output in the console will look like:

...
compile:
     [echo] Compiling framework...
    [javac] Compiling 1728 source files to C:\zimbra\zm-selenium\build\classes
jar:
      [jar] Building jar: C:\zimbra\zm-selenium\build\dist\lib\zimbraselenium.jar
BUILD SUCCESSFUL
Total time: 27 seconds

Troubleshooting

Verified Against: unknown Date Created: 11/7/2007
Article ID: https://wiki.zimbra.com/index.php?title=Testing:_Selenium:_Building_ZimbraSelenium Date Modified: 2017-05-26



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search