Forum Discussion

ebodien's avatar
ebodien
Contributor
12 years ago

Reading ProjectSuite name

I need to read the name of the current project suite in order to define where to save test run data.  This is for a Manual test project; I am defining an OnStartTest event to capture user information.  As the event will be used in multiple projects I want to be able to read the current name rather than having to upate the location manually each time a new project suite is made.  I've explored the ProjectSuiteFileName property but am unclear from the given example how to read this without first having to define the project suite name manually.
  • Hi Eero,



    I haven't used a manual test project, but to check the current project name from scripting you just have to access:



    Project.FileName



    Instead of:



    ProjectSuite.FileName



    You can check if that option is available in manual test project.



    Remember that it will give you the project file name as it says, not the current project name (so if you renamed it, it won't match)



    Hope it helped!
  • Hi Eero,



    I haven't used a manual test project, but to check the current project name from scripting you just have to access:



    Project.FileName



    Instead of:



    ProjectSuite.FileName



    You can check if that option is available in manual test project.



    Remember that it will give you the project file name as it says, not the current project name (so if you renamed it, it won't match)



    Hope it helped!
  • It did, I was looking in the wrong direction.  I'd found the ScriptRoutineObj.ProjectSuiteFileName example in the Help files and they didn't answer my quetions.  However based on your comment the ProjectSuite.FileName is precisely what I was looking for.