Where is CURDIR_OF_ROBOT_FILE

I appologize for the n00bness of the question, but I just started with robotfw yesterday.

Everything was working fine, until I moved by keywords into a (central) resource file, since then the CURDIR variable changed to where the keywords-file was located.

So, the question is whether my reading skills are actually that poor, or if there really isnt a variable that points to the directory of the testcase of the currently executing .robot file?

I have ${TEST NAME}, etc, and I assume if I fiddle around with various regexps, etc, I can solve it, but such a basic parameter amazes me that it isnt pre-defined??

So to clarify, my problem is that when a testcase in simple_factory_calls, runs a keyword defined in main_keywords.resource, I need a reference to the directory test/bt/simple_factory_calls.

tests/bt/
β”œβ”€β”€ main_keywords.resource
β”œβ”€β”€ refer_scenarios
β”‚   β”œβ”€β”€ FailedRefer.robot
β”‚   β”œβ”€β”€ ReferNoReferTo.xml
β”œβ”€β”€ simple_factory_calls
     β”œβ”€β”€ ConfCreation_Factory.robot
     β”œβ”€β”€ ConfFactoryRedirectCancel.xml
     β”œβ”€β”€ ConfFactoryRedirectCompleteCall.xml

Br,
Taisto

Not one to judge your reading skills since I don’t remember if someone pointed it out to me or did I find it myself, but there is ${EXECDIR} :slight_smile:

But then again it depends on where the command is executed

I myself maintain the ${CURDIR} path for all my resource files, so I can execute tests from any place.

http://robotframework.org/robotframework/2.9b2/RobotFrameworkUserGuide.html#operating-system-variables

1 Like

The EXECDIR fails unfortunately, since I am running the robot command directly from the repo root, a la robot test/bt, which means that the EXECDIR points to the gitrepo root dir.

I realised that I can of course, from the testcase.robot file itself, supply the CURDIR as a parameter β€œinto” the Keyword, but still, the parameter I am after felt so obvious that I started thinking that I am just stupid when I cant find it.

TQ