Getting units and routines in script
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2010
08:54 PM
03-17-2010
08:54 PM
Getting units and routines in script
Hello,
Is there a way to obtain in a script, the list of units from the project, or the list of routines and their units?
I've searched the documentation and i haven't found anything regarding this.
What I'm trying to do, is to call routines in Main unit without previously knowing its name, so adding new routines in new units doesn't force me to change the Main unit in order to allow me to execute them.
Thanks,
John
Is there a way to obtain in a script, the list of units from the project, or the list of routines and their units?
I've searched the documentation and i haven't found anything regarding this.
What I'm trying to do, is to call routines in Main unit without previously knowing its name, so adding new routines in new units doesn't force me to change the Main unit in order to allow me to execute them.
Thanks,
John
just testing...
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2010
11:32 PM
03-17-2010
11:32 PM
As far as I am aware, no, there is no way of doing so.
However, I would suggest that you can get away from having a "Main" unit that executes your code and, instead, utilize Test Items at the project level to execute new tests and routines. Read up on the help topics for test items but you'll find that you'll be able to create a method and then access it directly via the test item in order to execute it when you run your project.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
However, I would suggest that you can get away from having a "Main" unit that executes your code and, instead, utilize Test Items at the project level to execute new tests and routines. Read up on the help topics for test items but you'll find that you'll be able to create a method and then access it directly via the test item in order to execute it when you run your project.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2010
12:27 AM
03-18-2010
12:27 AM
Thank you very much for the advice.
For me using TestItems is not an option, and I think I'll obtain the units by simply reading the files from Script folder and maybe reading their content and parse it to obtain the routines in the Main routine.
Regards,
John
For me using TestItems is not an option, and I think I'll obtain the units by simply reading the files from Script folder and maybe reading their content and parse it to obtain the routines in the Main routine.
Regards,
John
just testing...
