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:
- WebSphere Commerce Developer
- Rational Application Developer, version 9.5, or higher
- Eclipse, Luna 4.4, or higher
Note:- Automation scripts can be edited and run in the same environment, such as the toolkit environment.
- Ensure that you are using Java 1.8. Java 1.8 is required for the test assets to satisfy Selenium's recommendation for their driver.
- Ensure that one of the following web browsers is installed for test execution:
- Latest Firefox or Firefox ESR
- Internet Explorer 11
- Latest Chrome
- The Selenium driver (which is used by the test assets) maintains compatibility with the most current versions of Firefox, Firefox ESR, and Chrome. As a result, you occasionally need to move up to a new version of Selenium to test against newer browsers.
- Internet Explorer 11 has some instability with long running tests, such as out-of-memory errors. When this occurs, you must restart the testing where the last test failed, or break up the testing into smaller test suites.
- The Selenium driver for Microsoft Edge is not complete. Automated testing against Microsoft Edge is not available currently.
-
Notes:
- The Storefront Test Automation Engine was tested with:
- Firefox 38 ESR or 39
- Internet Explorer 11
- Chrome 46
- If you plan to use Internet Explorer 11, follow the Required Configuration. For more information, see Internet Explorer Required Configuration.
- The Storefront Test Automation Engine was tested with:
- The Storefront Test Automation Assets are dependent upon several third-party libraries. You can
download them manually or use the Ant script that is provided in the topic, to automatically fetch
all of the third-party libraries automatically from the Maven repository. A list of the key
third-party libraries required:
Files to download and extract Versions tested with Storefront Test Automation Engine Notes 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.- Selenium Server 2.48.2
- Selenium Server 2.46.0
- Selenium Server 2.53.1
For the current Selenium Server library, see: Selenium Server. For previous releases, see: Selenium previous releases. HttpClient.zip binary with dependencies archive (.zip) file. - HttpClient 4.5.2
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.6.2 Freemarker Freemarker 2.3.25 Apache Ant if you plan to run tests from the command-line instead of using an Eclipse-based environment Apache Ant 1.9.2 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.
- The Storefront Test Automation Assets provide and calls to Commerce Web Services. For that to
work, you must download the Commerce client library and the dependent libraries that include ICU4J
and several EMF JARs. Download the following files from the WebSphere Commerce Developer machine:
- IBMIMShared\plugins\org.eclipse.emf.ecore.xmi_version.jar
- IBMIMShared\plugins\org.eclipse.emf.ecore.change_version.jar
- IBMIMShared\plugins\org.eclipse.emf.common_version.jar
- IBMIMShared\plugins\org.eclipse.emf_version.jar
- IBMIMShared\plugins\org.eclipse.emf.codegen_version.jar
- IBMIMShared\plugins\org.eclipse.emf.ecore_version.jar
- IBMIMShared\plugins\org.eclipse.xsd_version.jar
- IBMIMShared\plugins\org.eclipse.emf.ecore.sdo_version.jar
- IBMIMShared\plugins\org.eclipse.emf.commonj.sdo_version.jar
- Download all the WebSphere Commerce Client Library JAR files from the WebSphere Commerce
Developer machine:
- WCDE_installdir\WC\Foundation-Core.jar
- WCDE_installdir\WC\Performance-Profiler.jar
- WCDE_installdir\WC\*-DataObjects.jar
- WCDE_installdir\WC\*-Client.jar
- WCDE_installdir\WC\lib\JSON4J.jar
- 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, run the following store setup tasks:
- Copy the JSON4J.jar to your StarterStoreTestAssetsDependencies project.
Procedure
-
Install the Storefront Test Automation Engine.
-
Add WebSphere Commerce dependencies to the
Storefront Test Automation Engine.
-
Expand the lib folder in the
StarterStoreTestAssetsDependencies
project. - Copy the previously downloaded Eclipse EMF JAR files to the lib directory.
- Copy the previously downloaded WebSphere Commerce service layer JAR files to the lib directory.
-
Expand the lib folder in the
-
Add the third-party dependencies to the Storefront Test Automation Engine.
-
Download the web driver for your browser.
Option Description Firefox You do not need to download the Firefox web driver as it is included in selenium. Note: There is a version compatibility issue with each selenium driver. Ensure that the Firefox version is supported by the Selenium version.Internet Explorer - Download the 32-bit IE driver.
- Extract the file to your system.
- In the Aurora-Widget-Wte project, change the
config.properties file to update the following properties:
BROWSER_TYPE=INTERNET_EXPLORER IE_DRIVER_SERVER_PATH=<your IEDriverServer.exe path>
Chrome - Download the latest Chrome driver from Chrome Driver.
- Extract the file to your system.
- In the Aurora-Widget-Wte project, change the
config.properties file to update the following properties:
BROWSER_TYPE=CHROME CHROME_DRIVER_SERVER_PATH=<your chromedriver.exe path>
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 want pixel width.