Skip to content
This repository was archived by the owner on Feb 18, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
################################################################################
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
################################################################################

/.vs/slnx.sqlite
/.vs/slnx.sqlite-journal
/.vs/customer-scripts/v15/.suo
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ Write-Host $testrunid
# http://localhost:8080/tfs/DefaultCollection/testproject/_apis/test/runs/33/attachments
Write-Host $tfsurl$teamproject/_apis/test/runs/$testrunid/attachments
$attachments=Invoke-RestMethod -Uri $tfsurl$teamproject/_apis/test/runs/$testrunid/attachments -Method Get -Headers $headers
$trxattachments = $attachments | where { $_.value.filename.endswith(".trx") }
$trxattachments = ($attachments.value | Where-Object {
$_.attachmentType -eq "tmiTestRunSummary"
})

if($trxattachments -eq $null -or $trxattachments.count -eq 0)
{
throw "no test run attachments found of type trx"
}

$trxattachments= $trxattachments | Sort-Object { $_.value.createddate }
$trxattachmentid=$trxattachments[0].value.id
$trxattachments= $trxattachments.value | Sort-Object { $_.createddate }
$trxattachmentid=$trxattachments[0].id

Write-Host $trxattachmentid

Expand Down