Hello All,
I want to save the value of "projectDir" in test suite custom properties. I creeated a param "path" and assigned the value "${projectDir}". When I try to print the value of this I still get $projectDir instead of the actual path. Is there anything I am missing.
Thanks in advance.
Regards,
Manju
Hello Rao,
Below is my scenario:
With groovy script I fetched the value of "projectDir" (context.expand('${projectDir}') ). The output of this was stored in test suite custome property "path". I have one more property variable in the same suite "certPath" for which the value should be ${path}\abc\xyz\ (attached screen shot). Here the "path" varaible value is not evaluated.
The value for certPath may change in future to ${path}\xyz\. I will be suing this variable in many places , so changing in properties will be easier than using groovy. If I use groovy I will end up modifying all the scripts where this path needs changes.
So I have 2 queries here:
1. How to tranfer the property value of "path" to "certPath" ?( both the properties are in same suite)
2. How to use ${projectDir} directly in property instead of exapnding this value in groovy and then saving to property?
Hello Rao,
Thank you for the quick response.
I tried this but it is not working.
Project level property "path" has value "C:\workspace"
Suite level property "projectPath" has value "${#Project#path}"
When I try to print the value of "projectPath" I get "${#Project#path}" instead of the actual value.
Regards,
Manju M Yadav
Hello,
I have had a simular problem. My solution was to use groovy to get the variable to a local variable
and then you could create a new testproperty on testsuite level.
You could also look at this message for local use of the variable:
TestTestTest
Subject | Author | Latest Post |
---|---|---|