4 Answers, 1 is accepted
If you would like to create global variables or functions in Test Studio Standalone version that are accessible from all the tests within the test project, you can create a utility class. This class will contain the intended functions or variables.
Let me know if this helps.
Thanks for the reply. I ended up creating my own class in Visual Studio and added it to my tests project folder. I found documentation on how to do this after I created this thread. Which method do you think is best, using my own class like I am doing or using the utility class like you described in your post?
"Because you are using Visual Studio instead of our standalone Test Studio IDE it's actually easier (and IMO better) to use Visual Studio's Add Class feature (see attached screen shot). Then put your static class in this file. You can then reference and use it from your coded steps the same way you would with regular programming. Then you don't have a wasted class or overhead of an empty test."
I was using the Utility Class in the beginning, and it kind of became a bit hairy. I jump back and forth between Visual Studio and the Test Studio IDE (only because the Test Studio IDE code editor lacks a lot of features), but still don't have any issues using the stand alone class.
@Jeff - As Daniel stated, it would be reasonable to use the approach from this article if you are using Test Studio IDE. If you are using Visual Studio, you might find Visual Studio's Add Class feature (as you currently do) much more useful.
@ Daniel - Thank you for sharing your experience.