> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iv.-spring-boot-features/43.-testing/43.4-test-utilities/43.4.2-environmenttestutils.md).

# 43.4.2 EnvironmentTestUtils

使用简单的`key=value`字符串调用`EnvironmentTestUtils`就可以快速添加属性到`ConfigurableEnvironment`或`ConfigurableApplicationContext`：

```java
EnvironmentTestUtils.addEnvironment(env, "org=Spring", "name=Boot");
```
