mardi 14 mai 2019

How to manage cookies with multiple requests with qaf web services request call?

I am using bdd implementation provided by qaf for test automation and using qaf-support-ws for web services testing. I found it very easy to use with all kind of features required for web services test automation. our beckend API requires authontication and uses cookie for subsequent API call. I am able to pass coockie by implementation of ClientFilter. I have created providing client by extending RestClientFactory. My client with added Coockie filter works fine with request calls for one domain and whenever I have request on different domain I need to reset client as below:

new RestTestBase().resetClient();

Because of that I have to call API to authenticate each time. If request are for same domain I don't need to reset client. Is there any other better way to manage cookies? So that I can work with multiple domain without resetting client.

Aucun commentaire:

Enregistrer un commentaire