Installing the Storefront Test Automation Engine and its dependencies
The Storefront Test Automation Engine
facilitates the process of writing, maintaining, and running test
scripts.
Before you begin
- Ensure that one of the following three types of Eclipse-based
environments is installed to work with the Storefront Test Automation
Engine and the automation scripts: Note: Automation scripts can be edited and run in the same environment, such as the toolkit environment.
- Ensure that one of the following web browsers is installed for test execution:
Notes:
- The Storefront Test Automation Engine was tested with:
- Firefox 17 ESR and 19
- Internet Explorer 9 and 10
- Firefox 10 and 14
- Internet Explorer 8 and 9
- If you plan to use Internet Explorer to run tests, download the proxy.zip file and extract the proxy.pac file.
- Running tests against the Firefox web browser provides the added benefit of using the Firebug for debugging purposes. For example, you can use the Firebug add-on to help identify the HTML source code that corresponds to a specific storefront element (such as a button or a link) that is referenced by the Storefront Test Automation Engine.
- You can also run the Storefront Test Automation Engine on Safari and Chrome, however, both
require more setup steps. For Chrome:
- Download the Chrome driver.
- Set the path of the Chrome driver in config.properties by using the CHROME_DRIVER_SERVER_PATH property.
- Update the BROWSER_TYPE parameter to CHROME.
Selenium does not provide a general release Safari Driver. They do provide instructions on creating and compiling the Safari Driver. This approach is not tested therefore stability is not known. For information about the Safari driver, see Safari Driver.
- The Storefront Test Automation Engine was tested with:
- Download and extract the following tools and packages. All tools and packages were tested with
the Storefront Test Automation Engine. Note the location where you extract the
files.
Files to download and extract Versions tested with Storefront Test Automation Engine Notes JUnit JUnit is a tool that is used for testing in a Java development environment. The Storefront Test Automation Engine uses JUnit to run the test scripts in the test bucket of your store. Selenium Server Important: You must download the latest version to support the latest web browser versions. Failure to do so might cause tests to fail.To download previous Selenium Server or Selenium RC versions see, Selenium code repository. - HttpClient.zip binary with dependencies archive (.zip) file.
- HttpClient 4.0.1
Some test scripts require setup steps that access WebSphere Commerce Accelerator or IBM Management Center for WebSphere Commerce. To do so, the Storefront Test Automation Engine uses HttpClient to make HTTP calls to the WebSphere Commerce back-end tooling. Google Guice Google Guice 3 Google Gson Google Gson 2.2.4 Freemarker Freemarker 2.3.20 ICU ICU 3.6.1 (Optional) Apache Ant if you plan to run tests from the command-line instead of using an Eclipse-based environment Apache Ant 1.7.0, 1.7.1, and 1.8.1 Ensure that the following conditions are met: - The JAVA_HOME and ANT_HOME environment variables are defined.
- ANT_HOME/bin is in your system PATH.
IBM WebSphere Commerce Starter Store Companion Assets package The compressed file that contains the storefront test assets is included within this package. - Download the following files from the WebSphere
Commerce Developer machine:
- IBM\SDPShared\plugins\org.eclipse.emf.ecore.xmi_version.jar
- IBM\SDPShared\plugins\org.eclipse.emf.ecore.change_version.jar
- IBM\SDPShared\plugins\org.eclipse.emf.common-version.jar
- IBM\SDPShared\plugins\org.eclipse.emf_version.jar
- IBM\SDPShared\plugins\org.eclipse.emf.codegen_version.jar
- IBM\SDPShared\plugins\org.eclipse.emf.ecore_version.jar
- IBM\SDPShared\plugins\org.eclipse.xsd_version.jar
- IBM\SDPShared\plugins\org.eclipse.emf.ecore.sdo_version.jar
- IBM\SDPShared\plugins\org.eclipse.emf.commonj.sdo_version.jar
- IBM\SDPShared\plugins\org.eclipse.emf.com.spring source.junit-3.8.2-jar.jar
- IBM\SDPShared\plugins\org.eclipse.emf.com.FVTWcutlis-8.0.0.0.29-integration-jar.jar
- IBM\SDPShared\plugins\org.eclipse.emf.com.guice-assistedinject-3.0-jar.jar
- IBM\SDPShared\plugins\org.eclipse.emf.com.Guice-3.0-jar.jar
- IBM\SDPShared\plugins\org.eclipse.emf.com.selenium-server-standalone-2.43.1.jarNote: The Selenium standalone jar file must be called before the Selendroid standalone jar file, or the project might fail during runtime.
- IBM\SDPShared\plugins\org.eclipse.emf.com.selendroid-standalone-0.8.0-jar.jar
- com.spring source.unit-3.8.2-jar.jar (placed in
caslfoundations
). - FVTWcutils-8.0.0.0.29-integration-jar.jar (placed in
caslfoundations
). - guise-assisted inject-3.0-jar.jar (placed in the Wte library).
- selenium-server-standalone-2.43.1.jar (placed in the Wte library).
- selenium-standalone-0.8.0.jar (placed in the Wte library).
- Download all the WebSphere Commerce service
layer JAR files from the WebSphere Commerce Developer machine:
- WCDE_installdir\workspace\WC
- Review Compiling JavaServer Page files before you attempt to run any tests. Running test automation scripts without compiling JavaServer Pages on the store might cause long page load times and result in timeout errors.
- To ensure that all the default test cases work correctly, perform the following store setup tasks:
Procedure
- Install the Storefront Test Automation Engine.
- Install the dependencies of the Storefront Test Automation
Engine. The steps for this procedure vary depending on what Feature
Pack you installed and enabled.
Option Description - If you are using Firefox, the Storefront Test Automation
Engine can automatically manage SSL certificate exceptions, such as
accessing your store through HTTPS with an invalid or self-signed
certificate. If you are using Internet Explorer for testing and you
do not have a valid SSL certificate for your store, you must complete
the following steps in Internet Explorer:
Results
The Storefront Test Automation Engine and its dependencies are installed. Instructions for setting up your web browser to run automation scripts are provided.
Tips
and hints:
- Look at the Javadoc for documentation on each package and class for more information.
- To run all the test cases: Aurora-Widget-Wte\com.ibm.commerce.qa.aurora.runners\AllTests.java
- The config.properties file contains all the
user-defined parameters. Change the
HOSTNAME
,STOREURL
, andBROWSER_TYPE
to match your environment. - To run tests in different viewports, update the
WINDOW_WIDTH
to the desired pixel width.