Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20755

how to do a Oauthv2 auth-code flow enable API with Testrunner

$
0
0

Smartbear Support,

 

I have configured an existing API in the SOAPUI pro 5.1.2 client.  It does a 3 legged oAuth v2 auth-code flow, then calls my REST API endpoint (with that authorization).  Also I configured the oauth automation tab (under the oauth entry) to do the human login.

 

It works fine in the SOAPUI UI. (click on the test steps and play button), it does the oauth (with human login - scripted in "automation tab" of the oauth profile), then does API call with bearer token.  (working fine.)

 

Not working:    I want to test availability of the API, via testrunner calls (on timer) and to run this SOAPUI project from Command line (via testrunner).  This testrunner is run via a continuous integration server (like jenkins) and runs unattended (on timer)

 

Assuming I didn't run in the UI first:  then testrunner fails to do the oauth (that is already configured in the project) and therefore fail auth on the API. 

 

If I run in via play button the the UI first (then use the "lauch testrunner" before token expired is works.

 

I suspect your "automation tab scripts" are not being used in testrunner, even though I checked the "enable UI components in scripts" box. so a "new authorization is not working but and existing one is". (my guess).

 

 

Any suggestions?

 

Steve Ochmanski

 


Viewing all articles
Browse latest Browse all 20755

Trending Articles