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; this 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 that is stored in the following
location:WCDE_installdir\workspace\LOBTools\WebContent\testdata\MyCompany
The
test automation framework manages a collection of named values that
can be accessed by the actions specified in the XML file. Named values
are set by the wcfAutoSetValueAction action or by passing in the value
as a URL parameter named testdata.param, where param is
the name of the value. For example, to set a named value named
storeIdentifier
to AdvancedB2BDirect
,
add the testdata.storeIdentifier=AdvancedB2BDirect URL
parameter to launch the test.xml file with these values:https://<host>:8000/lobtools?testdata=/testdata/MyCompany/test.xml&testdata.storeIdentifier=AdvancedB2BDirect
After you log in to the Management Center, the test automation
framework loads the specified XML file and runs the actions contained
in the file. For example, the following URL opens the Management Center
and loads the test.xml test file from the restricted directory:
https://<host>:8000/lobtools?testdata=/testdata/MyCompany/test.xml
The
automated testing continues until an error occurs or all of the actions
have completed. After automated testing stops, you can use one of
the following methods to find more detailed information about the
execution of each test step:- Open the Management Center message console to view messages about the major steps of your automated testing.
- Enable
logging and tracing in the Management Center and use your trace.log file
to obtain more information about the execution of each test step.
The following example shows information contained in a trace.log file
for the wcfAutoRunTestCaseAction test step:
[08/10/09 13:30:08:765 EDT] 0000004c auto I [10/08/09 13:29:45:000 EDT] localhost : wcfAutomationUtil run Automation initiated. [08/10/09 13:30:08:765 EDT] 0000004c auto I [10/08/09 13:29:45:500 EDT] localhost : wcfAutomationUtil executeNext Executing action wcfAutoRunTestCaseAction url=/testdata/commerce/restricted/bvt.xml
XML file structure
The test automation XML file must contain a root element namedtestcase
.
Declare actions as children of the root testcase element using the action
element.
Each action element must define the name of the action to run. To
provide instructions for the action, declare param
elements
as children of the action element. Param elements use the following
parameters:- 1 name
- The name of the parameter.
- 2 value
- The value for the parameter.
The following code snippet shows a test case
that contains two actions. The first action sets a value named
storeIdentifier
to AdvancedB2BDirect
.
The second action runs another XML file located in /testdata/commerce/catalog/restricted/test.xml.<testcase>
<!-- Set a store value -->
<action name="wcfAutoSetValueAction">
< param 1 name="valueKey" 2 value="storeIdentifier"/>
< param name="value" value="AdvancedB2BDirect"/>
</action>
<!-- Run Catalog tool testcase -->
<action name="wcfAutoRunTestCaseAction">
< param 1 name="url" 2 value="/testdata/commerce/catalog/restricted/test.xml"/>
</action>
</testdata>