Develop > Presentation layer


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.

The test automation framework uses an XML file that describes the list of actions to run.

To point to the XML file that contains the actions to run, add a URL parameter named testdata to the Management Center URL. For example:

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_INSTALL\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:


XML file structure

The test automation XML file must contain a root element named testcase. 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>

The test automation framework supports the following actions:


Related concepts

Object definitions

Management Center services


+

Search Tips   |   Advanced Search