Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Close_run - Giving me an argument error


#1

Hi

I am working on automating my new run and closing the run after my automation tests run. I am able to easily open a new run. But when I try to close a run I get this error:
testrail.rb:61:in `send_post’: wrong number of arguments (1 for 2) (ArgumentError)

And here is my code snippet:

client.send_post(
"close_run/{@run_id}"

)

I am using the Ruby bindings.

Thanks for any help!


#2

Figured it out. You need to add a blank parameter field.

client.send_post(
		"close_run/#{@run_id}",
		{}
	)

#3

Hi Patrick,

Thanks for your posting! Yes, send_post currently always expects two arguments even if the second one is just an empty array (we are happy to look into making this optional with a future update).

Cheers,
Tobias