SharePoint DataSets

SharePoint DataSets

Data stored in SharePoint lists can be easily made available to QTAssistant through SharePoint DataSets. This functionality allows the use of SharePoint as a repository of data to use it as reference and test data in QTAssistant. Typical uses include integration with DataSet-SQL, Test Workspaces, Combinatorial Test Modeling, Query XSD Analysis and Report Designer. The implementation supports disconnected mode by caching SharePoint data in local DataSets.

Multiple lists, from the same or different SharePoint sites can be bundled together in a SharePoint DataSet. Lists with multiple value columns are supported; lookup columns are used to infer relationships between the generated data tables.

A SharePoint DataSet is an XML file which stores connectivity information, selected lists and view names, along with any solutions entered by the user concerning the handling of multiple value columns.

Some QTAssistant components can directly use this file and create a snapshot of SharePoint data on demand. Captured data can be exported in standard .NET DataSet files for reference by other .NET components. QTAssistant automation API allows the user to easily integrate this functionality in custom workflows.

The setup consists of three lists on a SharePoint 2010 installation, loaded with dummy data.

ForLookup1

Definition

Column Name Type of Information Lookup Field/List
Title Single line of text N/A
Description Single line of text N/A

Sample Data

Title Description
Value1 Description of Value1
Value2 Description of Value2
Value3 Description of Value3

Using Lookups

Definition

Column Name Type of Information Lookup Field/List
Title Single line of text N/A
Xref1 Lookup, Allow multiple values Title/ForLookup1
Xref1:Description Lookup Description/ForLookup1
 

Sample Data

Title Xref1 Xref1:Description
C1+2 Value1
Value2
Description of Value1
Description for Value2
C2 Value2 Description for Value2
 

Simple Lookup

Definition

Column Name Type of Information Lookup Field/List
Title Single line of text N/A
Xref Lookup Title/ForLookup1
 

Sample Data

Title Xref
Value1 Value1
 

The SharePoint DataSet command is available as following:

  • QTAssistant Shell: Quick Starters group in Tools tab
  • Query Designer: SharePoint connections, Add, New Configuration 

Query Designer SharePoint connections
Query Designer SharePoint connections
(Click to Enlarge)

The command invokes a configuration wizard. First page collects connectivity information.

SharePoint DataSet Wizard - Connectivity
SharePoint DataSet Wizard - Connectivity
(Click to Enlarge)

Second page is used to select and configure the lists to load. Click the checkbox beside the view you wish to reference. Select only one view per list.

Paging is not currently supported. As a workaround, configure the view to return the whole list of rows.

SharePoint DataSet Wizard - Selecting ForLookup1 list
SharePoint DataSet Wizard - Selecting ForLookup1 list
(Click to Enlarge)

Select the next view/list. Lists without multiple values columns, or that the user is not interested in normalizing, require no additional configuration other then selecting the view.

SharePoint DataSet Wizard - Selecting Simple Lookup list
SharePoint DataSet Wizard - Selecting Simple Lookup list
(Click to Enlarge)

To "normalize" a list with a multivalue column, the user must select an "identifying" column - a columns that is mandatory, and has a unique constraint placed on it.

Setting the identifying column
Setting the identifying column
(Click to Enlarge)

The next step is to configure the normalization of a multivalue column. Click on the view in the left panel. In the right panel, under the MultiValueFields, expand the column to normalize and:

  • Make sure Enabled is set to True
  • Fill the name of the new table to hold the 1-to-many relationship. The "child" entity is the new table.

 

Setting up a multivalue column for denormalization.
Setting up a multivalue column for denormalization.
(Click to Enlarge)

 

The final page of the wizard allows for checking of the information entered. Press finish to create and save the SharePoint DataSet on the disk.

 

SharePoint DataSet Wizard - Confirmation page
SharePoint DataSet Wizard - Confirmation page
(Click to Enlarge)

The generated SharePoint DataSet can be used with DataSet-SQL CREATE DATABASE to extract the data, or directly by Query Designer.