Skip to content

Commit

Permalink
Merge pull request #59 from TurekBot/patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaleo authored Aug 20, 2024
2 parents ebd4e92 + aafb9d0 commit 7f7bb1a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/reporting/reports-custom-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ We can set this value from the command line as shown here:
mvn serenity:aggregate -DHOST=$HOST -Denvironment=INT5
```

#### Using default values
If an environment variable doesn't exist, you can have specify a fallback value.

```
report.customfields.user = ${USER:-Unknown}
report.customfields.host = ${HOST:-} # Blank instead of the literal characters "${HOST}"
```
The mechanism behind the substitution: [Apache Commons `StringSubstitutor`](https://commons.apache.org/proper/commons-text/apidocs/org/apache/commons/text/StringSubstitutor.html)

### Ordering the custom properties

By default, the fields will appear in an arbitrary order. You can force the fields to appear in a pre-determined order using the `report.customfields.order` field:
Expand Down

0 comments on commit 7f7bb1a

Please sign in to comment.