Forum Discussion

palgoel's avatar
10 years ago

[Resolved] Getting "Script returned null" error

I trt below very simple groovy script
println "Hello World" and i get error "Script returned null".

Screenshot uploaded.

Also I am very new to webservices Testing. I want to automate the Webservices testing in SOAPUI Pro using groovy.
Can you suggest me some beginner lever documentation for it.

4 Replies

  • HSHSUI's avatar
    HSHSUI
    New Contributor
    Hi,

    The script does not return a value, special only writes a string out, so "null".

    I am also a beginner. I think to get an insight into the program helps only read the online documentation on soapui.org. It is very extensive and describes the entire program. I've been doing too much there.
  • PaulDonny's avatar
    PaulDonny
    Regular Contributor
    If you use log.info it should not give that message. Groovy is not seeing any sort of output from your script and no variable declarations so it assumes that it returned null.
  • PaulDonny's avatar
    PaulDonny
    Regular Contributor
    I did not see that you mentioned about automating web services.

    SoapUI is extremely powerful for doing a lot with WebServices but with automation it can be quite weak.

    I typically would suggest to use Java or C#, depending on the language that your company uses, to consume the WSDL (Both languages have a rather simple way to perform this). After that, start correlating with the requests with data from an external source (Database, Flat File, however you would like to handle it). A great way to automate, in my opinion, is to create a local database (or spreadsheet,CSV,whatever) with a table for each test case type (Negative, Regression etc) and then have each row feed the data into the system.