1

I'm trying to do something that I don't know if it is even remotely possible or not.

I've a Mock server, and I'd like that when it receives a given request, it "starts another test", calling a test feature. I tried some stuff, including the one bellow. But turns out that this Mockserver scenario do not respond.

Scenario: pathMatches('/ideas')
  * def xx = call read('SimpleStart.feature')
  * def response = $ideas.*

Is there an elegant way to make this work? AN workaround or a suggestion you can give me? The use case is: Perform tests, some tests, make some external services invoke the mockserver, and if the mockserver is requested it triggers other tests.

Thanks in advance.

user1680680
  • 213
  • 2
  • 9

1 Answers1

0

Yeah Karate certainly isn't designed to do that. The pattern should be set up your mocks and tests from a Java "runner" for maximum control and that's what most teams do.

In short, "orchestrate" things from Java code.

That said, see if this gives you some other creative ideas: https://twitter.com/getkarate/status/1417023536082812935

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248