This project is read-only.

Test the availability of an hierarchy or level in a dimension (through a perspective)

System under test

In order to let you check that an element of a dimension is available through a perspective, you need to stipulate where you'll be looking. This is done by creating a tag named "structure" under the node "system-under-test".
<test>
    <system-under-test>
        <structure/>
    </system-under-test>
</test>
In this node named "structure", you'll need to specify the path to reach the container of the element you're checking availability. This is done by filling the xml attribute named "path" with the unique of your dimension,
<structure path="[MyDimension]"/>
or the hierarchy,
<structure path="[MyDimension].[MyHierarchy]"/>
When done, it'll also be neeeded to specify the perspective through which you'll be executing your test. To do this, fill the xml attribute named "perspective". Note that perspectives have no unique name, so you must fill this information with the perspective's displayname (and so without brackets).
<structure path="[MyDimension].[MyHierarchy]" perspective="myPerspective"/>
Finally, the last information needed is the connectionString to reach your cube. This information must be provided by the means of the xml attribute named "connectionString".
<structure path="[MyDimension].[MyHierarchy]" perspective="myPerspective" 
    connectionString="Provider=MSOLAP.4;Data Source=MyServer;Integrated Security=SSPI;Initial Catalog=MyCube;"/>

Assertion

The assertion consists in a check that the path specified above contains a child with a specific caption (through the given perspective).

So we need to specify that we'll perform an assertion of type "contains":
<test>
    <assert>
        <contains/>
    </assert>
</test>
The we need to specify which caption we're looking for:
<contains caption="MyLevel"/>
If we're checking that the hierarchy named "MyHierarchy" has a level named "MyLevel" then our test should be:
<test>
    <system-under-test>
        <structure 
            path="[MyDimension].[MyHierarchy]"
            perspective="myPerspective" 
            connectionString="Provider=MSOLAP.4;Data Source=MyServer;Integrated Security=SSPI;Initial Catalog=MyCube;"
        />
    </system-under-test>
    <assert>
        <contains caption="MyLevel"/>
    </assert>
</test>

Last edited Jul 31, 2012 at 12:45 PM by Seddryck, version 1

Comments

No comments yet.