How to pass properties between test suites using test runner command line
I am facing an issue, where in my first test suite I am at the last test case I am storing a token I have received in a project property.
The code I am using in my SoapUI script to do so is:
in my next test suit, I am trying to read this property.
I use the following code:
def whRefresh = testRunner.getTestCase().getProject().getPropertyValue("whRefreshToken")
log.info "* * * * : whRefresh=" + whRefresh
when I run the test suites project using the SoapUI GUI, all is working well, and I can see in the debug output console that the token was retrieved successfully.
The problem occurs when I run these tests from command line.
This is the first command line to retrieve the token and store it in the propery:
"C:\Program Files\SmartBear\ReadyAPI-2.2.0\bin\testrunner.bat" -FPDF - -c"UC1: Obtain a WhBearerToken" -f"c:\Test Harnesss\Project Report" "C:\Test Harnesss\Gxp Automated Test Harness Baseline-readyapi-
This is the second command line to retrieve the token from the stored property.
"C:\Program Files\SmartBear\ReadyAPI-2.2.0\bin\testrunner.bat" -FPDF -D -c"Get Token" -f"c:\Test Harnesss\Project Report" "C:\Test Harnesss\Gxp Automated Test Harness Baseline-readyapi-project.xml"
This time I see in the output a different token retrieved from the stored property.
What it does, it actually retrieve the property value that I can also see in the SoapUI properties GUI. I can see in the properties list the token with that old value and not the new value stored due to first command line test suite run.
I guess , I do not pass properties correctly between tests suits.
This is a major blocker for me and won't much appreciate any kind of help.
Thanks in advanced