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>
The attributes to define a *shared-dataset* are mostly the same than for a *report*. For a ReportingServer database connection, you need to define the *source*, *path* and the *name* of this shared-dataset.
<shared-dataset
  source="Data Source=(local)\SQL2012;Initial Catalog=ReportServer;Integrated Security=True;"
  path="/AdventureWorks Sample Reports/"
  name="SalesEmployees"
/>
For a rsd file, the *path* and *name* are enough (and the extension .rsd can be skipped).
<shared-dataset
  path="..\Reports\"
  name="SalesEmployees"
/>