dtLocalSheet empty even though excel file contains data - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: dtLocalSheet empty even though excel file contains data (/Thread-dtLocalSheet-empty-even-though-excel-file-contains-data) |
dtLocalSheet empty even though excel file contains data - cantorre - 03-28-2017 Hello everybody, this is my first post I am trying to work with DataTables. My main goal is to set up ALM so that I can point to a resource for my test, so that the test would use that resource (excel file). As I understand, I need to code my tests to use excel resource, and in ALM for the master test I have created a test configuration that overrides test data resources (so I did that). Now what I need is to make my tests correctly use excel resource file My test set up is MasterTest with added ExternalActions: Action1, Action2, Action3 (which are reusable) and several more actions that do not use any parameters I would like those reusable actions (1,2,3) to use a defined excel file (the mentioned resource) What I have done so far: *Master test is configured to use my excel file (File->Settings->Resources-> *Tests are completed, and they are coded to use LocalSheets *Excel file is created and it contains sheets named Action1, Action2, Action3 *Tried adding another sheet with MasterTest's name, but that turned out weird (in run time, excel file had all the sheets' names from MasterTest [which were empty - that includes Action1, Action2, Action3] plus the 3 sheets created by me with data - so Action1, Action2, Action3 were duplicated The problem: In run time, each action has dtLocalSheet empty, even though the names of excel sheets correspond to action names. What should I do, so dtLocalSheets get populated with correct data? Thanks UFT I am using is 12.52 RE: dtLocalSheet empty even though excel file contains data - cantorre - 05-10-2017 The problem was that UFT changes names of actions, when those actions (reusable actions) are used from other actions (master tests). In particular, my Action1 was not really named Action1 anymore, when I included it in maMasterTest. Instead, it's name was Action1 [Reusable Actions]. So what I had to do was to rename excel sheets in that manner. Which caused more problems, because excel sheets' names have a limit of 31 characters. But that's another story RE: dtLocalSheet empty even though excel file contains data - vidhi - 05-10-2017 (05-10-2017, 06:04 AM)cantorre Wrote: The problem was that UFT changes names of actions, when those actions (reusable actions) are used from other actions (master tests). You may just name your Excel sheet as 'Action1' only and append '[Reusable Actions]' at run time to it. |