问题
I have three different projects in SOAP UI and all share a same global property. Through a Groovy script, I need to execute the test suites in these three projects from command line using testrunner. First project creates a global property and when the test suite in the second project gets executed, the global property is coming as null. I have tried using (S) in the command line to save project but still the same issue. When I manually execute the groovy scripts of these three projects, it works fine.
回答1:
SoapUI processes everything in memory.
When you are running your tests from the GUI, you are able to load multiple projects at a time. Since they are all in memory, they are able to share properties between themselves.
When you are running your tests from the CLI, you are able to reference only one project at a time from the testrunner. Therefore multiple projects cannot share data.
You will have to redesign your test approach. You did not explicitly specify how you are running your tests, and what you are trying to accomplish. But you might be able to pass the information through an environment variable. See documentation.
来源:https://stackoverflow.com/questions/28282321/soapui-global-properties-not-getting-saved-when-updated-from-different-project