vendredi 26 août 2016

Rest service testing using Jmeter authorization issue- Need application to be logged in browser to run Rest call from any client

I want to test rest service thorough Jmeter, I have tested Rest call using postman and its working fine. thing is to run rest service from any client like postman, i need to login to my application first in browser and after login rest call will work in RESTClient(Firefox). but in case of Jmeter how to run then. i have added authorization. (Username and password) using HTTP Authorization manager still facing. even i have added bean shell script bellow

import org.apache.commons.codec.binary.Base64; byte[] encodedUsernamePassword = Base64.encodeBase64("harshal.shewale1@viewics.com:Harshal@1".getBytes()); vars.put("base64HeaderValue",new String(encodedUsernamePassword));

still not running rest. giving error as a Bad credentials.

someone please guide me.

Aucun commentaire:

Enregistrer un commentaire