# publishTestResults

This configuration section contains settings related to publishing test results.

To read more about publishing test results see the [Publishing test result files](/specsync/jira/features/test-result-publishing-features/publishing-test-result-files.md) page. Please also check the [command line reference](/specsync/jira/reference/command-line-reference/publish-test-results-command.md) for the `publish-test-results` command.

The following example shows the most common options within this section.

```javascript
{
  ...
  "publishTestResults": {
    "testResult": {
      "sources": [
        {
          "value": "test-result.trx"
        }
      ]
    },
    "treatInconclusiveAs": "Failed",
    "flakyTestOutcome": "lastAttemptOutcome",    
    "testRunSettings": {
      "description": "Acceptance test results",
      "folder": "/BDD"
    },
    "testResultSettings": {
      "environment": "Staging"
    }
  },
  ...
}
```

## Settings

| Setting                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Default                                                                                                             |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `testResult`                        | <p>The test result configuration</p><ul><li><code>testResult/sources</code> — An array of test result sources. Each source should specify a <code>value</code> (the path of the test result file or a folder containing multiple test result files) and optionally a <code>baseFolder</code> (the base folder for the test result file, defaults to the folder of the configuration file).</li><li><code>testResult/resultFormat</code> — The format of the test result file. Please check the <a href="/pages/jYszew4F5uyYdSVmD8Aq#supported-test-result-formats">Compatibility</a> page for supported formats. Invoking the <code>publish-test-result</code> command with <code>?</code> as format as command line option will list all supported format as well.</li></ul> | specified as [command line option](/specsync/jira/reference/command-line-reference/publish-test-results-command.md) |
| `treatInconclusiveAs`               | Maps the Inconclusive test results. Some test execution frameworks report skipped scenarios as Inconclusive, so they should be mapped to another value, e.g. `NotExecuted`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | not mapped                                                                                                          |
| `flakyTestOutcome`                  | <p>Specifies how the overall outcome of flaky tests (tests that were rerun multiple times and at least one attempt failed) should be calculated.</p><ul><li><code>lastAttemptOutcome</code> — Uses the outcome of the last attempt (default behavior)</li><li><code>failed</code> — If any attempt failed, the overall outcome will be Failed, otherwise uses the last attempt outcome</li></ul><p>For more details, see the <a href="/pages/4KuiHcbua3YAKwvxjUlx#detecting-test-reruns-and-flaky-tests">Detecting test reruns and flaky tests</a> section.</p>                                                                                                                                                                                                               | `LastAttemptOutcome`                                                                                                |
| `onTestPointMissing`                | Specifies the behavior for the case when a Test Case result has found, but the Test Case is not included in the target for publishing results. Possible values: `skipTestResult`, `warning`, `error`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | `warning`                                                                                                           |
| `publishEmptyResults`               | Publishes test results even if no matching results found.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `false`                                                                                                             |
| `publishAttachmentsForPassingTests` | Controls which attachments should be published for passing tests. Possible values: `none` - no attachments are published for passing tests, `files` - only file attachments are published, `all` - both file attachments and test output are attached. Note: this setting does not affect publishing failing tests, which always publish all attachments.                                                                                                                                                                                                                                                                                                                                                                                                                     | `files`                                                                                                             |
| `testRunSettings`                   | <p>Specifies additional settings for the created test run. The value can contain <a href="#setting-placeholders">placeholders</a>.</p><ul><li><code>testRunSettings/name</code> — In Zephyr Scale, it sets the Test Cycle name</li><li><code>testRunSettings/description</code> — In Zephyr Scale, it sets the Test Cycle description</li><li><code>testRunSettings/iteration</code> — In Zephyr Scale, it sets the Test Cycle iteration</li><li><code>testRunSettings/folder</code> — In Zephyr Scale, it sets the Test Cycle folder</li><li><code>testRunSettings/version</code> — In Zephyr Scale, it sets the Test Cycle version</li></ul>                                                                                                                                | use default settings                                                                                                |
| `testResultSettings`                | <p>Specifies additional settings for the created test results. The value can contain <a href="#setting-placeholders">placeholders</a>.</p><ul><li><code>testResultSettings/comment</code> — In Zephyr Scale, it sets the test result comment</li><li><code>testResultSettings/environment</code> — In Zephyr Scale, it sets the test result environment</li><li><code>testResultSettings/iteration</code> — In Zephyr Scale, it sets the test result iteration</li><li><code>testResultSettings/version</code> — In Zephyr Scale, it sets the test result version</li></ul>                                                                                                                                                                                                   | use default settings                                                                                                |

## Setting Placeholders <a href="#setting-placeholders" id="setting-placeholders"></a>

| Placeholder                       | Description                                                                                     |
| --------------------------------- | ----------------------------------------------------------------------------------------------- |
| `{br}`                            | a new line                                                                                      |
| `{env:ENVIRONMENT_VARIABLE_NAME}` | The content of the environment variable specified (`ENVIRONMENT_VARIABLE_NAME` in this example) |

{% content-ref url="/pages/As0iwTwtwwMJKOfZACmA" %}
[Configuration reference](/specsync/jira/reference/configuration.md)
{% endcontent-ref %}

{% content-ref url="/pages/mhjMBKwQL3oOfLlrx4Hc" %}
[publish-test-results](/specsync/jira/reference/command-line-reference/publish-test-results-command.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.specsolutions.eu/specsync/jira/reference/configuration/configuration-publishtestresults.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
