Lieutenant Commander
Lieutenant Commander
1084 views

How to access the files from the 'Attachment' section of the keyword driven Test properties section while running a test?

Jump to solution

I have a keyword driven test and in the 'Attachment' section of the 'Properties' tab for the test I have attached an Excel file. I need to access this file at run-time to fetch data from it. Will this file be downloaded to the working folder while execution so tat I can access it? If not , What are the other ways to access this file at run time?

 

Note : I already have another excel file defined as the test data source and hence I cannot use that option for this excel file . I basically need to fetch data from both the excel files for my test

 

Regards,

Raghavan.S

0 Likes
2 Solutions

Accepted Solutions
Hi,

best way is to put this Excel into a source control (which can also be a file share) and configure this source control for the Test Container where your KDT is located.

At runtime this file is then checked out on your execution server and you should be able to access it.

Regards,
Florian
Product Owner - Silk

View solution in original post

Hi Raghavan.S,

The attachments you can assign on the properties tab or on step level are accessible during manual test execution only. For automated test execution you will have to do it via the source control.

Regards,
Florian
Product Owner - Silk

View solution in original post

4 Replies
Hi,

best way is to put this Excel into a source control (which can also be a file share) and configure this source control for the Test Container where your KDT is located.

At runtime this file is then checked out on your execution server and you should be able to access it.

Regards,
Florian
Product Owner - Silk

View solution in original post

Lieutenant Commander
Lieutenant Commander
Hi Florian,

Thanks a lot for the quick response. That is exactly what I am going to try out now and I have a source control profile defined for a GIT repository. I was also curious to know if the attachment section would provide a better alternative and if yes, take advantage of it.

Regards,
Raghavan.S
0 Likes
Hi Raghavan.S,

The attachments you can assign on the properties tab or on step level are accessible during manual test execution only. For automated test execution you will have to do it via the source control.

Regards,
Florian
Product Owner - Silk

View solution in original post

Lieutenant Commander
Lieutenant Commander
Hi Florian ,

Thanks again for clarifying that.

Regards,
Raghavan.S
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.