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 *

browser automation addon
Other Automation
Free Plugins for web browser automation

There are a lot of commercial automation tool available however if need and budget is limited then It is not always advisable to go for commercial tools. there are options available for in open source and free(with limited features tool/plugin. Below are 2 open source/free available tools/plugin for browser automation …

Automation by Artifical Intelligence
Other Automation
Concept: Automation of automation

The sole aim of automation is to reduce manual intermittent work, additionally, it brings quality. The transition in industry is on going and we will see in near future Artificial intelligence enabled automation, automation with machine learning capabilities and more like deep learning enabled automation. Deep learning automation can be …