apache / apache/maven-surefire

[SUREFIRE-1365] Allow environment variables to be read from a file, instead of set as a Map

Open
#2,328 3 comments 0 reactions 0 assignees View on GitHub
enhancement priority:minor
Dominant language
Java
Stars
461
Forks
588
Avg merge
1d 8h
Merged PRs (30d)
19

Description

**[Darius Cooper](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=dariusx)** opened **[SUREFIRE-1365](https://issues.apache.org/jira/browse/SUREFIRE-1365?redirect=false)** and commented

With 12-factors apps and deployment on platforms like OpenShift, there a new push on using Environment Variables for configuration. When running Integration tests with Failsafe, it would be nice to set the same variables as will be set to the target environment.

Often, there's a file that contains the variables in a key-value pair format, just like a properties file. It would be nice to be able to read that same file in while setting environment variables for Failsafe and also when deploying.

(There may be some type of simple file-formatting differences, but that's typically easy to handle in an automated way.)

failsafe:integration-test supports an "environmentVariables" parameter. It would nice if it could support an "environmentVariablesFile" parameter that allowed a simple properties-style file to be read in an set as environment variables.

---
No further details from [SUREFIRE-1365](https://issues.apache.org/jira/browse/SUREFIRE-1365?redirect=false)

Contributor guide

Open the contributing guide

Research direction

Start with the Failsafe integration-test `environmentVariables` parameter and trace how plugin parameters are converted into environment variables. Review the existing Failsafe tests and configuration documentation, then define support for an `environmentVariablesFile` containing properties-style key-value pairs and verify that those values reach integration tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.