Testing: Selenium: Building ZimbraSelenium
General Information
See Building Zimbra.
See Selenium Overview.
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:
ant-contrib-1.0b1.jar
Downloading the Dependencies
The zm-selenium project depends on the following Zimbra projects:
- zimbra-package-stub
- zm-zcs
- zm-mailbox
- zm-web-client
- 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:
- Create new eclipse workspace
- Open eclipse
- Create new workspace in C:/zimbra/
- Add zm-selenium project to eclipse
- Select File->New->Project->Java Project
- For "Project Name", enter zm-selenium
- Build zm-selenium
- Expand the zm-selenium project
- 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