Forum Discussion
groovyguy
Community Hero
My example requires the other project to be loaded and open in the current workspace, but it has worked for me. Is that sufficient, or do you need to know this from a project that is not imported and open?
def workspace = context.testCase.testSuite.project.workspace.
def otherProject = workspace.projects["ProjectName"];
def otherName = otherProject.getActiveEnvironment().getName();
log.info(otherName);
archana1
5 years agoOccasional Contributor
Workspace is not working when working from command line. How else can i do it?
- groovyguy5 years agoCommunity Hero
Okay, so you are trying to do this from command line. You are right, latching onto the workspace and another project will not work, because running it with testrunner.bat/testrunner.sh will only load the one project. In that particular instance, I have yet to find a good answer on how to get properties/data from one project to another short of saving them to a common properties file with one project and reading them from another.
Related Content
- 4 years ago
- 3 years ago
- 3 years ago