1

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?

desidigitalnomad
  • 1,443
  • 21
  • 33

1 Answers1

1

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 :)

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • thanks! was able to run with the following command java -jar D:\karate-1.0.1\karate-1.1.0.RC2.jar -m manufacturer-mock.feature -m payment-mock.feature the server is running, but there seems to be some issues with schema checks. Debugging that... – desidigitalnomad Jun 10 '21 at 14:32