Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
159 views
in Technique[技术] by (71.8m points)

groovy - SOAPUI: Global properties not getting saved when updated from different project testrunner in command line

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...