Get a query from a shared datasets
On the same concept than extracting a query from a dataset conatined in a report, you can directly connect to a shared dataset and extract the query (or stored procedure). To extract the query or stored procedure from a shared dataset, you've the same two options than for a report: connect to a ReportingServer database through sql or parse a **rsd** file on a disk. In both cases, you need to specify the xml element *shared-dataset* in place of the typical xml element *query*.
<system-under-test>
<result-set>
<shared-dataset ... />
</result-set>
</system-under-test>
<shared-dataset
source="Data Source=(local)\SQL2012;Initial Catalog=ReportServer;Integrated Security=True;"
path="/AdventureWorks Sample Reports/"
name="SalesEmployees"
/>
<shared-dataset
path="..\Reports\"
name="SalesEmployees"
/>