Ask a Question

Environment variable

SOLVED
jeetendra_mitta
Occasional Contributor

Environment variable

I need to test directory path and  test case name. Is there any type of enviroment varible that will helpful for me.
Jeetendra Mittal
4 REPLIES 4
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
LinkedIn 😄 "A SQL query walks into a bar and sees two tables. Walks up to them and says 'Can I join you?'"
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.
Jeetendra Mittal
Marsha_R
Community Hero

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.

Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
jeetendra_mitta
Occasional Contributor

Thanks a lot.
Jeetendra Mittal
cancel
Showing results for 
Search instead for 
Did you mean: