Forum Discussion

jkrier's avatar
jkrier
Regular Contributor
7 years ago

Can't invoke external groovy script with test case variables

I have an external script that I want to use to store values in for a JDBC query request. I am getting the following error

 

 

groovy.lang.MissingMethodException: No signature of method: library.getAccount.GetAccount.ab_complete_newconnect_retail() is applicable for argument types: (org.apache.log4j.Logger, com.eviware.soapui.impl.wsdl.panels.support.MockTestRunContext, com.eviware.soapui.impl.wsdl.panels.support.MockTestRunner) values: [org.apache.log4j.Logger@15b10f62, [ThreadIndex:0, log:org.apache.log4j.Logger@15b10f62, ...], ...] error at line: 2

 

I have other external scripts that I call the same way (far as I can tell) and they work without issue. Here is the script I am trying to invoke

 

 

package library.getAccount
class GetAccount {

					def account( log, context, testRunner )
					{
						def inputs = 
						[
							 beam_number_in                  :'',
							 customer_type_in                :'',
							 device_platform_id_in           :'4',
							 device_status_id_in             :'2',
							 device_type_id_in               :'',
							 ext_svc_agreement_ref_seq_in    :'0',
							 external_transaction_refseq_in  :'0',
							 facade_owner_in                 :'PROVISIONING',
							 fcd_transaction_status_id_in    :'3',
							 fcd_transaction_type_in         :'add',
							 from_date_in                    :'5',
							 rate_name_in                    :'',
							 sales_channel_id_in             :'',
							 sales_channel_type_id_in        :'1',
							 satellite_name_in               :'',
							 state_in                        :'',
							 to_date_in                      :'0',
							 transaction_status_id_in        :'6',
							 transaction_type_in             :'new',
							 zip_in                          :'',
																						
						]
									
						for ( item in inputs )
						{
							log.info item.key + ' : ' + item.value
							testRunner.testCase.testSteps[ 'Properties' ].setPropertyValue(item.key, item.value)
						}
					}
				}

 

And I am invoking it with this script

 

def setGetAccountInputs = new GetAccount()
setGetAccountInputs = setGetAccountInputs.account( log, context, testRunner )

I believe it's failing at the invoking script. It looks to me like SoapUI isn't recognizing the variables. Has anyone else seen  this before and or am I calling the external script incorrectly?

 

  • jkrier's avatar
    jkrier
    Regular Contributor

    So, I added a new Groovy step and called the external script using the same way I was in my example and it worked. I made no changes to any of the code and the original Groovy step still fails and the new one works. They are identical.

     

    I didn't want anyone to waster their time looking at this. Maybe it's a bug for Smartbear.