# Connecting Feature File with Data Files

**URL:** <https://forum.katalon.com/t/connecting-feature-file-with-data-files/21874>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [March 25, 2019, 3:35pm UTC](https://forum.katalon.com/t/connecting-feature-file-with-data-files/21874 "2019-03-25T15:35:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinglejangle](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jinglejangle/32/3344_2.png) [@jinglejangle](https://forum.katalon.com/u/jinglejangle)\
**Post date:** [March 25, 2019, 3:35pm UTC](https://forum.katalon.com/t/connecting-feature-file-with-data-files/21874/1 "2019-03-25T15:35:19Z")

</div>

If I have a scenario in a feature file (so in the test suite, I’m just putting the path to the feature):

Given I do this  
When I do that for   
Then this will happen

Examples:  
| specificThing |  
| moon |

How do I modify this to where the specificThing points to a DataFile if the data file was imported from an excel sheet?

For instance for a conceptual understanding of what I’m saying:  
Given I do this  
When I do that for   
Then this will happen

Examples:  
runDataFile(“datafile”)

---

<div class="post-metadata">

**Author:** ![Brian\_Ducson](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brian_ducson/32/603_2.png) [@Brian\_Ducson](https://forum.katalon.com/u/Brian_Ducson)\
**Post date:** [March 26, 2019, 9:10am UTC](https://forum.katalon.com/t/connecting-feature-file-with-data-files/21874/2 "2019-03-26T09:10:31Z")

</div>

You can use ‘specificThink’ as the name of a DataFile. After that, in the step definition, you use API to get the DataFile out, processing its content and do next step.

---

<div class="post-metadata">

**Author:** ![jinglejangle](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jinglejangle/32/3344_2.png) [@jinglejangle](https://forum.katalon.com/u/jinglejangle)\
**Post date:** [March 26, 2019, 12:18pm UTC](https://forum.katalon.com/t/connecting-feature-file-with-data-files/21874/3 "2019-03-26T12:18:30Z")

</div>

I think I was not specific in my original post or maybe I am a bit confused, but I am getting the data from an excel sheet and in the test suite, I am just calling it as a path.

---

<div class="post-metadata">

**Author:** ![Brian\_Ducson](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brian_ducson/32/603_2.png) [@Brian\_Ducson](https://forum.katalon.com/u/Brian_Ducson)\
**Post date:** [March 28, 2019, 2:49am UTC](https://forum.katalon.com/t/connecting-feature-file-with-data-files/21874/4 "2019-03-28T02:49:03Z")

</div>

I think you could try to get the data by using API

> [@How to get the last row count of internal data file automatically using for loop](http://forum.katalon.com/t/how-to-get-the-last-row-count-of-internal-data-file-automatically-using-for-loop/7172):
>
> Hi, I have created a data file of the type Internal Data and that file currently has 4 rows. Can you please help me to get the last row to loop through using For loop.
