Introduced in Feature Pack 1

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:
      • Feature Pack 6Firefox 17 ESR and 19
      • Feature Pack 6Internet Explorer 9 and 10
      • Feature Pack 5Firefox 10 and 14
      • Feature Pack 5Internet 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:
      1. Download the Chrome driver.
      2. Set the path of the Chrome driver in config.properties by using the CHROME_DRIVER_SERVER_PATH property.
      3. Update the BROWSER_TYPE parameter to CHROME.
      The Chrome driver has stability issues; consider running a subset of no more that 10 test scenarios when you use the Chrome driver.

      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.

  • 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.
    • Introduced in Feature Pack 2 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
    Feature Pack 7ICU 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.
  • Feature Pack 7 or laterDownload 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
    • Feature Pack 8IBM\SDPShared\plugins\org.eclipse.emf.com.spring source.junit-3.8.2-jar.jar
    • Feature Pack 8IBM\SDPShared\plugins\org.eclipse.emf.com.FVTWcutlis-8.0.0.0.29-integration-jar.jar
    • Feature Pack 8IBM\SDPShared\plugins\org.eclipse.emf.com.guice-assistedinject-3.0-jar.jar
    • Feature Pack 8IBM\SDPShared\plugins\org.eclipse.emf.com.Guice-3.0-jar.jar
    • Feature Pack 8IBM\SDPShared\plugins\org.eclipse.emf.com.selenium-server-standalone-2.43.1.jar
      Note: The Selenium standalone jar file must be called before the Selendroid standalone jar file, or the project might fail during runtime.
    • Feature Pack 8IBM\SDPShared\plugins\org.eclipse.emf.com.selendroid-standalone-0.8.0-jar.jar
    • Feature Pack 8com.spring source.unit-3.8.2-jar.jar (placed in caslfoundations).
    • Feature Pack 8FVTWcutils-8.0.0.0.29-integration-jar.jar (placed in caslfoundations).
    • Feature Pack 8guise-assisted inject-3.0-jar.jar (placed in the Wte library).
    • Feature Pack 8selenium-server-standalone-2.43.1.jar (placed in the Wte library).
    • Feature Pack 8selenium-standalone-0.8.0.jar (placed in the Wte library).
    Note the location of the JAR files that you copied.
  • Feature Pack 7 or laterDownload all the WebSphere Commerce service layer JAR files from the WebSphere Commerce Developer machine:
    • WCDE_installdir\workspace\WC
    Note the location of the files that you copied.
  • 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

  1. Install the Storefront Test Automation Engine.
    1. In your Eclipse-based environment, ensure that the Java perspective is open. If it is not, or you are uncertain whether the Java perspective is open, follow these steps:
      1. Select Window > Open Perspective > Other.
      2. Select Java; then click OK.
    2. Select File > Import.
    3. In the Import window, select General > Existing Projects into Workspace; then click Next.
    4. Select Select archive file and then click Browse.
    5. For your Feature Pack, open the Storefront Test Assets compressed file:
    6. For your Feature Pack, select the following projects and then click Finish.
      • Feature Pack 8For Casl: CaslFoundation, FVTUtils, and WTE.
        Note: Delete the test source folders.
      • For Aurora-Test-Wte: Add all of the Wte-lib jar files and the other project folders on the R
      The Storefront Test Automation Engine projects are now in the Eclipse-based environment. Since the library dependencies are not installed yet, the Problems view displays multiple compilation errors. You will resolve these errors in the next step.
  2. Install the dependencies of the Storefront Test Automation Engine. The steps for this procedure vary depending on what Feature Pack you installed and enabled.
    OptionDescription
  3. 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:
    1. Install the CyberVillains certificate authority into the trusted root authorities. The certificate authority is in the system directory that contains the extracted Selenium RC files. More specifically, it is in the selenium-remote-control-version_number\selenium-server-version_number\sslSupport directory. For more information about importing a certificate authority, see Internet Explorer support site.
      Important: Remove the CyberVillains certificate authority from your web browser when tests are not being run. Doing so ensures that certificate exceptions from other sites are raised appropriately, preventing security violations.
    2. Associate the proxy.pac file with the Internet Explorer web browser:
      1. Select Tools > Internet Options.
      2. Click the Connections tab; then click LAN settings to open the local area network (LAN) Settings dialog.
      3. Select the Use automatic configuration script check box.
      4. In the Address field, specify the path for the proxy.pac file with the following format: file://path_to_file/proxy.pac. For example, file://C:/temp/proxy.pac; then click OK.
      5. Click OK to save your settings and then restart your web browser.
      Note: Ensure that you clear the Use automatic configuration script check box when you are not running tests.

Results

The Storefront Test Automation Engine and its dependencies are installed. Instructions for setting up your web browser to run automation scripts are provided.

Feature Pack 7 or laterTips 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, and BROWSER_TYPE to match your environment.
  • To run tests in different viewports, update the WINDOW_WIDTH to the desired pixel width.

What to do next

Import one or more test bucket projects.