13 most common SoapUI error codes with simple solutions

In the last article, we reviewed the SoapUI tool. In this article, we’ll go over the specific error codes that can occur when working with SoapUI and how to resolve them.

SaopUI 13 most common errors (error codes) with solutions
SaopUI 13 most common errors (error codes) with solutions

In the article you will learn:

1) Connection errors

Error message: Could not connect to [URL]: Connection timed out

Cause: Connection errors can occur due to network problems, firewall restrictions, or URL misconfiguration. Solution:

  • Check the accuracy and availability of the URL from the network.
  • Check if it is possible to connect to the network: check and verify network settings, including proxy configurations.
  • Temporarily disable your firewall to see if it’s blocking your connection. If the problem is resolved, add SoapUI to the firewall’s exception list.

2) Missing dependencies

Error message: java.lang.NoClassDefFoundError: [Dependency Class]

Cause: Missing or incompatible dependencies can lead to errors when running SoapUI. Solution:

  • Make sure that all required libraries and dependencies are configured correctly in the project.
  • If necessary, update or replace outdated dependencies with compatible versions.
  • Check the classpath settings in your SoapUI project to make sure all dependencies are included.

3) Invalid XML responses

Error message: Error in response: Invalid XML

Cause: SoapUI is strict in parsing XML responses and any syntax errors in the XML returned by the web service can trigger this error. Solution:

  • Use XML validation tools (XMLSpy, XmlLint, XMLPad, etc.) or online validators to validate the XML response.
  • If validation reveals problems, fix the errors in the source code generating the XML response.

4) Data source errors

Error message: DataSource [Name] not found

Cause: Data source errors occur when SoapUI cannot find or access the specified data source. Solution:

  • Make sure that the name of the data source in the test step matches the actual name of the data source.
  • If you suspect data corruption, try reloading or recreating the data source within SoapUI.

5) Scripting errors: null pointer exception

Error message: java.lang.NullPointerException

Cause: Null pointer exceptions occur when you access or manipulate a variable or object that is null or uninitialized in your Groovy script. Here’s an example:

def someObject = null

def result = someObject.toString() // A null pointer exception is displayed

Solution:

  • Make sure that variables and objects are properly initialized before use. For example, assign values or create instances before calling methods on them.
  • Use conditional statements (e.g. if statements) to check for null values and handle them gracefully in the script.

6) Scripting errors: compilation error

Error message: Script compilation failed: [Error Details]

Cause: Compilation errors occur when there are syntax errors or problems with the Groovy script. Solution:

  • Check the script carefully for syntax errors such as missing “;”, unmatched parentheses or incomplete statements.
  • Make sure the script follows Groovy’s syntax rules, including proper indentation and formatting.

7) Installation errors

Error message: SoapUI failed to start due to [Error Details]

Cause: When setting up SoapUI on your system, installation issues may occur that prevent it from running properly. Solution:

  • Uninstall SoapUI and reinstall it, making sure you have carefully followed the installation instructions for your specific operating system.
  • Check that your system meets the minimum requirements (operating system, Java Runtime Environment, RAM, disk space, processor, etc.).

8) Test case and test suite errors

Error message: Test Case [Name] failed to execute

Cause: Test case and test suite errors can be caused by a variety of factors, including misconfiguration or dependencies. Solution:

  • Check the test case configurations and make sure they match the expected behaviour.
  • Check that all required dependencies are correctly linked to your test cases and test files.

9) HTTP request errors

Error message: HTTP request failed with status code [Status Code]

Cause: Errors in HTTP requests can occur due to problems with the request itself, server problems, or network interruptions. Solution:

  • Check the HTTP request for correctness, including the URL, headers, and body.
  • Verify that the web service server is up and responding.

10) Timeout errors

Error message: Request timed out after [Timeout Duration] seconds

Cause: Timeout errors can be caused by slow server responses or long-running requests. Solution:

  • Adjust the timeout settings in the SoapUI project to allow for longer response times.
  • Analyze your test suite and identify requirements that take too long. Consider optimizing them.

11) Authentication errors

Error message: Authentication failed for [Authentication Type]

Cause: Authentication errors can occur when using authentication methods such as Basic, Digest, or OAuth. Solution:

  • Double check the username, password or token used for authentication.
  • Check if authentication credentials can be used. Make sure you are using the correct authentication method as required by the web service.

12) Parameterization errors

Error message: Parameter [Parameter Name] not found.

Cause: Parameterization errors can occur when using non-existent variables or parameters or when incorrect referencing. Solution:

  • Ensure that the parameter names used in the test cases match those defined in the data sources or variables.
  • Check that the variables are defined in the correct range for access in the test steps.

13) Scripting errors: missing imports

Error message: Class [Class Name] not found.

Cause: Missing imports can lead to Class Not Found errors when using external classes or libraries in a Groovy script. Here is an example:

// Missing import for Date class

def today = new Date()

Solution:

  • Make sure you import the required classes or libraries at the beginning of the Groovy script. For the Date class, for example, import java.util.Date.

I hope we have helped you with our list of error codes. If you want to get better at SoapUI and expand your horizons, I recommend this Udemy tutorial for beginners. If you’re more advanced, you can check out this advanced tutorial.

If you speak German and are an IT tester or IT automation tester, take a look at our employee benefits and respond to our job offers!

About the author

Michaela Kojnoková

Agile Test Engineer

Po štúdiu informatiky na ŽU a TUKE som sa najviac ponorila do oblasti automatizácie testovania. Okrem toho sa venujem tvorbe webov, databázam, dátovej analytike, umelej inteligencii a strojovému učeniu. Mám rada cestovanie, šport a najviac si užívam čas strávený v prírode s mojimi blízkymi. LinkedIn

Let us know about you