Reputation: 53786
I've written cucumber tests that test a REST API service layer. The service layer is not available until the app is running and REST endpoints are available. These are system-level tests. Does cucumber expose REST endpoints that enable the tests to be started ?
The flow I'm attempting to implement is :
So instead of starting the cucumber tests via the cucumber runnerm start the tests via a REST API.
Is this supported in cucumber or is there an alternative method of exposing test behind a REST service ?
Upvotes: 0
Views: 988
Reputation: 8676
Cucumber does not have such a layer. You have to implement your own. Basically you can take any sort of web framework like Spring-Boot or Play framework and implement that controller that would delegate call to Cucumber code (see How to invoke the Cucumber runner class from a different main method)
However you picture seems to be oversimplified. HTTP server normally provides a pool of parallel workers which are to handle client calls so you have to think the algorithm out in general to assure the things are synchronized where they have to be.
Upvotes: 1