Ask a Question

Automatise Token and call API

Guy
Frequent Visitor

Automatise Token and call API

Hello,

I have an API which need to get OAuth2 access token. I want to automate the call of this API, then indirecly, need to automate the "Get token" function.

 

I found the perfect groovy code to automate the "get token", as it works fine when I manualy execute the test at testsuite level. Here access token is retrieved and API is called.

 

But, when I create a bat command, calling TestRunner, I get error : "ERROR [errorlog] groovy.lang.MissingPropertyException: No such property: testRunner for class: Script1
groovy.lang.MissingPropertyException: No such property: testRunner for class: Script1".

 

here is the code that I put at load script level :

Guy_1-1652983564926.png

SHould I declare other classes when I call testrunner in bat ?

 

Thanks for helps and inputs

0 REPLIES 0
cancel
Showing results for 
Search instead for 
Did you mean: