Hackernoon logoThe Basics You Need To Know About Automated Testing In SoapUI by@taacoder

The Basics You Need To Know About Automated Testing In SoapUI

Alexey Taranenko Hacker Noon profile picture

@taacoderAlexey Taranenko

QA-Automation

Hello everyone! In one company, I was given the task of creating autotests on one of the very famous testing tools that almost all IT workers know who manually test APIs. This is SoapUI.

The task seemed somewhat strange to me, since at that time there were other well-known testing tools: TestNG, JUnit, Citrus, as well as other ready-made frameworks for API testing. But since other members of my team were fluent in SoapUI, in order to understand and read my autotests, I needed to work with this particular tool.

Well, I took up the challenge and started diving into SOAPUI's capabilities in terms of test automation. I must say right away that we are talking about a free version of SoapUI Open Source.

So, let's begin. SoapUI supports REST and SOAP services. SoapUI is a desktop user interface with out-of-the-box testing solutions. Convenient and well-known tree structure of project folders. As they say, we create a project, in the project we create TestSuits, in TestSuits we create TestCases, well, inside TestCase, respectively, TestSteps.

Working with variables is also done conveniently and clearly, you can create variables with different scopes:

  • at the global level (the variable can be seen from any projects)
  • at the project level (the variable is visible within the project)
  • at the TestSuite level (the variable is visible within the TestSuite)
  • at the TestCase level (the variable is visible within TestCase)

It is possible to create MockServices, which are essential when testing complex systems. Visual representation of TestSuite, TestCase, MockService is provided in the form of separate windows located in the main window of the user interface. In these windows, you can observe at what step the test case is currently being executed, you can see at what moment a request comes to the MockService.

But we wanted to talk about automation, how can we approach test automation in SoapUI? Okay. To do this, for example, in TestCase between any test steps or at the beginning or at the end of the test, you can insert a so-called script, inside which you can write the necessary code in the Groovy programming language. This is the language that SoapUi supports. Inside the script, you can program anything you want for your automation, change the value of a variable, set a time delay, start a timer, write asserts, in general, do everything that the Groovy programming language allows. I can tell if you automate in Java, like me, then you will have no problem mastering Groovy in no time).

In this article, I will not go deep into the practice of automation, my goal is to generally tell you about my impression of automation on SoapUI. But as a result of the experience gained, I can draw the following conclusions.

What are the advantages of automation on SoapUI:

  1. Visibility of the user interface. You can easily show visually the passing of the tests to your colleagues who are interested.
  2. It will be easy for a novice tester to start automating in Groovy, starting with the simplest programming.
  3. The speed of compiling test cases, this can be done quickly enough.

What are the disadvantages of automation on SoapUI:

  1. When you come across writing code, unfortunately you will see that there is no auto-highlighting and auto-substitution of code during programming.
  2. There is no such flexibility in connecting the necessary libraries for testing, as programmers are used to using in projects built on Maven.
  3. There is no way to debugging, as it is done on well-known development environments.
  4. There are problems with searching throughout the project.

So, I told you about my impression of the automation process on the SoapUI testing tool. I hope you were able to learn something new)

Tags

Join Hacker Noon

Create your free account to unlock your custom reading experience.