Is it possible to use more than one excel for one test Case

Ask general questions here.
NishantSingh
Posts: 39
Joined: Thu Oct 09, 2014 1:15 pm
Location: Bangalore

Is it possible to use more than one excel for one test Case

Post by NishantSingh » Wed Nov 19, 2014 5:47 am

Hi,

Suppose my test case contains 3 recording modules and I want to use 3 different excel sheet for each of the the recording module is there any way to do it. Beacuse I didn't find any option to do it.

As my understanding we can link the excel on test case level and not based on recording module

Please refer screenshot to understand my query.

Regards,
Nishant Singh
You do not have the required permissions to view the files attached to this post.
Regrads,
Nishant Singh

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Is it possible to use more than one excel for one test Case

Post by krstcs » Wed Nov 19, 2014 2:23 pm

No, you cannot use more than one data connector per test case.

Instead, you should make a test case for each recording module and bind the excel sheets to their respective test cases.

Code: Select all

TestCase
    TestCase2 ==> Sheet1
        Recording1
    TestCase3 ==> Sheet2
        Recording2
    TestCase4 ==> Sheet3
        Recording3
Shortcuts usually aren't...

NishantSingh
Posts: 39
Joined: Thu Oct 09, 2014 1:15 pm
Location: Bangalore

Re: Is it possible to use more than one excel for one test Case

Post by NishantSingh » Wed Nov 19, 2014 6:53 pm

Ok, Thanks for the response....
Regrads,
Nishant Singh

User avatar
Broadnick
Certified Professional
Certified Professional
Posts: 29
Joined: Tue Nov 04, 2014 4:18 pm

Re: Is it possible to use more than one excel for one test Case

Post by Broadnick » Wed Jan 07, 2015 2:16 pm

Is it possible to replace the initial DataSource Excel file by another (and refresh the pre-loaded data), using code?

Using this code, I can create a new ExcelConnector and load data from it, but I don't know how to replace already loaded data in the TestCase. Please, help.

Code: Select all

			
if(System.IO.File.Exists(varEnvirnmtPath+"\\"+varDataFileName))
{
	// Now we create the connector itself
	Ranorex.Core.Data.ExcelDataConnector excelConnector = new Ranorex.Core.Data.ExcelDataConnector("AuthenticationData2",varEnvirnmtPath+"\\"+varDataFileName,"Authentication","Auto-Range",System.Windows.Forms.CheckState.Unchecked);
	// Load all Data from the Excel file
	Ranorex.Core.Data.ColumnCollection columnCollection;
	Ranorex.Core.Data.RowCollection rowCollection;
	excelConnector.LoadData(out columnCollection, out rowCollection);
	TestCase.Current.DataContext.ReloadData(true);
}

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Is it possible to use more than one excel for one test Case

Post by krstcs » Wed Jan 07, 2015 2:42 pm

Ranorex loads the data into a cache when the test is started, so you would need to update the cache.


My suggestion would be to use a database (SQL Server Express is free and pretty light-weight) instead of Excel. This will allow you to create stored procedures that return the specific data sets that you want when you want them.
Shortcuts usually aren't...

NishantSingh
Posts: 39
Joined: Thu Oct 09, 2014 1:15 pm
Location: Bangalore

Re: Is it possible to use more than one excel for one test Case

Post by NishantSingh » Wed Jan 14, 2015 7:23 pm

Hi,


Thanks for your valuable and useful suggestion

Regards,
Nishant Singh
Regrads,
Nishant Singh