空手道春季整合 [英] Karate Spring Integration
问题描述
我们有一个Spring MVC应用程序,是否可以在Karate中集成spring上下文?说通过空手道赛跑者绑定SpringJunitRunner.还是要在Spring上下文中查找bean?
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 ?
推荐答案
在空手道中一切皆有可能,因为您始终可以使用Java互操作.
Anything is possible in Karate because you can always use Java interop.
您可以使用servlet模拟的文档作为参考: https://github.com/intuit/karate/tree/master/karate-mock-servlet
You can use the documentation of the servlet-mocking as a reference: https://github.com/intuit/karate/tree/master/karate-mock-servlet
因此,您应该能够将上下文作为配置变量传递.另外,我认为有一个Spring帮助程序可以访问已经运行的上下文(通过Java),您也可以搜索该上下文.
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.
这篇关于空手道春季整合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!