spring-projects / spring-projects/spring-boot

Investigate convention-based application.properties specifically for tests

Open
#38,098 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

Currently it can can be quite awkward to add an application.properties for tests that overrides only specific values of the one in src/main/java. Some folks resort to adding a profile specific property and enabling a profile in all their tests. Some mix .properties and .yaml so that both files load and some use import:.

It would be nice if we had an out-of-the-box solution.

In addition, we could try to address the concern mentioned in https://github.com/spring-projects/spring-boot/issues/5307#issuecomment-1783188324 and provide a way for a global user specific test application.properties file to also be loaded.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the concern linked from issue 5307 and compare it with the existing application.properties and test configuration behavior described here. Define an out-of-the-box convention for test-specific overrides and determine whether a global user-specific test application.properties should also load; the work is done when both behaviors are specified and covered by the project’s tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.