Karate - Starting Mock Server with multiple feature files

Viewed 267

My feature files are structured like this

enter image description here

As you can see, each module has a common, mock and test feature files. for eg: category-common.feature, category-mock.feature and category-test.feature. These contain all common definitions, mock API definitions and tests respectively related to category APIs.

We are using the java -jar karate.jar -m <feature_file> command to run the mock server. This approach is good when we are testing the APIs module wise. The question is how can we deploy all mocks together in a single port?

As per this answer, it is not possible to do it. If not, what are some other approaches we can follow?

1 Answers

Someone contributed a PR to add this post the 1.0 release, so you should read this thread: https://github.com/intuit/karate/issues/1566

And you should be able to test and provide feedback on 1.1.0.RC2

Of course if you can contribute code, nothing like it :)

Related