Multiple data sources in sequence
Question: Is it possible to run multiple Data Sources in sequence in one test case, and use a value from the current iteration from the first Data Source result set that runs earlier in sequence to retrieve records from a second Data Source that runs later in the sequence using a single, matching value?
I have attempted to do this but the functional test always fails.
1. These two Data Sources are currently the only two steps in this functional process.
2. It seems as if the second Data Source is using not only data from the current record/iteration from the first Data Source, but rather trying to run the select query in the second Data Source using the entire result set from the first Data Source. I assumed the second Data Source would only use values from the current record/iteration from the first Data Source.
3. I am directly referencing the key value field Property from the first Data Source in the select query in the second Data Source as part of the "Where" clause.
4. There is currently only one entry in each table and the key values in each record are the same value.
Query:
Data Source 1:
Select AutomationTest.AutomationTestId As AutomationTest_AutomationTestId,
AutomationTest.TestName As AutomationTest_TestName
From AutomationTest
Data Source: AutomationTest_Select
Property: AutomationTest_AutomationTestId
DataSource 2:
Select AutomationTestInput.AutomationTestInputId As AutomationTestInput_AutomationTestInputId,
AutomationTestInput.AutomationTestId As AutomationTestInput_AutomationTestId,
AutomationTestInput.InputModel As AutomationTestInput_InputModel,
From AutomationTestInput
Where AutomationTestInput.AutomationTestId = ${AutomationTest_Select#AutomationTest_AutomationTestId}
Error message:
Test Case [EwR - Test Case 1] failed [java.lang.Exception: Failed to prepare the test step [AutomationTestInput_Select]; com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '='.:java.lang.Exception: Failed to prepare the test step [AutomationTestInput_Select]; com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '='.], time taken = 714