Skip to content

Testing

IDragonfire edited this page May 8, 2017 · 7 revisions

This Page is to summarize sum best practice for testing.

Compare JSON

We recommand to use Json Path. Plesae read the documentation:

https://github.com/json-path/JsonPath

Examples

.andExpect(jsonPath("$.player.id", is(player.getId())))
      .andExpect(jsonPath("$.player.login", is(player.getLogin())))
      .andExpect(jsonPath("$.clan", nullValue()));

Sources

http://docs.spring.io/spring/docs/3.0.x/reference/testing.html

https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-testing.html

https://spring.io/blog/2014/05/23/preview-spring-security-test-web-security

https://spring.io/guides/gs/testing-web/

https://dzone.com/articles/unit-and-integration-tests-in-spring-boot

Clone this wiki locally