Spting Boot Testing
September 11, 2021

M04 Q40 What dependencies does spring-boot-starter-test brings to the classpath?

spring-boot-starter-test brings following dependencies:

  • JUnit - Unit Testing for Java Applications
  • Spring Test - Spring Framework Support for Testing
  • Spring Boot Test - Utilities and Integration Test Support for Spring Boot
  • AssertJ - Fluent Assertion Library
  • Hamcrest - Matchers Library
  • Mockito - Mocking Framework
  • JSONassert - JSON Assertion Library
  • JsonPath - XPath for JSON
  • XMLUnit - Tools for XML verification

You can see list of all dependencies with versions for maven module by running following command:

mvn dependency:tree
[INFO] \- org.springframework.boot:spring-boot-starter-test:jar:2.1.4.RELEASE:test
[INFO]    +- org.springframework.boot:spring-boot-starter:jar:2.1.4.RELEASE:test
[INFO]    |  +- org.springframework.boot:spring-boot:jar:2.1.4.RELEASE:test
[INFO]    |  |  \- org.springframework:spring-context:jar:5.1.6.RELEASE:test
[INFO]    |  |     +- org.springframework:spring-aop:jar:5.1.6.RELEASE:test
[INFO]    |  |     +- org.springframework:spring-beans:jar:5.1.6.RELEASE:test
[INFO]    |  |     \- org.springframework:spring-expression:jar:5.1.6.RELEASE:test
[INFO]    |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.1.4.RELEASE:test
[INFO]    |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.1.4.RELEASE:test
[INFO]    |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:test
[INFO]    |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:test
[INFO]    |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.11.2:test
[INFO]    |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.11.2:test
[INFO]    |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.26:test
[INFO]    |  +- javax.annotation:javax.annotation-api:jar:1.3.2:test
[INFO]    |  \- org.yaml:snakeyaml:jar:1.23:test
[INFO]    +- org.springframework.boot:spring-boot-test:jar:2.1.4.RELEASE:test
[INFO]    +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.4.RELEASE:test
[INFO]    +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO]    |  +- net.minidev:json-smart:jar:2.3:test
[INFO]    |  |  \- net.minidev:accessors-smart:jar:1.2:test
[INFO]    |  |     \- org.ow2.asm:asm:jar:5.0.4:test
[INFO]    |  \- org.slf4j:slf4j-api:jar:1.7.26:test
[INFO]    +- junit:junit:jar:4.12:test
[INFO]    +- org.assertj:assertj-core:jar:3.11.1:test
[INFO]    +- org.mockito:mockito-core:jar:2.23.4:test
[INFO]    |  +- net.bytebuddy:byte-buddy:jar:1.9.12:test
[INFO]    |  +- net.bytebuddy:byte-buddy-agent:jar:1.9.12:test
[INFO]    |  \- org.objenesis:objenesis:jar:2.6:test
[INFO]    +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO]    +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO]    +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO]    |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO]    +- org.springframework:spring-core:jar:5.1.6.RELEASE:test
[INFO]    |  \- org.springframework:spring-jcl:jar:5.1.6.RELEASE:test
[INFO]    +- org.springframework:spring-test:jar:5.1.6.RELEASE:test
[INFO]    \- org.xmlunit:xmlunit-core:jar:2.6.2:test
[INFO]       \- javax.xml.bind:jaxb-api:jar:2.3.1:test
[INFO]          \- javax.activation:javax.activation-api:jar:1.2.0:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------