Skip to content

Iptv Assist

Learn More from us

Menu
  • HOW TO
  • Firestick
  • Chromecast
  • PC Apps
  • Lg Smart TV
  • IPTV Services
  • Automation Testing
  • Smart TV
  • Software Testing Tools
  • Contact Us
Menu

A Quick SoapUI Guide to Store Request and Response Data in a File – SoapUI Tutorial #15

Posted on March 26, 2023

Best Iptv Service Provider 2023 With 40k+ Channels And 100k+ VOD . 24/7 Suppport . Paypal Supported

In this SoapUI advance tutorial, let’s learn about how to store the response in a file for future reference. Also, the steps are very detailed, so we treat this as a quick recap of everything we do, end-to-end.

Best Iptv Service Provider 2023 With 40k+ Channels And 150k+ VOD . Hurry Up

This is the last tutorial in our SoapUI free training series. Head over to this page for all the tutorials in this comprehensive SoapUI and SoapUI pro tutorials series.

Recommended IPTV Service Providers

  1. IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
  2. IPTVRESALE – Rating 5/5 ( 200+ Reviews )
  3. IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
  4. IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
  5. IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
  6. IPTVTOPS – Rating 5/5 ( 43 Reviews )

 

soapui tutorial 15

What You Will Learn:

  • Storing Request and Response in a File:
  • Adding WSDL
  • Add Test Suites and Test Cases
  • Add Groovy Steps
  • Conclusion

Storing Request and Response in a File:

We will start from creating SOAP project:

  1. Open SoapUI Pro
  2. In the Navigator panel, right click on the Project
  3. From the context menu, click on New SOAP Project option.(You can also use Ctrl+N)
  4. New SOAP Project dialogue appears on the screen.
  5. In the New SOAP Project window, enter the project name, StoreResponseValueInFile.
  6. click OK
  7. Now the project is created successfully without any test steps as we did not include WSDL document

Adding WSDL

Let us add currency converter WSDL in this section.

1) In the project tree, right click on the project name that was created in the previous section. i.e. StoreResponseValueInFile

2) In the popup menu, click Add WSDL option. Refer the following screenshot.

exporting data in file 1

3) In the Add WSDL window, enter the currency converter URL.

4) Click OK

5) We can now see the StoreResponseValueInFile project under the project tree along with the interface steps. If you expand a web service (i.e. ConversionRate), there will be a node known as Request1 by default.

6) Double click on the Request1 node to view the request XML content. You could rename it if needed.

Add Test Suites and Test Cases

  1. In the project tree, right-click on the CurrencyConvertorSoap interface.
  2. From the popup menu, click the Generate Test Suite option.
  3. Leave the default settings in and click OK.
  4. Enter the test suite name in the given text field, SampleTestSuite, and click OK.
  5. Now test suite is created along with the test case name, ConversionRate TestCase.
  6. Rename the test case name as SampleTestCase by right-clicking on the test case name and click the Rename option.

Add Groovy Steps

1) Under sample test suite, right click on the sample test case node

2) From the popup menu, click Add Step -> Groovy Script test step

3) Enter name of the groovy script as GetResponseValue and click OK

4) Groovy script test step is added to the test suite and redirected to the script editor.

5) In the editor, add the following script.

def response = context.expand( ‘${ConversionRate – Request 1#Response}’ )
new File( “D:/Groovy/” + “_response.txt” ).write( response )

Note: You should have executed the ConversionRate request with required input parameters.

6) Double click on the SampleTestSuite -> SampleTestCase -> TestSteps(2) -> ConversionRate – Request1

7) Click on the XML tap from the Vertical tab bar

8) Here, replace the following input data instead of a question mark (?) in the soap code.

  • FromCurrency = USD
  • ToCurrency = INR

9) Double click on SampleTestSuite -> SampleTestCase -> TestSteps(2) -> GetResponseValue

10) Now Run the TestSuite by clicking on this icon.

Now we are done storing response data in our local drive.

Verify the response in the response tab and also in the hard drive to ensure both responses are identical.

We can also save the request information in a file. For that, do the following.

1) Right click on the script editor and then click Get Data -> Step 1 [ConversionRate] -> Property [Request] option. Refer the following screenshot.

exporting data in file 2

2) SoapUI Pro will give you auto-generated code like this.

def request = context.expand( ‘${ConversionRate#Request}’ )

3) Then add the following script in the next line

new File( “D:/groovy/” + “_request.txt” ).write( request )

If we execute this script, we will get a file with the name of _request.txt in our local drive as mentioned in the script.

Here are some tips about storing raw request through groovy scripting. Take a look at the following sample scripts.

testCase.getTestStepByName(<teststep name>).getProperty(“Request”).getValue()
Or
context.testCase.getTestStepAt(<index>).getProperty(“Request”).getValue()
Or
testRunner.testCase.getTestStepAt(<index>).getProperty(“Request”).getValue()

The above scripts are used to get the raw web service request while executing the test step. Following the script, we can write another line to receive request information in the variable as we have seen in the above samples. See the below sample code to understand this better.

def request = testCase.getTestStepByName(“ConversionRate”).getProperty(“Request”).getValue()
new File( “D:/GroovyRequest/” + “RawRequestData.txt” ).write( request )

Conclusion

That brings us to an end, not only of this article, but the entire series. We hope this has been useful to you and brought you closer to your SoapUI learning skills. As always, practice, patience and persistence are the most as important as the tutorials themselves for best results.

As a recap of everything you learned in this SoapUI training series, we will be having one SoapUI interview questions and answers tutorial in the end.

We are here to hear your thoughts, experiences and of course, answer questions should you have any.

Thank you for sticking around with us!

Related

Best Iptv Service Provider 2023 With 40k+ Channels And 150k+ VOD . Hurry Up

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • IPTV List: Best iptv lista 2023
  • IPTV Premium: Best Premium IPTV Service Provider List And Benefits
  • Nikon IPTV Review: Over 10,000 Live Channels for $12/Month
  • Iptvwings. Com Review: +18000 Live IPTV Channels ,+70000 Movies, +40000 TV show For $15/1 month
  • IPTVUNO Review: More Than 16000 Live TV channels, 55,000 Movies & VOD For $15/Month

Recent Comments

  1. IPTV List: Play lista iptv 2022 - Iptv Assist on Best IPTV Player in 2023 for Watching Live TV
  2. Cola IPTV – Over 18,000 Live Channels for $12/Month - Iptv Assist on FileLinked – How to Install on Firestick/Fire TV and Android Devices
  3. Cola IPTV – Over 18,000 Live Channels for $12/Month - Iptv Assist on 50+ Best IPTV Service Providers for Streaming Live TV 2023
  4. XoomsTV IPTV – Over 11,000 Channels & VOD for Under $13/Month on Best VPN for IPTV in 2023 and How to Install on Firestick/Android
  5. Voodoo Streams IPTV Review – Over 12,000 Channels for $11/Month - Iptv Assist on Dynasty TV IPTV Review – Over 6,000 Channels for $10/Month

Archives

  • March 2023

Categories

  • Activate
  • Agile Testing
  • Alternatives
  • Android
  • APK
  • Apple TV
  • Automation Testing
  • Basics of Software Testing
  • Best Apps
  • Breakfast Hours
  • Bug Defect tracking
  • Career in Software Testing
  • Chromebook
  • Chromecast
  • Cross Platform
  • Database Testing
  • Delete Account
  • Discord
  • Error Code
  • Firestick
  • Gaming
  • General
  • Google TV
  • Hisense Smart TV
  • HOW TO
  • Interview Questions
  • iPhone
  • IPTV
  • IPTV Apps
  • Iptv Service SP
  • IPTV Services
  • JVC Smart TV
  • Kodi
  • Lg Smart TV
  • Manual Testing
  • MI TV
  • Mobile Testing
  • Mod APK
  • newestiptv.com
  • News
  • Nintendo Switch
  • Panasonic Smart TV
  • PC Apps
  • Performance Testing
  • Philips Smart TV
  • PS4
  • PS5
  • Python
  • QA Certifications
  • QA Leadership
  • QA Team Skills
  • Quality Assurance
  • Reddit
  • Reviews
  • Roku
  • Samsung Smart TV
  • Screenshot
  • Selenium Tutorials
  • Sharp Smart TV
  • Skyworth Smart TV
  • Smart TV
  • Soft Skills For Testers
  • Software Testing Templates
  • Software Testing Tools
  • Software Testing Training
  • Sony Smart TV
  • Sports
  • Streaming Apps
  • Streaming Devices
  • Tech News
  • Test Management Tools
  • Test Strategy
  • Testing Best Practices
  • Testing Concepts
  • Testing Methodologies
  • Testing News
  • Testing Skill Improvement
  • Testing Tips and Resources
  • Toshiba Smart TV
  • Tutorials
  • Twitch
  • Types of Testing
  • Uncategorized
  • Vizio Smart TV
  • VPN
  • Web Testing
  • What is
  • Xbox
©2023 Iptv Assist | Design: Newspaperly WordPress Theme