Triggering SoapUI from selenium


The software industry has adopted Service Oriented Architecture-SOA, which consist of Microservices consist of SOAP and REST.

Selenium is an API which helps in Web automation, Selenium does not help in API testing although SoapUI scripts can be invoked from selenium/Java classes.

Using below 3 steps SOAPUI project can be triggered from java class-

Step 1- Open command prompt form java class
Step 2- Move to Bin directory of SOAPUI folder where Testrunner.bat is placed
Step 3- Run Project.xml

Above steps will trigger SOAPUI project xml

//If complete soap project is required to execute
ProcessBuilder builder = new ProcessBuilder("cmd.exe", "/c", "cd  "+C:\Programfiles\SmartBear\SoapUI-5.4.0\bin" && testrunner.bat C:\SoapProject\Project.xml")
//If specific test case is required to execute
ProcessBuilder builder = new ProcessBuilder("cmd.exe", "/c", "cd  "+C:\Programfiles\SmartBear\SoapUI-5.4.0\bin" && testrunner.bat -c"TestCaseName" C:\SoapProject\Project.xml")


//Below piece of code will display command prompt execution in Eclipse console


Process p builder.start();

BufferReader r = new BufferReader(new InputStreamReader(p.getInputStream()))

String line;



line= r.readline();



So once execution is completed, using above code selenium verification can be triggered.

SOAP and REST services can also be automated using java classes and responces can be pasred so that meaningful node can be processed further.

Couple of Questions and their Answers
1- Can SOAP and REST Services be automated using Selenium-
Answers – No, Selenium can only do web Automation, Although using ResrAssured-REST Services can be automated within Selenium project

1- Difference between API and Web Testing
Answer- API does not have User Interfase or we can say it work using xml/json format where as in Web Testing proper HTML is being using and a User Interface is available for functionalities.

No Comments

Leave a Reply

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

Selenium Basic
Step by step selenium – step 3, what is findelement method

Abstract- So far, we have learned how to launch a web browser, entering values in a text box and clicking button. In this post, we will learn about findelement method. Test automation is all about get and set, which means get from web and set into web. Talking more specifically- …

Test Automation
What is ITestListner interface and its Use in Selenium

There are several interfaces available in TestNG that allow you to modify TestNG’s behavior or to give test scripts additional strength. These interfaces are broadly called “TestNG Listeners”. Here are a few listeners which are commonly used: 1- IAnnotationTransformer 2- IAnnotationTransformer2 3- IHookable 4- IInvokedMethodListener 5- IMethodInterceptor 6- IReporter 7- …

Test Automation
How to Capture Screenshot in Selenium Webdriver-3 different ways

Abstract– Capturing screenshot is an essential feature of a test automation framework, They help in defect analyses once after test execution is over. In this blog post we will see how to capture screenshot, there are different ways to capture screenshots. Which includes- 1- Capture full Page 2- Capturng full …