SoapUI 3.6 introduced web-testing capabilities that allow you to record web usage from inside SoapUI and the replay the recorded scenario as standard SoapUI functional test.
Please do keep in mind that the recording functionality will only record GET requests. It will not record mouse clicks, keystrokes, cookies, POST traffic, etc.
Let’s start with a quick walkthrough to create a simple Web TestCase.
1. Create your Project
Start by creating a new SoapUI project:
2. Specify Web Page Address
Make sure you select the "Create Web TestCase" option at the bottom, the next dialog shown will be
Here specify the web address at which you want to start recording and press OK.
3. Start Recording!
SoapUI will now create a default TestSuite/TestCase/HTTP TestStep setup and open the HTTP TestStep window in recording mode:
(to the left you can see the generated objects, to the right the HTTP TestStep window with the specified web page).
4. Record your Actions
Now just click around the website as desired, you will see SoapUI adding a new HTTP TestStep for each new page in the TestCase to the left:
5. Stop Recording
When you are finished click the red recording button on top of the browser to finish recording
SoapUI will stop recording your browser actions (press the button again if you change your mind).
6. Replay your TestCase
Now open the created TestCase by double-clicking it in the Navigator to the left, you will get the TestCase window which allows you to run the recorded TestSteps by clicking the green arrow in the top right:
As you can see from the log, SoapUI ran test TestCase and submitted all the recorded requests in order, just like we submitted
7. That's it - move on!
You’ve recorded your first Web Test with SoapUI, next steps would be:
- Adding assertions to the generated TestSteps to validate the response messages
- Adding more TestSteps, either by recording or via the standard SoapUI TestStep mechanism
- Running the test as a Load Test with loadUI (see …)
Good Luck with your testing!