How to generate HmacSHA1 header for Saucelabs API testing?

15 views Asked by At

We are planning to use Saucelabs for our API testing framework, but we need HmacSHA1 header for authentication. It needs the Request Method, and resource path of API to generate the header. In Postman we are using javascript in pre-requisite script to generate it. But there is no option like this in Saucelabs. Is this tool only supports Basic Authorization for APIs?

Tried to put javascript code in the Set(Variable) component but it did't work as I think it is not set before the test runs. Also there is an expression available hmacSha1(input : String, secret : String) : String : encrypts input with secret using the HMAC-SHA1 algorithm. but not sure where to use this.

0

There are 0 answers