cancel
Showing results for 
Search instead for 
Did you mean: 

How can I include resources into a keyword test?

maurus_spescha
Occasional Contributor

How can I include resources into a keyword test?

Hi,



I would like to include resources like external dll, properties files etc. into a keyword test.



How could I do that?
6 REPLIES 6
tristaanogre
Community Hero

RE: How can I include resources into a keyword test?

What do you intend to do with those resources?  Your intention of how they are to be utilized within the keyword test will determine the possibilities of how to utilize them, if they can be.

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
maurus_spescha
Occasional Contributor

RE: How can I include resources into a keyword test?

Hi,



thanks for your replay.



I would like to store everything I need for my tests in the project suite.



An example:



One of my test does an import of data. The data is stored in a file and I would like to store the data file in the project suite.



In this way everything the test needs to run is at one place.



So I do nothing with the things stored in resources. The resources might be used by a test or not.
Andrey_M
Contributor

RE: How can I include resources into a keyword test?

Hi Maurus.



Try to create your custom catalogue in project home directory (where you may store any data you want).

Use  Project.Path property as home directory (relative file addressing makes your project portable).

Using this approach I store my customized logs and archives (which are related to specific project). If I move or copy project to new location, all file addressing schemas work without issue (e.g. TC understands relatively addressed Excel data sources for data driven loops).



For example, my project-specific excel full file name looks like this:



var WorkbookName = Project.Path + "Stat\\" + fileNaming() + ".xlsx";

// fileNaming() is my file name generation function.



maurus_spescha
Occasional Contributor

RE: How can I include resources into a keyword test?

Hi,



many thanks for your answer.



How do I create a custom catalogue?



Andrey_M
Contributor

RE: How can I include resources into a keyword test?

Catalogue can be created manually using OS tools (New Folder) directly in project structure. Actually this catalogue is not visible in your TC project explorer directly, this is why I called it "custom". In addition, all the files you need should be placed into this catalogue manually.
Philip_Baird
Community Expert

RE: How can I include resources into a keyword test?

Hi Maurus, have you tried using the Stores|Files Collection to store your files?



You can then use the Files object to access the stored files.




From your second post, this seems to match your requirements.


 


Regards,


Phil Baird

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors