Skip to content

Environment variables

Alexandr D edited this page Oct 5, 2018 · 4 revisions

Using allureConfig.json, you can add environment variables to the report.

You can add both constants and system/CI server variables in this way:

  • Constants:

    alt text
  • Runtime variables in environment.runtime block, syntax: Namespace.ClassName.MemberName:
    alt text

    Works with public/internal/private static fields, static properties and with constants.
  • System or CI server variables in environment.runtime block, syntax System.Environment.NameOfVariable:

    alt text

    Example of Environment widget in the report with variables:
    alt text