Closed sergy8612 closed 3 months ago
@sergy8612 I think it is an interesting idea. if you are ok to submit a PR with a nice sample, I will certainly review it and consider it for merge. I may have some requests to change / improve the design, thanks
@sergy8612 I think it is an interesting idea. if you are ok to submit a PR with a nice sample, I will certainly review it and consider it for merge. I may have some requests to change / improve the design, thanks
seems I don't have premissions to push a branch into this repo. Can you enable it?
@sergy8612 the normal PR process works: https://github.com/karatelabs/karate/blob/master/.github/CONTRIBUTING.md
Hi @ptrthomas , here is the PR https://github.com/karatelabs/karate/pull/2445
@sergy8612 thanks ! would be good to have documentation and a better unit-test, but I have merged for now
@sergy8612 FYI 1.5.0.RC2 is available including this merge
@sergy8612 can you see if mocks are working fine for https://github.com/karatelabs/karate/releases/tag/v1.5.0.RC5 - the reason I ask is because I saw some issues in resolving the correct versions of netty in spring-boot projects, so I'm still holding on releasing 1.5.0 final :|
1.5.0 released
Hi @ptrthomas
From this question https://stackoverflow.com/questions/77346337/karate-test-framework-are-there-plans-to-include-runtimehooks-for-mockserver we open this issue.
In our case, we need to implement an interceptor in mock http server to track the requests-responses and the scenario and gather all that info to generate a report, with the scenario, the request and response, to validate them against a swagger (we use https://pactflow.io/ which needs to track the request and responses from the mock server to validate the contracts) and in the validation we need not only the http request and response, but the scenario in the mockserver as well. This allows us to generate the report and the Contract Test in our component tests and in our case saves us lots of work.
Unfortunately we don't have that kind of hook .
I created this interface as a hook which meets these needs by extending the karate MockHandler and MockServer
Then I included this interceptor interface as a hook in our customzed mockserver
For these reasons, I'd like to create a pull request as a contribution by including the possibility of adding this intereptor