Hi,
I am trying to create an InfoPath/SharePoint based test workflow for our manual testing requirements.
In the past we have had these as Word documents which testers would print and execute manually and then save the results of the test to a sharepoint site for the test manager to track.
I have now converted the test script template to an Infopath form and written some code to automatically save it to a InfoPath library.
As this solution has progressed the test manager would now like to reference Test Data held in a XML document in the Test Script document. So I have set up the Test Data as a Secondary datasource and get all data on form load.
The document structures are as follows:
MAIN DATASOURCE (THE DOCUMENT)
- MyTestTable (Group)
- Name
- ID
- TestType
- Summary (Group)
- TestStatus
- DateCompleted
- Project
- Phase
- DefectIDs
- TestCaseSteps (Group)
- TestCaseTable (Repeating Group)
- StepNumber
- Condition
- Result
- Status
- DefectID
- TestData (Repeating Group)
- Scenario
- Value
SECONDARY DATASOURCE (XML TESTDATA FILE)
- TestData (Group)
- DataSetDescription
- TestDataPair (Repeating Group)
- Scenario (Text - Dropdown list)
- Value (Rich Text - Expression box)
I have laid out the Test Script form in tables as follows:
1) One main table "Test Details" to contain the Name, ID, TestType & all elements of the Summary group.
2) A second table "Test Steps" with repeating rows containing the StepNumber, Condition, Result, TestData, Status & Defect ID elements
3) A "Test Data" repeating Group is set up as a repeating table within the "Test Steps" table above with the Scenario, Value elements.
The Scenario & Value in the main datasource are linked to the Scenario & Value from the Secondary datasource such that on load the Scenario drop down list displays all the scenarios listed in the Secondary source. On selection, the Value Expression box displays the matching value from the Secondary datasource. I have done this using rules and it works fine for a single row.
MY PROBLEM
If I have more than one row in the Test Steps table then, immaterial of which Scenario I select from the drop down box in the row, the value field always fetches the top most scenario from the secondary datasource used in any of the Steps and populates all Value fields in the entire test steps table with the same value. It seems to be because the rules are not referencing by row location from the Secondary datasource for each row in the test script table.
E.g.
Step Condition Result Scenario Value Status DefectID
1 Condition1 Result1 Scn3 Val3
When I enter the next row, the value in the first row changes
1 Condition1 Result1 Scn3 Val1
2 Condition1 Result1 Scn1 Val1
When I enter the 3rd row, it automatically takes the value from the second row
1 Condition1 Result1 Scn3 Val1
2 Condition1 Result1 Scn1 Val1
3 Condition1 Result1 Scn2 Val1
As you can see, the value field for all rows in the repeating table fetch values from the highest Scenario in the source XML (Secondary datasource). Hope I have been clear in my description of the problem.
My questions are around whether it is possible to achieve what I am trying? How do I ensure that the text in the Value ExpressionBox is based on the Scenario that has been selected for the specific row? I am willing to write code if required as I have done some rudimentary JScript code till date.
Any help will be greatly appreciated.
Thanks
Nara
Thanks
Nara Chilluvuri