Qaf: excel xlsx file support

Created on 9 Sep 2016  ·  17Comments  ·  Source: qmetry/qaf

p1 feature data-driven

Most helpful comment

This feature is not in priority for now. Please let us know if it is must have feature.

All 17 comments

Hi @cjayswal have you already added support for xlsx in qaf?

This feature is not in priority for now. Please let us know if it is must have feature.

Hi @cjayswal in my case I receive XLSX file directly from business. I need to pick data from XLSX sheet and do the automation. But as XLSX is not supported I need to change the excel format to XLS. It is good to have support for XLSX too. Or else is there anyway to make custom implementation of XLSX for now.

Hi Rupak,

Yes there is a way to make custom implementation for data provider.

Here is an example provided in https://github.com/qmetry/qaf/issues/82

How do I upvote this issue ?

You can click on emoji and select thumb up as upvote to comment.

+1 for this feature to support xlsx

This is a must have feature because of the xls format limitation of maximum 256 columns allowed. There are cases in which there are more than 256 columns of data needed and for that we need xlsx format.

Upvoting on this once again . We are using qmetry with excel file as our data source.
Problem statement : We maintain our data sheets in share point so that Testers/BA's can collaborate and add test data.
Value add for supporting xlsx format for data:

  1. Only xlsx format is allowed on share point for collaboration.
  2. Cannot ask BA's and other project stakeholders to use old(xls) format just because our framework does not support
  3. xlsx is much light weight than the older format --> This becomes very essential when having large size test suites having multiple files as your data source

Upvoting the support for this feature. Just ran into this XLS file's 256-column limitation on my current project - end-to-end test with voluminous test data. Hope this support will be implemented soon.

Thanks @cjayswal for closing this. Is the fix available on current 3.0.0 version or it will be available on new version?

This feature will be available with next release.

Thanks @cjayswal for closing this. Is the fix available on current 3.0.0 version or it will be available on new version?

Hi there! While waiting for the next release, you may want to try to manually add the necessary classes and dependencies to your project:

  1. Add QAFInetrceptableDataProvider.java class _(is this class name misspelled?)_ to package com.qmetry.qaf.automation.testng.dataprovider
  2. Add PoiExcelUtil.java class to package com.qmetry.qaf.automation.util
  3. Add the following dependencies:

    • apache poi v4.1.2

    • apache poi-ooxml v4.1.2

    • apache poi commons-collections4 v4.4

Note that I made this to work on my current project and you might encounter the _"Label [tableName] for ending data range not found in sheet [sheetName]"_ error as you update your XLSX file and upon running a test. I simply did insert/delete a column before your data table in your XLSX data file to fix that error.

Hope this helps!

Thanks, @cjayswal and @amitbhoraniya for closing this issue!

Thanks @darkzcythe. As you have started to use this feature, let us know if you find any issue. So we can fix it before next release.

Thanks @cjayswal for closing this. Is the fix available on current 3.0.0 version or it will be available on new version?

Hi there! While waiting for the next release, you may want to try to manually add the necessary classes and dependencies to your project:

  1. Add QAFInetrceptableDataProvider.java class _(is this class name misspelled?)_ to package com.qmetry.qaf.automation.testng.dataprovider
  2. Add PoiExcelUtil.java class to package com.qmetry.qaf.automation.util
  3. Add the following dependencies:
  • apache poi v4.1.2
  • apache poi-ooxml v4.1.2
  • apache poi commons-collections4 v4.4

Note that I made this to work on my current project and you might encounter the _"Label [tableName] for ending data range not found in sheet [sheetName]"_ error as you update your XLSX file and upon running a test. I simply did insert/delete a column before your data table in your XLSX data file to fix that error.

Hope this helps!

Thanks, @cjayswal and @amitbhoraniya for closing this issue!

Thanks @darkzcythe for explaining. Do you have any git repo for the XLSX example. It would be great.

Thanks @darkzcythe. As you have started to use this feature, let us know if you find any issue. So we can fix it before next release.

Sure thing, @amitbhoraniya !

The only issue I am encountering, so far, as I have mentioned, is when I made change(s) or update(s) to the data in the xlsx test data file or on the data table, like add/remove a column or change a data in a cell or cells, the _"Label [tableName] for ending data range not found in sheet [sheetName]"_ console error occurs when I run the XML test runner.

Currently I have already 400+ columns of test data for a single test scenario (an end-to-end script) and is a separate data file from other tests (I kept the XLS data file for tests with 256 or below test data), so that those other tests will not be affected in case the said XLSX error occured. And when I encounter the said issue when I ran the test with the XLSX data file, I simply do:

  • a) add or remove a blank column to the _LEFT_ of the data table _(left of your "key" data table keyword)_
  • b) add or remove a blank row _ABOVE_ the data table
  • or do both a) and b)

which is kind of tedious and your test will be prone to error if ever you missed to do the given temporary fix. Hope you can provide a permanent fix for this. Thank you!

@rupakgithub - Sorry but I don't have a public git repo to share this with you. Although, if you have an existing project - qaf framework, you can just follow the steps I have already given to try it out.

@amitbhoraniya @cjayswal @reidleingod
I tried to run following the above implementation for .xlsx as a driver file. I am able to run my tests. But it fails to run as a data provider that is I am unable to run one scenario n times with n number of possible combinations of rows using the existing key feature of QAF. Please guide on its implementation. With .xls key feature works fine to run tests n times with n rows with a start key and end key added to it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

APrem picture APrem  ·  7Comments

raviguptasmarsh picture raviguptasmarsh  ·  8Comments

BChitrakannan picture BChitrakannan  ·  9Comments

Rupak-66 picture Rupak-66  ·  12Comments

Nandesh7 picture Nandesh7  ·  8Comments