I am trying to set up Karate test framework for our new project. We will be enabling Kerberos authentication to our Rest microservices. Can you please tell me if Karate supports Kerberos aunthentication
2 Answers
Most projects are able to call a normal HTTP end-point and get a token from it which will be used as an auth header. So look for the OAuth and header authentication demos / in the documentation.
Otherwise, take a look at this approach: https://stackoverflow.com/a/51150286/143475 - so it is possible for you with a little extra work to call into some .NET code for e.g. which you can design to give you the headers / tokens you need.
- 47,282
- 14
- 68
- 196
I wrote a Java program that returns cookie.. return context.getCookieStore().getCookies().get(0).getValue(); calling that Java method in my feature file below is the code * def JavaDemo = Java.type('com.bp.util.KrbClient') * def sessionId = JavaDemo.httpPostRequest()
and then setting the cookie in scenario Scenario: Verify Rest API get method to get current Gordon server version Given url 'some url' And cookie JSESSIONID = sessionId When method GET Then status 200
However my next scenario doesnot work if I don't set cookie again. I am trying to figure out how to set cookie once to run all the scenarios
- 23
- 3
-
ask a separate question please – Peter Thomas Feb 22 '19 at 07:21