How to write script for testing in SOAP UI
I am new to SOAP UI. Can anyone please tell me how to write a script in Soap UI. I want to print a message and then call a method using this script.
Thanks in advance,
Re: How to write script for testing in SOAP UI
Information provided by you is so abstract to me. Let me try to answer your question based on my understanding.
SOAPUI use groovy script so you can do most of the task by using groovy script.
Within the scope of a functional testing, the following scripting possibilities are available:
1. Script TestSteps in a TestCase
2. Setup and TearDown scripts at the Project, TestSuite and TestCase level
3. Script PropertyExpansions in any context being evaluated during Test execution
4. Project-level Event Handlers for events related to Test Execution
Get More info on below web site.
Specific to your Question:
1) Print message :
in groovy we have , Println command.
OR you can use log.info to print
context.myProperty = "Hello Test"
log.info( context.myProperty )
2) Call method:
You can do it by using testRunner command.
testRunner.runTestStepByName("Test Step Name")
Note: Groovy script must be added at test case level where test step is located.
I hope this will help you.