cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Functional Web Testing

SOLVED
Contributor

Simple Functional Web Testing

I wanna to try simple functional web testing like

1) Open the specific URL

2) Enter some value 

3) press the button

4) get the response and press the next button

5) press button again to save and come back to ready api and perform another API

 

I am not aware if it possible to do this with Ready API

 

FYI:- I dont want to use any other paid tool to achieve this.

 

Please suggest if any blog and free tool available to do this with Soap UI Pro.

 

Thanks in Advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Super Contributor

Re: Simple Functional Web Testing

Hi @ranujn 

 

  1. First of all the selenium-standalone-server version you are using is not at all compatible with the chromedriver verison.
  2. The soapui version should also be compatible with the selenium-standalone-server version.

Please follow below steps:-

  1. Download selenium-server-standalone-2.41.0 jar - selenium-standalone-server+IEDriver
  2. Download IEDriverServer_x64_2.41.0 
  3. Download chromedriver_win32_2.26 - chromedriver
  4. Download soapui_5.4.0
  5. Download httpClient_4.3.4 - httpclint

Put all the jar file inside bin/ext folder and restart your soapui.

 

Then please try below code:-

 

import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.By;
import org.openqa.selenium.*

//System.setProperty("webdriver.ie.driver", "C:\\Program Files (x86)\\SmartBear\\SoapUI-5.4.0\\bin\\ext\\IEDriverServer.exe")
System.setProperty("webdriver.chrome.driver", "C:\\Program Files (x86)\\SmartBear\\SoapUI-5.4.0\\bin\\ext\\chromedriver.exe")
//def driver = new InternetExplorerDriver()
def driver = new ChromeDriver()
driver.get("https://google.co.in")

I have tested it for IE and Chrome. and it is working fine. Please try all the steps from your side.

And, Let me know, for any issues.

 

Hope this solution helps you out. Please accept as solution and don't forget to give kudos. Smiley Happy

 

Thanks,

avidCoder

View solution in original post

17 REPLIES 17
Super Contributor

Re: Simple Functional Web Testing

It's really possible with ReadyAPI tool. You can use Selenium jar to automate this. Download selenium server and add that jar file to home/soapui/ext folder. And then try this code:-

 

import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.By;

def driver = new FirefoxDriver();
driver.get("YOUR URL")
//Similarly write the xpath for the next step. And you are done.
Contributor

Re: Simple Functional Web Testing

Thanks for the quick response.

 

I never work on Selenium before. However, I can explore and try something new. Is there any proper blog or something which I can follow to do stating setup for selenium

Super Contributor

Re: Simple Functional Web Testing

You can find lot of web pages with many information about selenium on internet. Here is the top links you can follow:-

  1. ToolsQA
  2. GITHUB
  3. SoftwareTestingMaterial

It's really easy to use.

Contributor

Re: Simple Functional Web Testing

 I follow the steps from the TootQA https://www.toolsqa.com/selenium-webdriver/running-tests-in-chrome-browser/ (Did some small changes for Ready API)

 

I downloaded the latest version of selenium jar for java and copied jar from selenium pack to bin or bin/ext folder. Here are the screenshots (Capture.PNG and Capture1.PNG) of the jar which I can see in the selenium pack. 

 

1) When I try to copy all jar files to the bin folder and restart the ready api. I won't see all those jars are loading with Ready API. 

2) Then I try all jars to move to bin/ext folder and restart the ready api again. I can see jars are loaded.

3) Then I execute below code for Chrome but its throwing error for the last row

import org.openqa.selenium.*
import org.openqa.selenium.chrome.ChromeDriver
import java.util.concurrent.TimeUnit

//Initiate WebDriver
System.setProperty("webdriver.chrome.driver", "C:/Users/Selenium/chromedriver_win32/chromedriver.exe");
log.info(System.getProperty("webdriver.chrome.driver"));

WebDriver driver=new ChromeDriver();

Error

ReadyAPI Log :- 

Wed Jan 23 14:56:20 AEDT 2019:ERROR:An error occurred [com.google.common.util.concurrent.SimpleTimeLimiter.create(Ljava/util/concurrent/ExecutorServiceSmiley WinkLcom/google/common/util/concurrent/SimpleTimeLimiter;], see error log for details

Error Log :-

Wed Jan 23 14:56:20 AEDT 2019:ERROR : An error occurred in the script of the Groovy Script test step [Selenium Connector]:

Wed Jan 23 14:56:20 AEDT 2019:ERROR:java.lang.NoSuchMethodError: com.google.common.util.concurrent.SimpleTimeLimiter.create(Ljava/util/concurrent/ExecutorServiceSmiley WinkLcom/google/common/util/concurrent/SimpleTimeLimiter;

Could you please help me here. Thanks

Community Hero

Re: Simple Functional Web Testing

@ranujn,

Thumb rule is to use the right tools for the right job.

Selenium can be used for Web testing. Design separate suite for UI, create tests easily from preferred IDE such as Eclipse, execute the test differently from command line or junit or from Continuous Integration and need not run from SoapUI test case unless it is desperate.


Regards,
Rao.
Super Contributor

Re: Simple Functional Web Testing

Please download selenium-standalone-server-3.141.59 (https://www.seleniumhq.org/download/) and put inside ext folder of ready api. and then

Try this code:-

import org.openqa.selenium.*
import org.openqa.selenium.chrome.ChromeDriver

//Considering you have placed chromedriver.exe file at below path
System.setProperty("webdriver.chrome.driver", "C:/Users/Selenium/chromedriver_win32/chromedriver.exe")
WebDriver driver=new ChromeDriver();

 

Contributor

Re: Simple Functional Web Testing

Thanks for the quick response.

 

I copied selenium-server-standalone-3.1414-59.jar to the bin/ext folder of ready api and restart it.

 

I can see all the jars in the logs too but still getting the same issue

 

Wed Jan 23 17:11:21 AEDT 2019:INFO:ReadyAPI 2.3.0 (build 433) started - System properties: {OS=Windows 7, User name=xrjna}
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\aws-java-sdk-1.11.428.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\byte-buddy-1.8.15.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\client-combined-3.141.59-sources.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\client-combined-3.141.59.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\commons-exec-1.3.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\guava-25.0-jre.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\java-mail-1.4.4.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\mysql-connector-java-5.1.46-bin.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\mysql-connector-java-5.1.46.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\okhttp-3.11.0.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\okio-1.14.0.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\postgresql-9.3-1102.jdbc41.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\selenium-server-standalone-3.141.59.jar] to extensions classpath
Wed Jan 23 17:11:21 AEDT 2019:INFO:Adding [C:\Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext\sqljdbc42.jar] to extensions classpath
Wed Jan 23 17:11:22 AEDT 2019:INFO:Registered 4 JDBC drivers from extensions directory: [com.mysql.jdbc.Driver, com.mysql.fabric.jdbc.FabricMySQLDriver, org.postgresql.Driver, com.microsoft.sqlserver.jdbc.SQLServerDriver]

Super Contributor

Re: Simple Functional Web Testing

And, what is the error you got? 

Highlighted
Contributor

Re: Simple Functional Web Testing

It's the same a one I was getting before 

 

Error

ReadyAPI Log :- 

Wed Jan 23 14:56:20 AEDT 2019:ERROR:An error occurred [com.google.common.util.concurrent.SimpleTimeLimiter.create(Ljava/util/concurrent/ExecutorServiceSmiley WinkLcom/google/common/util/concurrent/SimpleTimeLimiter;], see error log for details

Error Log :-

Wed Jan 23 14:56:20 AEDT 2019:ERROR : An error occurred in the script of the Groovy Script test step [Selenium Connector]:

Wed Jan 23 14:56:20 AEDT 2019:ERROR:java.lang.NoSuchMethodError: com.google.common.util.concurrent.SimpleTimeLimiter.create(Ljava/util/concurrent/ExecutorServiceSmiley WinkLcom/google/common/util/concurrent/SimpleTimeLimiter;

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors