Support for large test attachments now available in Azure Pipelines

Divya Vaishnavi

Divya

When running tests in a CI/CD pipeline, collecting diagnostic data such as screenshots, logs, and attachments is very useful to help troubleshooting failures. Azure Pipelines has always had support for test attachments and you can find details in the documentation on how to collect attachments in continous testing.

With this update, Azure Pipelines supports test attachments bigger than 100MB in size, which means you can now upload big files like crash dumps or videos with failed tests, aiding your troubleshooting experience.

This functionality is available for all our customers today.

Change required if you are using self-hosted agents

If you are using self-hosted build or release agents behind a firewall that is filtering outbound requests, you will need to make some configuration changes to be able to use this functionality. You might see VSTest task or Publish test results task returning a 403 or 407 error in logs, an example is as below:

Large attachment Build error

Also note, if your pipeline treats warning as errors, you might see pipeline failures too.

In order to fix the issue above, we recommend updating firewall rules to allow outbound requests to https://*.vstmrblob.vsassets.io. You can find troubleshooting information in our docs

Note that the change above is only required if you’re using self-hosted Azure Pipelines agents and you’re behind a firewall that is filtering outbound traffic. Customers using Microsoft-hosted agents in the cloud or that aren’t filtering outbound network traffic do not need to take any action.

Feedback

Please reach out to our Azure DevOps feedback portal if you have any questions / feedback, or connect with us on Twitter at @AzureDevOps.

3 comments

Comments are closed. Login to edit/delete your existing comments

  • Avatar
    James Walters

    I am getting a (413) Request Entity Too Large when I try to upload a 180 MB attachment using the attachments end point, is there any restriction in forced at all?

  • Avatar
    Markus Szumovski

    Not sure if this is meant for Azure DevOps cloud services or on premises, but we’re using Azure DevOps Server 2019 Update 1 Patch 1 (on premises), our coverage file is larger than 75/100 MB (it’s 130 MB large) and the upload of this coverage file fails at the end of the test build step because the file attachment is too large. We have code coverage enabled as well as the “Upload test attachments” option.
    At first the agent is already blocking any test attachment upload larger than 75 MB (or larger than 100 MB if unpacked) with this error message at the end of the test build step:

    Skipping attachment as it exceeded the maximum allowed size 75MB: <PathToCoverageFile>

    So I thought fine, I’m changing these limits in the source of the latest build agent (2.165.1) and build one for our own use, which worked fine, but then the Azure DevOps Server itself is complaining about the file size being larger than 100 MB with this error message at the end of the test build step:

    Failed to publish test results: Cannot upload file as it exceeded the maximum file size (104857600 bytes)

    which is either thrown here:
    Microsoft.TeamFoundation.Server.WebAccess.TestManagement.TestResultHelper.CreateTestResultAttachment(int, int, int, HttpPostedFileBase)
    or here:
    Microsoft.TeamFoundation.TestManagement.Server.TeamFoundationTestManagementAttachmentsService.ValidateAttachmentSize(TestAttachmentRequestModel)
    In both cases, as well as in the agent, these limits are all hard coded instead of configurable.