Wednesday, September 13, 2017
Check-in İşeminde Work Item State Değerinin Otomatik Resolved Olması
Check-in işleminde work item'a ait state bilgisi otomatik olarak resolved oluyorsa;
VS2015 ->Tools-> Options -> Source Control -> Visual Studio Team Foundation Server -> Resolve associated work items on check-in 'deki tik kalıdırılır.
yada
Registery da HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\TeamFoundation\SourceControl\Behavior\ResolveAsDefaultCheckinAction -> ResolveAsDefaultCheckinAction değeri false yapılır.
NOT: Makinanın restart edilmesi gerekebilir.
Friday, September 8, 2017
TFS 2015 Build ile Çağrılan PowerShell'e Parametre Değeri Göndermek
TFS Build ile çağrılan PowerShell'e parametre göndermek için yapılması gereken işlemler aşağıdaki gibidir.
Build Tanımları
1. Build tanımına PowerShell adımı eklenir.
2. Repository tabına gidilip 'Mappings' ayarları yapılır
3. Variables tabına gidilip, scripte kullanılan parametreler tanımlanır.
4. Build tabında Arguments alanına scritpe gönderilecek olan parametreler yazılır.
param(
[Parameter(Mandatory=$true)]
[string]$UserName,
[Parameter(Mandatory=$true)]
[string]$Password
)
TFS Rest Api ile Test Case Oluşturmak
Yaptığım iş gereği var olan bir Test Case değerini okuyup tekrar oluşturmam gerekti.
$response = Invoke-RestMethod -Uri "http://tfsaddress/collectionname/_apis/wit/workItems/1"
if($response.fields.'System.WorkItemType' -eq "Test Case")
{
$areaPath = $response.fields.'System.AreaPath'.Replace("\","\\")
$teamProject = $response.fields.'System.TeamProject'
$iterationPath = $currentIteration
$workItemType = $response.fields.'System.WorkItemType'
$title = $response.fields.'System.Title'
$priority = $response.fields.'Microsoft.VSTS.Common.Priority'
$automationStatus= $response.fields.'Microsoft.VSTS.TCM.AutomationStatus'
$steps = $response.fields.'Microsoft.VSTS.TCM.Steps'.Replace('"',"'")
$assignToUser = $assignToUser.Replace("\","\\")
$json = @"
[
{
"op": "add",
"path": "/fields/System.Title",
"value":"$title"
},
{
"op": "add",
"path": "/fields/System.TeamProject",
"value":"$teamProject"
},
{
"op" : "add",
"path": "/fields/System.AreaPath",
"value": "$areaPath"
},
{
"op" : "add",
"path": "/fields/System.WorkItemType",
"value": "$workItemType"
},
{
"op" : "add",
"path": "/fields/System.IterationPath",
"value": "$iterationPath"
},
{
"op":"add",
"path":"/fields/System.State",
"value":"Design"
},
{
"op" : "add",
"path": "/fields/Microsoft.VSTS.Common.Priority",
"value": "$priority"
},
{
"op" : "add",
"path": "/fields/Microsoft.VSTS.TCM.AutomationStatus",
"value": "$automationStatus"
},
{
"op" : "add",
"path": "/fields/Microsoft.VSTS.TCM.Steps",
"value": "$steps"
},
{
"op" : "add",
"path": "/fields/System.AssignedTo",
"value": "$assignToUser"
},
]"
"@
}
$result = Invoke-RestMethod -Uri "http://tfsaddress/collectionname/_apis/wit/workitems/`$Test%20Case?api-version=1.0"
-Credential $mycreds
-Method Patch
-Body $json
-ContentType "application/json-patch+json"
Subscribe to:
Posts (Atom)
Ürdün
Çok hızlı bir şekilde karar alıp, harekete geçtiğim bir gezi oldu Ürdün. Nitekim bir pazar günü arkadaşım Firuze ile konuşup, pazartesi...

-
Could not write lines to file "obj\Debug\xxx.csproj.FileListAbsolute.txt". Access to the path 'C:\blabla\1\s\x\obj\Debug\xxx...
-
PowerShell üzerinden rest method invoke etmeye çalışırken, post ettiğim parametre değerlerinde Türkçe karakterler problemi yaşandı. Gönd...
-
TFS Build ile çağrılan PowerShell'e parametre göndermek için yapılması gereken işlemler aşağıdaki gibidir. Build Tanımları...