Which one to chose as a data source - CSV file or XLS file

59 views
Skip to first unread message

Aditya Aggarwal

unread,
Jul 19, 2015, 12:37:15 PM7/19/15
to webd...@googlegroups.com
Hi,

I am developing a framework wherein data parameterization is to be done.

Now, i am stuck in taking a decision, as what to chose and what not.

1) CSV File
2) XLS File
3) Any other you know and you suggest.

So mainly, what are the prons/cons of using a data file as a CSV file or XLS file.

Many thanks if you can show me some light on this.

Regards
A.A.

sunny sachdeva

unread,
Jul 20, 2015, 1:04:01 AM7/20/15
to webd...@googlegroups.com
Aditya,

CSV is a flat file , hence inserting/modifying data could be a problem. Moreover , if manual team needs to maintain the test data then they might not found it comfortable.

On other hand, CSV can comfortable store large amount of data , so when your data exceeds more than 1M , excel would start giving you loading issues.

At last, it all depends on your requirement, but usually we store data in Database[ Oracle]/

Hope this helps.

Thanks
Sunny

darrell

unread,
Jul 20, 2015, 11:13:53 AM7/20/15
to webd...@googlegroups.com
Not really a question about WebDriver. This is more suited to a forum about test data and test automation in general. I can say that sunny's analysis of the situation is flawed. Inserting/modifying data for a CSV file is no different than editing data in an Excel file. You simply import the CSV file into Excel, edit it, export it to a CSV file.

I have no idea where he came up with the idea that Excel will start having load issues beyond 1M of data. These are more likely limitations of the file system, memory available, etc. and not really a hard and fast rule between CSV and Excel files.

Personally, I have not use data driven test frameworks for over a decade. If I was going to use one I would use CSV. It is not a proprietary format. So I don't have to worry about it changing with different releases of Excel. I can load it into my favourite spreadsheet application on any platform (Windows, Mac, Linux, UNIX), edit it and export it back to CSV with no data loss. I would avoid using a database because it is added complexity and cost. I see no good reason to add this risk to test automation. Adding risk to your production technology stack is bad but sometimes necessary. Adding risk to your test automation technology stack is just wrong.

The only downside to using CSV over other data formats is you have to be careful about how you delimit your fields (columns).

Aditya Aggarwal

unread,
Jul 20, 2015, 11:32:13 PM7/20/15
to webd...@googlegroups.com
First of all apologies for posting this question here. 

Second, thanks guys for replying. 

@Darrel - I was exactly looking for the inputs you provided. Thats very clear.

To add, i am not actually trying to create a Data Driven Frmwk rather a Hybrid Frmwk. But at the same time I was trying to think of what i can use to store my data to execute my test cases over different data set. and that's where my question arose at first place.

Regards,
Aditya
Reply all
Reply to author
Forward
0 new messages