Thursday, 30 August 2012

QC: using Datatables within BPT Components

Here's a quick tutorial (with awesome mspaint screen-shot narrative assistance) on loading test data from an excel spreadsheet in to a QC/ALM BPT Component.

At a high level we add the data in to QC, associate the data with a test, and then use the data in the test. Read on for the breakdown on what this involves:

1)      Upload data to QC > Test Resource area, to a new asset termed ‘Data Table’ (don't ping me on the lack of variable naming consistency - this is just a rushed example).


a.       The data must be in the format where the data(/variable) name is across row 1, and the actual data values are contained on row 2
b.      I assume this is data driven (I have not tested this) meaning you could have data on rows 2, 3, 4, …, n, and this would just result in the test being called multiple times.


2)      In QC > Test Plan > Some Test > Parameters tab
a.       In Data Resource, locate your recently uploaded spreadsheet
b.      Add new test parameters
c.       Map parameters

That looks like:


3)      In your Test > Test Script tab
a.       Plug in your parameters here, but clicking on the iterations hyperlink




And now you’re done.


A note on QC/ALM11 behaviour. Ensure ‘Automatic Runner’ is closed and re-launched from Test Lab for data changes to be applied.

2 comments:

  1. Hi,

    Why I just see the columns from the Global sheet when trying to map the input parameter in the dropdown fron the 'Resource Parameter Name' column.

    How to select from another sheet?

    Regards

    Alfonso

    ReplyDelete
  2. Hi Alfonso, in brief I'm not actually sure, and I don't have access to a QC instance to play around.
    Good luck solving :)

    ReplyDelete

Robot Framework, Basic Setup

Plug: Robot Framework is quick to setup, easy to write tests for, and super fast to triage failures in. The last point really sets it apart...