Completed
Last Updated: 04 Apr 2013 07:37 by ADMIN
ADMIN
Ivaylo
Created on: 20 Feb 2013 08:28
Type: Bug Report
0
Data Source Error with data from ExecutionExtension.OnInitializeDataSource()
When using the following coded step and the test is executed the test throws an error:

Code used:

using (SqlConnection conn = new SqlConnection(Data["LanguageDirectorConnectionString"].ToString()))
{
    string sql = String.Format(@"SELECT TInvoiceNo FROM [LanguageDirector].[dbo].[TaskTransactions] WHERE THeaderNumber = '{0}'", headerNo);
    SqlCommand cmd = new SqlCommand(sql, conn);
    
    conn.Open();
    invoiceNo = cmd.ExecuteScalar().ToString();
}

The exeption thrown is:

Failure Information: 
~~~~~~~~~~~~~~~
Exception thrown executing coded step: 'Get Invoice No'.
InnerException:
System.ArgumentException: The extracted variable 'LanguageDirectorConnectionString' does not exist in the store. Make sure there is an extract step that has executed before executing this step.
   at ArtOfTest.Common.Design.Extensibility.ExtractionDataStore.GetValue(String name)
   at ArtOfTest.WebAii.Design.BaseWebAiiTest.TestData.get_Item(String column)
   at Thelittleword_Jobs.Get_Invoice_No.Get_Invoice_No_CodedStep() in c:\Projects\root\TestStudio\TMS\Thelittleword-Jobs\Test Steps\Get Invoice No.tstest.cs:line 83 

Another problem that seems to be releated to the issue is that the connection string is not picked:

Failure Information: 
~~~~~~~~~~~~~~~
Exception thrown executing coded step: 'Check MDS for Is Active Status '.
InnerException:
System.ArgumentException: The extracted variable 'MDS' does not exist in the store. Make sure there is an extract step that has executed before executing this step.
   at ArtOfTest.Common.Design.Extensibility.ExtractionDataStore.GetValue(String name)
   at ArtOfTest.WebAii.Design.BaseWebAiiTest.TestData.get_Item(String column)
   at Salesforce_removal_related.Access_code_can_be_activated_MDS_.Access_code_Is_Active_Status_in_MDS__CodedStep1() in c:\Projects\TestStudio\IMS\IMSGeneral\Salesforce removal related\TI Services\Access code can be activated MDS .tstest.cs:line 69

And some tests are not even executing, only getting the below error.
'30/01/2013 14:30:54' - Using .Net Runtime version: '4.0.30319.269' for tests execution.
'30/01/2013 14:30:54' - Starting execution....
'30/01/2013 14:30:54' - Detected a Silverlight Test. Setting EnableSilverlight=True
'30/01/2013 14:30:58' - Failure detected during execution. Details:
------------------------------------------------------------
'30/01/2013 14:30:58' - System.ArgumentException: Unable to locate data source 'Poppy.dbsrc' at 'C:\Projects\TestStudio\IMS\IMSGeneral\Salesforce removal related\Data'
   at ArtOfTest.WebAii.Design.Execution.DataContext.InitializeDataSource(String outDirectory)
   at ArtOfTest.WebAii.Design.Execution.ExecutionContext.SetCurrentTestAndData(Test test, Boolean canInitializeDataSource)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
   at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)

Files are provided in the internal description of this bug.


1 comment
ADMIN
Konstantin Petkov
Posted on: 20 Mar 2013 11:05
The extension is incorrect - it reads data and doesn't populate all the settings it further relies on. This is the same problem we identified with Plamen in ticket 670343.