Site icon Experience, Digital Engineering and Data & Analytics Solutions by Apexon

Invoking a Selenium RC test from soapUI

Testing

Note: For overall context for this blog please read integration testing with soapUI to understand why extending soapUI to work with Selenium is ever necessary.

A selenium RC groovy script which is one form of customizable edition of the recorded selenium IDE can be invoked in the soapUI. It is useful to perform various tasks in soapUI like as follows:

Selenium RC and IDE

Selenium Remote Control (RC) is a test tool that allows user to write automated web application UI tests in multiple available programming languages against any HTTP website using any mainstream JavaScript-enabled browser.Selenium RC has two processes:

  1. A server which automatically launches and kills browsers, and acts as a HTTP proxy for web requests from them.
  2. Client libraries for multiple computer language.

The RC server also bundles Selenium Core, and automatically loads it into the browser.

Firefox extension calling Selenium IDE (Screenshot001) is used to record the functionality of the web site. It is easy to use and powerful tool for controlling, automating or testing web sites. It has record and playback feature that can be used to automate any thing in the web sites.

(Screenshot001)

Selenium IDE has feature to save and export automated task in Groovy script (Screenshot002) which in turn can be used in soapUI.

(Screenshot002)

For Selenium IDE users, Selenium RC is ideal solution to write tests in a more communicative programming language. So, to be more expressive, compatibility and for extra assertions recorded scripts are exported in Groovy Scripts.

Groovy Scripts

Groovy:

Groovy scripts can be widely used in a soapUI for different functionalities.

SoapUI

soapUI is open source desktop application for inspecting, invoking, developing, simulating/mocking and functional/load/compliance testing of web services over HTTP. In a given framework, soapUI is used for testing web service.

Following are the functionalities of the groovy scripts in soapUI:

Benefits of Groovy Scripts in Test Automation Framework

In Test Automation Framework, we have used groovy scripts mainly:

(Screenshot003)

(Screenshot004)

(Screenshot005)

(Screenshot006)

When tester will run the soapUI project either from Test Automation Framework or from soapUI Pro, it will take the extended script libraries from scripts.jar file.

Conclusion

Using test automation framework, a tester can execute the soapUI test suites or test cases automatically segregated by categories and browsers. Framework is customizable by updating the extended soapUI libraries for common functionalities. It will actually help the user to create a groovy script for commonly used functions and then bind those scripts in a jar file so that user can use in soapUI. While executing soapUI, it will automatically use customized selenium groovy scripts with assumption that selenium services are running.

Exit mobile version