Datadriven framework using excel.

2,531 views
Skip to first unread message

Gaurang shah

unread,
Oct 23, 2012, 3:02:55 AM10/23/12
to seleniu...@googlegroups.com, webd...@googlegroups.com

Hi Guys, 
I am currently writing down the open source data driven framework. I am thinking to use Excel for storing/reading data from. I will use POI API for that. however i haven't yet finalize the format of the excel. Before I do that and start writing the code I need your comments on that. 

I have visualize the format as below. 
Data.xls file would have multiple sheet. Overview sheet will contain the name of all the test cases spanned across multiple sheets. 
Overview sheet will have 3 columns as mention below 

TestSheetName

TestCaseName

Result

Login

validLogin

 


Result will be populated after executing each and every case. will help me in re-running parallel testcases. 
Login Sheet will contain following column

TestCaseName

Description

Username

Password

ErrorMsg

validLogin

Testing login

Gaurang

Aaaa

 

    

Now how should I maintain this excel sheet. One sheet per type of testing I mean for smoke - smokedata.xls and for regression - regressiondata.xls.  or any other way ??? 

You comments will be appreciated

Gaurang Shah
Blog: qtp-help.blogspot.com
Mobile:08971944344

Senthilkumar P

unread,
Oct 23, 2012, 11:09:06 AM10/23/12
to seleniu...@googlegroups.com
Hi,

         Look into the below URL. I hope this will help u.

https://groups.google.com/forum/?fromgroups#!topic/selenium-users/HEisNNYwEXg


Regards,
SenthilKumar P

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gulshan Saini

unread,
Oct 23, 2012, 1:12:32 PM10/23/12
to seleniu...@googlegroups.com, webd...@googlegroups.com
Gurang,

I think this is more similar to framework that I developed in my last organization.

Some of drawbacks i found in my own framework
1. There will be lot of excel sheets involved. When i followed this approach I  had many workbooks having lots of work sheets.
It is easy for excel workbook to get corrupted while read/write operations. To oven come this issue I changed my excel worksheets to csv files.
Again increase in maintenance time
2. If we have 1000 of test cases this framework will not be robust
3. You need to keep track of workbook/worksheet (containing testcases and test data) while execution, to update results back in files. Parallel execution can not be done if two text cases are accessing same workbook or worksheet.

I would advise you to create some thing which can be linked with DB,
+ so that read write operations are easy
+ less maintenance is required
+ and we can also utilize those results to create html reports on fly.

Thanks
Gulshan

Peter Gale

unread,
Oct 23, 2012, 1:29:08 PM10/23/12
to Selenium Users
With respect, Gulshan, the issues you encountered are more to do with your implementation of a framework based around the use of Excel than intrinsic problems with using Excel in itself.


Date: Tue, 23 Oct 2012 10:12:32 -0700
From: gulsha...@gmail.com
To: seleniu...@googlegroups.com
CC: webd...@googlegroups.com
Subject: [selenium-users] Re: Datadriven framework using excel.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/u-nf_CXv_r8J.

darrell

unread,
Oct 24, 2012, 12:32:27 AM10/24/12
to webd...@googlegroups.com, seleniu...@googlegroups.com
Not really a question about WebDriver. This is really all about creating a test framework. You might want to post your question in a more appropriate location, e.g. http://www.softwaretestingclub.com/forum.

As a quick note, maintenance will make or break your framework. If it is hard to maintain then it will fail to be maintaining and become unused. Standard software engineering rules apply. For example, if you have the same piece of 'code' in more than one place, it means you need to refactor the code into one function called twice. In a data driven test framework this means if you have a smoke test spreadsheet and a regression spreadsheet whether both sheets have the 'code' to log into the application, you need to put the 'code' to log in to the application in a central location (library?) and have the concept of calling it from the smoke test and regression spreadsheets.

Darrell

P.S. data driven frameworks have been around for decades. Don't re-invent the concept again.

Mark Collin

unread,
Oct 24, 2012, 1:33:46 AM10/24/12
to seleniu...@googlegroups.com

I would add +1 to the don’t reinvent the wheel.

 

At the Selenium Conference this year there were at least 4 different Excel driven test frameworks that I came across. 

 

Personally anything driven from Excel is instantly added to my shit list because it’s going to be very hard to maintain.  There seems to be this strange idea floating around that if you drive a test framework from Excel it will instantly turn all the manual testers into automated testers, and that having manual testers spend all of their time maintaining an Excel spreadsheet is a good idea…

 

In my opinion:

 

·         You can’t turn manual testers into automated testers by making a framework driven from Excel spreadsheets, don’t try to do this!

·         If your manual testers are spending all their time maintaining an Excel spreadsheet you are wasting your manual resource, they should be actually performing manual testing.

·         Generally, any automated test framework based around Excel is invariably a waste of time and effort.

 

Remember that the whole point of test automation is to free up the manual testers from performing boring and repetitive regression testing so that they can perform exploratory testing and actually find all the bugs in the system.

 

From: seleniu...@googlegroups.com [mailto:seleniu...@googlegroups.com] On Behalf Of darrell
Sent: 24 October 2012 05:32
To: webd...@googlegroups.com
Cc: seleniu...@googlegroups.com
Subject: [selenium-users] Re: Datadriven framework using excel.

 

Not really a question about WebDriver. This is really all about creating a test framework. You might want to post your question in a more appropriate location, e.g. http://www.softwaretestingclub.com/forum.

--

You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/YEA-7pTiIMcJ.

Gaurang shah

unread,
Oct 26, 2012, 3:32:27 AM10/26/12
to seleniu...@googlegroups.com
Hi All, 

From your post one thing I have figure out is, Excel is not a good thing for datadriven approach.. Then what should I use instead ?? 

Gaurang shah

unread,
Oct 29, 2012, 2:15:33 AM10/29/12
to seleniu...@googlegroups.com
come on guys, I need you comments, what would be the best for designing data driven framework if not Excel ???

Asiq Ahamed

unread,
Jun 4, 2013, 2:26:49 PM6/4/13
to seleniu...@googlegroups.com
@Gaurang

Why don't you try Fillo to query Excel files (xls & xlsx) for different sheets? 

www.codoid.com/products/view/2/29‎ 

Fillo fillo=new Fillo(); 

Connection connection=fillo.getConnection("C:\\Test.xlsx"); 

String strQuery="select * from [Sheet1] where [ID]='100'"; 

Recordset recordset=connection.executeQuery(strQuery); 

while(recordset.hasNext()){ 

System.out.println(recordset.getField("Details")); 

recordset.moveNext(); 


recordset.close();

David Lai

unread,
Jun 4, 2013, 7:42:44 PM6/4/13
to seleniu...@googlegroups.com, webd...@googlegroups.com
Sad thing is I've created 2 for previous jobs, neither are open source.  I wish you luck.  

I see the advantages and disadvantages.  Personally I don't like KW frameworks anymore.  I think it flattens the programming language and you lose the ability to express more complex programming patterns such as Abstract factories, Chain Pattern, and a whole host of patterns dealing with parallelism and scheduling.  This makes KW tests very hard to scale.  This makes it hard to deploy KW frameworks in any sort of serious CI environment that supports automatic branching.

But from and readability perspective, KW frameworks are pretty awesome, especially if you create one that supports indenting to express large complex form data, and Hashtags (like use # to generate data, then '@' tags to retrieved last generated value) to represent generated data.

For example...

Fill Form:
               First Name:  Bob
               Last Name:  Big boy
               SSN: 123-456-789
               Tel:      #RandomTel
               Address: #Num5 + ' Main St.'
Submit

Verify Info:
               First Name:  Bob
               Last Name:  Big boy
               SSN: 123-456-789
               Tel:      @RandomTel
               Address: @Num5 + ' Main St.'



But if you have questions about how such and such can be implemented, I'll be happy to answer.  

David Lai

unread,
Jun 4, 2013, 7:50:05 PM6/4/13
to seleniu...@googlegroups.com, webd...@googlegroups.com
BTW.. Google's Robot framework is pretty good for a Basic KW framework.  You might want to look at their runtime and exception handling for a reference on how to deal with that sort of thing.  It basically uses HTML tables, so it's cross platform and uses no proprietary tech.  I don't like it compared to other KW frameworks (include those I've designed).

Cognizant's CRAFT is a pretty good too.  They're a proprietary framework that's cross tool that's KW based.  The last KW framework I designed, used it as a base, then I replaced it with my own parser and lexxer for processing the indentation grammer, and replaced the exception handling stack with my own.  But their reporting framework is pretty good.


Srisowrabha Kumar

unread,
Jun 6, 2013, 5:44:56 AM6/6/13
to seleniu...@googlegroups.com
Hi Mark,

That's a very valid point you have put across. Please share any video clip you have on this talk, held at the conference. This will help in understanding the concept of automation.

Thanks,

Sowrabha

Automation Testing Utilities

unread,
Jun 23, 2013, 7:34:16 AM6/23/13
to seleniu...@googlegroups.com, webd...@googlegroups.com
Hello There...

An Open Source Data Driven Framework that is developed for selenium is available at our Blog

http://automationtestingutilities.blogspot.in/


Thanks
Automation Testing Utilities

Avikash Gorka

unread,
Jun 24, 2013, 11:31:39 PM6/24/13
to Selenium Users
Gaurang,

Go with Database approach.
Create database depending upon your Framework architecture. Create some UI (Web based) for your framework. It will surely take some time, but it will be a full solution.
We have already done something like this, and it is working fine for us. Earlier, we were also using excel as an interface for our framework. And really there are a lot of issues with excel. I endorse all the points against excel in this mail chain, especially that of Mark.

Regards,
Avikash


Thanks & Regards,

Avikash Gorka
Sr Test Engineer



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages