2

I read spring source code to learn unit test. but confuse about testFixtures usage? enter image description here

Sam Brannen
  • 29,611
  • 5
  • 104
  • 136
LiLi
  • 391
  • 3
  • 11

1 Answers1

3

Test Fixtures is a feature of Gradle that the Spring Framework uses in its build. See Using Test Fixtures in the Gradle user guide for details.

Basically, the test fixtures are sample domain entities and sample Spring-based components that we (the Spring Team) use within our own test suite. We also place some of our common base classes for tests in "test fixtures". By making such things "test fixtures", we can reuse them across multiple modules within the test suite for the core Spring Framework.

Sam Brannen
  • 29,611
  • 5
  • 104
  • 136