Can crnk(json api) be tested with mockMVC? - spring-boot

Some of my endpoint developed by jsonApi(crnk),As i searched in stackoverflow, mockMVC can only test the controller, is it possible to test with crnk? i have tested a sample but it got 404

Related

Spock test method for Spring Soap web service endpoint

I have Spring Soap web service endpoint and want to write Spock test method for this endpoint. I surfed in google but couldn't find any resources about this topic. Could anyone help to solve this problem?

Cucumber RestAssured Report with Request Response

I am trying to generate Cucumber reports for Rest-Assured (RESTful API) and I am also keen to capture request / response in the cucumber reports. I was wondering if anybody has already implemented this or can provide some pointers.
You can try Gherkin/BDD with QAF for web service testing and in the report it gives request and response for each request.

Testing REST API provider response without mock

Currently, I am working on a project on Spring Boot where we are integrating with external REST API. As part of our integration suite test, we are doing the mock test of the actual external API which executes as part of the CI/CD.
My question is in production it calls the actual API so, how we can do that in the test environment. I don't think we need to make the actual external provider call during multiple integration test which will load the external API, also at the same time would like to test with actual REST response from the service.
Any suggestions?
If the public API has a swagger description, you could use the Atlassian Pact Swagger Validator. I describe the workflow in this talk: https://www.youtube.com/watch?v=79GKBYSqMIo#t=39m10s
Another alternative would be to create a mock API for the external service. There are some free services like https://mockfirst.com, https://www.mockable.io/, etc. where you can do that.

Can I test websockets with Jersey Test Framework?

I have a Restful web service that I want to test. For this I use the Jersey Test Framework. In addition to the JAX-RS resources are also used websockets, which should also be tested. But when I tried to test websocket endpoint using Tyrus client I got 404 instead of the 101 code.
org.glassfish.tyrus.core.HandshakeException: Response code was not 101: 404.
In a case when I build the war file - websocket endpoint works fine and everything works as expected.
Can I test websockets with Jersey Test Framework?
Jersey 1.18

Can I use Spring's MockMvc with Jersey resources?

I have successfully integrated Spring and Jersey via Spring Boot' starter POMs, and I have a couple Jersey endpoints. Now I'd like to unit test the resources. I can't seem to get MockMvc working. I get a 404 error when attempting to GET a resource endpoint.
I know there is a Jersey test framework out there, but it appears to launch a server. I'm hoping to avoid "integration" type tests and keep this as simple as possible. Can I do this with MockMvc?
Unfortunately doesn't seem to be possible as MockMvc doesn't actually start servlet container.
You can use
RestTemplate to fire requests against server started on localhost. Here are examples from Spring Boot repo: Example 1 and Example 2.
Rest Assured library

Resources