Management Center test automation framework
You can use the test automation framework to write test cases that validate the Management Center model, services, and object definitions. The test framework is not intended to validate Management Center user interface widgets, such as properties views and list views.
https://<host>:8000/lobtools?testdata=/testdata/MyCompany/test.xml
This URL runs the actions in the XML file, test.xml, which is in the following
directory:WCDE_installdir\workspace\LOBTools\WebContent\testdata\MyCompany
storeIdentifier
value for a store to Aurora
, add the
testdata.storeIdentifier=Aurora URL parameter to launch the
test.xml file with these
values:https://<host>:8000/lobtools?testdata=/testdata/MyCompany/test.xml&testdata.storeIdentifier=Aurora
https://<host>:8000/lobtools?testdata=/testdata/MyCompany/test.xml
The automated testing continues until an error occurs or all of the actions are completed. After
automated testing stops, use one of the following methods to find more detailed information about
the execution of each test step:- View the Management Center message console to view any messages about the major steps of your automated testing. For more information, see Recovering from errors.
- If logging and tracing for Management Center is enabled, review the trace.log file to obtain more information about each test step.
XML file structure
By default, HCL Commerce provides test case XML files that you can run to validate your Management Center services and definitions. Some of the test case XML files are included in restricted directories for each Management Center component within the workspace_dir\LOBTools\WebContent\testdata\commerce directory. Do not modify or add test case files to any restricted directories. Add any new test case XML file to directories that are not restricted within the parent testdata directory.
<testcase>
.
Declare actions as children of the root testcase
element by using the <action>
element. Each action element must define the name and package of the action to run. To provide
instructions for the action, declare parameter, <param>
, elements as children of
the <action>
element. Parameter elements use the following attributes:- 1 name
- The name of the parameter.
- 2 value
- The value for the parameter.
storeIdentifier
to be Aurora
. The second
action runs another XML file, test.xml, which is in the
/testdata/commerce/catalog/restricted
directory.
<testcase>
<!-- Set a store value -->
<action name="cmc/automation/AutoSetValueAction">
< param 1 name="valueKey" 2 value="storeIdentifier"/>
< param name="value" value="Aurora"/>
</action>
<!-- Run Catalog tool testcase -->
<action name="cmc/automation/AutoRunTestCaseAction">
<param 1 name="url" 2 value="/testdata/commerce/catalog/restricted/test.xml"/>
</action>
</testcase>