Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

We have a Spring MVC application, Is it possible to integrate spring context in Karate ? .Say bind the SpringJunitRunner through the Karate runner. Or to lookup the bean by spring context ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
461 views
Welcome To Ask or Share your Answers For Others

1 Answer

Anything is possible in Karate because you can always use Java interop.

You can use the documentation of the servlet-mocking as a reference: https://github.com/intuit/karate/tree/master/karate-mock-servlet

So you should be able to pass the context around as a config variable. Also I think there is a Spring helper to get access to an already running context (via Java) you can search for that also.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...