Forum Discussion

jeetendra_mitta's avatar
jeetendra_mitta
Occasional Contributor
10 years ago
Solved

Environment variable

I need to test directory path and  test case name. Is there any type of enviroment varible that will helpful for me.
  • Project.Path will give you the directory where your test project resides.  Is that not what you needed?



    Project.TestItems.Current.Name might give you the test name you want.

4 Replies

  • jorgesimoes1983's avatar
    jorgesimoes1983
    Regular Contributor
    Your project path --> Project.Path



    You can create other project variables to hold paths



    by script



    if (Project.Variables.VariableExists("variable1") == false)

    {

    Project.Variables.AddVariable("variable1","String");

    }



    or you can add it directly in Project > Variables
  • jeetendra_mitta's avatar
    jeetendra_mitta
    Occasional Contributor
    Thanks a lot for your quick reply, but I need to built-in enviroment variable by which I can get the test directory path, test case name.
  • Marsha_R's avatar
    Marsha_R
    Champion Level 3
    Project.Path will give you the directory where your test project resides.  Is that not what you needed?



    Project.TestItems.Current.Name might give you the test name you want.