Running tests in an Eclipse-based environment
You can run tests in Eclipse-based software to run a test case, a test scenario, or a test bucket as a JUnit test suite.
Before you begin
- Ensure the store that you want to test is set up.
- Ensure that the Storefront Test Automation Engine is installed.
Procedure
- In the root of the store's test bucket project, locate the config.properties file. This file stores the configuration properties for running tests.
-
In the config.properties file, change the following properties to reflect
your environment:
- HOSTNAME
- The host name of the store web server.
- STOREURL
- The URL to the root of the store you are testing.
- BROWSER
- The web browser that you are using for your testing, such as Firefox, Chrome, or Internet Explorer.
- ADMIN_USER_NAME
- The site administrator user name.
- ADMIN_PASSWORD
- The site administrator password.
- ALLOW_MODIFY_CHANGE_FLOWS
- Determines whether the change flow options can be changed in a test (true) or not (false).
- PRODUCT_TYPE
- Valid values are TOOLKIT and RUNTIME, with RUNTIME as the default. Identifies if the test is being run against a WebSphere Commerce Toolkit or Runtime server.
- SET_LOGGER
- Valid values are TRUE or FALSE. If set to
TRUE, the frame uses the
logging.properties
file in the root of the project. If set to FALSE, which is the default value, the framework logsINFO
,WARNING
, andSEVERE
to the standard output. It is recommended to set this value to TRUE.
-
Use one of the following scenarios to run your tests:
Option Description Run the entire test bucket - In the Java perspective of your Eclipse-based environment, locate the Package Explorer view and go to the tests directory.
- Locate the AllTests.java class.
- Right-click the AllTests.java class; then, select .
Run a test scenario - In your Eclipse-based environment, open the Package Explorer view and go to the tests scenario directory.
- Right-click the test script that you want to run; then, select .
Run a single test case Note: Since many test cases require data that is created by the FSTOREB2C_00.java test case, it is recommended that you run this test case first to populate the test data.- In your Eclipse-based environment, open the Package Explorer view and go to the tests scenario directory.
- Locate the test scenario that contains the test case you want to run; double-click the test scenario to open it.
- Locate the single test case that you want to run. There is 1 Java method for each test case.
- Right-click the Java method name for the test case; then, select .