Skip to content

zm-selenium for Zimbra Collaboration Suite, FOSS Edition

Notifications You must be signed in to change notification settings

Zimbra/zm-selenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building zm-selenium

  1. Create .zcs-deps directory at your %UserProfile%.
  2. Install ant, ivy, Java1.8+ and set respective environment variables.
  3. Download ant-contrib-1.0b1 jar file from below URL put into %UserProfile%/.zcs-deps location.
https://files.zimbra.com/repository/ant-contrib/ant-contrib-1.0b1.jar
  1. Clone following git repos:
git clone https://github.com/Zimbra/zm-mailbox.git
git clone https://github.com/Zimbra/zm-ajax.git
git clone https://github.com/Zimbra/zm-web-client.git
git clone https://github.com/Zimbra/zm-zimlets.git
git clone https://github.com/Zimbra/zm-selenium.git
  1. 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=9.0.0_GA
  • It will create zm-native.jar and zm-common.jar file
  1. Build zm-selenium using the following command:
cd zm-selenium
ant clean download-ivy init-ivy selenium-staf-package

It will create 3 jars at zm-selenium\build\dist\lib:

coverage.jar
resources.jar
ZimbraSelenium.jar
  1. You can run testcases using build.xml or by adding debug confirmation run.
ant Run-ExecuteHarnessMain -Dpattern ajax.tests.mail.folders -Dgroups always,smoke1

Executing selenium testcases through Eclipse

  1. Download JDK 1.8.0_291 using https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html#license-lightbox (create oracle account) and install it.

  2. Download latest Eclipse IDE for e.g. https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2022-03/R/eclipse-java-2022-03-R-win32-x86_64.zip

  • Go to Help > Check for updates and update it.
  • Go to Help -> Eclipse Marketplace -> Search testng -> Install
  • Go to Help -> Eclipse Marketplace -> Search ivyde -> Install

image

  1. In Eclipse, everywhere select JDK 1.8.0_291 as alternative JRE.

image

image

  1. Set system environment variable JAVA_HOME (please replace path according to your OS).
JAVA_HOME: C:\Program Files\Java\jdk1.8.0_291
  1. Add java bin path system environment variable (please replace path according to your OS).
path: C:\Program Files\Java\jdk1.8.0_291\bin
  1. In Eclipse, right click to build.xml -> Debug as -> Add targets:
clean, download-ivy, init-ivy, selenium-staf-package (in order)

Debug it -> It will create the jar and packages.

  1. Modify testcase group from smoke to smoke1 to run atleast one testcase. In below command, you can modify test pattern. For e.g.
test pattern from com.zimbra.qa.selenium.projects.ajax.tests to com.zimbra.qa.selenium.projects.ajax.tests.contacts
test group from smoke to smoke1 to any test for e.g. projects -> ajax -> tests -> contacts -> contacts -> CreateContact.ClickContact_01()
  1. Select Debug toolbar button -> Select Debug Configurations -> Right click to Java Application -> New Configuration:

Name:

test

Main class:

com.zimbra.qa.selenium.framework.core.ExecuteHarnessMain

Arguments -> Program arguments:

-j C:\git\zm-selenium\build\dist\lib\ZimbraSelenium.jar -p com.zimbra.qa.selenium.projects.ajax.tests -g always,smoke1,bhr1,sanity1,functional1 -l conf/log4j.properties -r 3 -v 9.0.0.NETWORK

JRE:

jdk1.8.0_291

Note: You should use 'configure' test group first time running the test to create server data like testdomain.com domain, galsync and globaladmin account. Argument will become like below and later you can remove configure test group.

-j C:\git\zm-selenium\build\dist\lib\ZimbraSelenium.jar -p com.zimbra.qa.selenium.projects.ajax.tests -g always,configure,smoke1,bhr1,sanity1,functional1 -l conf/log4j.properties -r 3 -v 9.0.0.NETWORK
  1. Click to Debug Test toolbar button -> Select test to execute the tests.

image

  1. Test would be executed and you will get result like:
Total Tests:   1
Total Passed:  1
Total Failed:  0
Total Skipped: 0
Total Retried: 0

About

zm-selenium for Zimbra Collaboration Suite, FOSS Edition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published