开发者

Mount Java app inside cucumber rails app

开发者 https://www.devze.com 2023-03-27 10:56 出处:网络
I have a rails app that talks to an api running on the same domain via ajax calls. I want to test this app using cucumber. The api is written in java and packaged as a jar. How can I mount the jar whe

I have a rails app that talks to an api running on the same domain via ajax calls. I want to test this app using cucumber. The api is written in java and packaged as a jar. How can I mount the jar when using cucumber开发者_StackOverflow中文版?


There is no way to do it automatically but you can add Before hook into env.rb or put it into separate file and in this method you can load your java extension by issuing shell command, you can store process pid in variable and kill this process in After callbalk. You can configure Capybara to start server on specific port and I think you can tune your application to use specific port too.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号