Skip to content

How to add Attachment to Test Steps? #155

@jfthuong

Description

@jfthuong

I would like to add attachments to some of the steps of my Test Cases like I can do in the Web Interface.

This is how I want my step to look like:

Step with attachment

... and when you run it, that would look like this:
enter image description here

However, I have not been able to find where this information is stored.

This is the JSON data for the WorkItem of my Test Case

{
id: 224,
rev: 2,
fields: {
    System.AreaPath: "GM_sandbox\GM-Toto",
    System.TeamProject: "GM_sandbox",
    System.IterationPath: "GM_sandbox",
    System.WorkItemType: "Test Case",
    System.State: "Design",
    System.Reason: "New",
    System.AssignedTo: "Jeff",
    System.CreatedDate: "2019-01-03T01:43:09.743Z",
    System.CreatedBy: "Jeff",
    System.ChangedDate: "2019-01-03T02:12:07.15Z",
    System.ChangedBy: "Jeff",
    System.Title: "Titi",
    Microsoft.VSTS.Common.StateChangeDate: "2019-01-03T01:43:09.743Z",
    Microsoft.VSTS.Common.ActivatedDate: "2019-01-03T01:43:09.743Z",
    Microsoft.VSTS.Common.ActivatedBy: "Jeff",
    Microsoft.VSTS.Common.Priority: 2,
    Microsoft.VSTS.TCM.AutomationStatus: "Not Automated",
    Microsoft.VSTS.TCM.Steps: "<steps id="0" last="2"><step id="2" type="ValidateStep"><parameterizedString isformatted="true">&lt;DIV&gt;&lt;P&gt;Click on the rainbow button&lt;/P&gt;&lt;/DIV&gt;</parameterizedString><parameterizedString isformatted="true">&lt;P&gt;Screen becomes Blue (see picture)&lt;/P&gt;</parameterizedString><description/></step></steps>"
},
_links: {
    self: {
        href: "https://my_server.com:8443/tfs/PRODUCT/23d89bd4-8547-4be3-aa73-13a30866f176/_apis/wit/workItems/224"
    },
    workItemUpdates: {
        href: "https://my_server.com:8443/tfs/PRODUCT/_apis/wit/workItems/224/updates"
    },
    workItemRevisions: {
        href: "https://my_server.com:8443/tfs/PRODUCT/_apis/wit/workItems/224/revisions"
    },
    workItemHistory: {
        href: "https://my_server.com:8443/tfs/PRODUCT/_apis/wit/workItems/224/history"
    },
    html: {
        href: "https://my_server.com:8443/tfs/PRODUCTi.aspx?pcguid=4107d6a2-eaaa-40b9-9a8d-f8fdbb31d4b7&id=224"
    },
    workItemType: {
        href: "https://my_server.com:8443/tfs/PRODUCT/23d89bd4-8547-4be3-aa73-13a30866f176/_apis/wit/workItemTypes/Test%20Case"
    },
    fields: {
        href: "https://my_server.com:8443/tfs/PRODUCT/23d89bd4-8547-4be3-aa73-13a30866f176/_apis/wit/fields"
    }
},
url: "https://my_server.com:8443/tfs/PRODUCT/23d89bd4-8547-4be3-aa73-13a30866f176/_apis/wit/workItems/224"
}

Any idea on where this information is stored?

And, if possible, could anyone tell me how to add an attachment from a file and link it to the test step?

Thanks a lot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions