Details - Additional Documentation Information
Details are a generic data structure used for storing additional (application specific) information inside the Scenarioo documentation.
This details
are simple maps of key-value-pairs. Each entry
in such a details map has a key
and a value
.
The key
is always a simple string (the name of the information).
The value
of such an entry can be of different kinds:
string
: a simple textual informationObjectDescription
(complex type): describes an object with an identity given by atype
(string to group all objects of same kind) and a uniquename
to identify this object of this type (thename
should be unique for all objects of this same type, such that all occurrences of the same object can be identified correctly). Every value of type ObjectDescription will be stored in the Scenarioo object repository, which means, that you can easily browse for all occurrences of this same object with same type and name. Such an object typically can have againdetails
with additional information about the object (this details can again recursively containObjectDescritpion
or any other value types, as listed here).ObjectReference
(complex type): possibility to only store a reference to an object (only bytype
andname
, withoutdetails
), to reference the full object that is already stored in some other place inside the documentation (with all its details as a fullObjectDescription
).ObjectList
: possibility to store a list of values (e.g. as a bullet list). The contained values could be simply strings, or again ofObjectDescription
or any other supported value type, as listed here.ObjectTreeNode
: possibility to store tree structures. Each tree node has anitem
which is the payload of the node, that can be a simple string information or again anObjectDescription
or any other supported value type, as listed here. Furthermore each tree node can again havedetails
for specific additional information about an item (e.g. the item could be anObjectDescription
orObjectReference
and thedetails
of the tree node contain additional information that is only valid for this specific occurrence of this object inside this tree but not belongs to the object itself). Thechildren
are againObjectTreeNode
s (which are the sub trees of the tree).
See also some data structure examples below.
Scenarioo Object Repository: the power of ObjectDescription
s
The Scenarioo Object Repository will index all your objects of type ObjectDescription
inside your documentation (in any places).
You can easily add additional so called "custom object tabs" to the start page of your Scenarioo documentation in the Scenarioo Viewer web app. Such a "custom object tab" let's you browse all objects of one or serveral object types. Through this you can enable all Scenarioo Viewer users to easily find all occurrences of a specific object in your Scenarioo documentation.
Adding Custom Object Tabs to Scenarioo Viewer
By adding custom object tabs to your Scenarioo start page, you can enable browsing all objects of some type(s) (almost the same way as use cases can be browsed on the entry page). This feature currently has to be enabled by adding some XML fragment to your Scenarioo configuration file (config.xml
).
The following XML fragment added to your configuration file, will make all your objects in your Scenarioo documentation of the types listed as <objectTypesToDisplay>
browsable in one searchable object tree inside a new tab called "Calls" on the home page of Scenarioo. This example lists all objects of type "service", "businessOperation" and "uiAction" in one tree, just as you can see it in the Demo of Scenarioo. Also the details properties "description" and "realName" are displayed in the resulting tree table as columns.
<customObjectTabs>
<id>calls</id>
<tabTitle>Calls</tabTitle>
<objectTypesToDisplay>service</objectTypesToDisplay>
<objectTypesToDisplay>businessOperation</objectTypesToDisplay>
<objectTypesToDisplay>uiAction</objectTypesToDisplay>
<customObjectDetailColumns>
<columnTitle>Description</columnTitle>
<propertyKey>description</propertyKey>
</customObjectDetailColumns>
<customObjectDetailColumns>
<columnTitle>Real Name for Service</columnTitle>
<propertyKey>realName</propertyKey>
</customObjectDetailColumns>
</customObjectTabs>
This example is an extract from the demo configuration, for full example configuration file see config.xml
After defining a new tab in the configuration you need to restart the server and reimport your builds to generate the data for the configured tabs. Just go to the "Manage" page and click on the refresh icons behind each build in the tab "Builds" to trigger a reimport.
You can also define more than one such tab, and a tab can also only list objects of one type (just as a list, no tree then).
The default configuration since Scenarioo version 2.0 already comes with two such simple object tabs predefined: Labels and Pages, to list all pages and labels in your documentation. If you upgrade from version 1.x you have to manually enable this two tabs by adding the following to your configuration:
<customObjectTabs>
<id>pages</id>
<tabTitle>Pages</tabTitle>
<objectTypesToDisplay>page</objectTypesToDisplay>
</customObjectTabs>
<customObjectTabs>
<id>labels</id>
<tabTitle>Labels</tabTitle>
<objectTypesToDisplay>label</objectTypesToDisplay>
</customObjectTabs>
In case you are using the default version 2.0 configuration and you do not want to see "Labels" and "Pages" in your documentation, you can remove those tabs by removing this configuration part from your config.xml file and restart the server.
Details Data Structure Examples
Some XML examples to show some example details data as you could write it with a Scenarioo writer into your Scenarioo documentation e.g. on a test step or a test scenario.
Example 1 - Simple String Entries
For adding some simple information, you could simply provide entries with string data as values:
<details>
<entry>
<key>key1</key>
<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">value1</value>
</entry>
<entry>
<key>key2</key>
<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">value2</value>
</entry>
</details>
Example 2 - ObjectList with ObjectDescriptions
You could e.g. add a list of all service calls (as object descriptions) that occur on a step:
<details>
<entry>
<key>Service Calls</key>
<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="objectList">
<items xsi:type="objectDescription">
<name>storeUserSettings</name>
<type>serviceCall</type>
<details>
<entry>
<key>URL</key>
<value xsi:type="xs:string">http://localhost:8080/rest/storeUserSettings</value>
</entry>
<entry>
<key>parameters</key>
<value xsi:type="xs:string">username, settings</value>
</entry>
</details>
</items>
<items xsi:type="objectDescription">
<name>loadNotifications</name>
<type>serviceCall</type>
<details>
<entry>
<key>URL</key>
<value xsi:type="xs:string">http://localhost:8080/rest/notifications</value>
</entry>
<entry>
<key>parameters</key>
<value xsi:type="xs:string">userName</value>
</entry>
</details>
</items>
</value>
</entry>
</details>