Missing Result tab in Microsoft Test Manager - tfs

I'm looking for the 'Result' tab mentionned in the MSDN
On Test Manager 2013, I set a test plan, and performed my tests. I now want to share the results.
Basically, I should have:
Plan =>
Contents | Results | Properties
But I only have:
Plan =>
Contents | Properties
Is there a TFS configuration for this? Any idea on what's wrong?
Here the version I run:

Related

How to avoid ignored tests being generated as in SpecFlow MsTest?

Here is the Sample feature file, has #ignore examples.
#ChildTest
Scenario: Sub Report
Given I have clicked on EmpId: '<EmpId>' to view Report
When Loading mask is hidden
Then I have clicked on 'Back to Results' link.
#ignore
Examples:
| EmpId | Date |
| CHILD_TEST_SKIPPED | dynamic |
I would like TestGenerator to AVOID Unit test method generation for #ignore examples
You cannot get the test generator to ignore those tests. SpecFlow tags become [Test category("ignore")] attributes above the test methods that get generated.
You will need to filter out those tests in Test Explorer. Enter -trait:ignore in the Test Explorer search bar to exclude those tests.
An alternative is to set the test to "pending":
Scenario: ...
Given pending
And in the step definition for Given pending call: Assert.Inconclusive("This test is temporarily disabled.");
Then the tests get executed, but report that they are neither passing nor failing. I do this quite a bit when implementing new features so I can write the tests ahead of time.

Can I use tags in SpecFlow to determine the right environment to use?

I have been working to get a SpecFlow framework in place for my Test environment, now I'd like
to extend the ability to use this for multiple environments. I was wondering if I could do this with BeforeFeature so that I can use Tags to say which environment I want to run, and which tests I'd like to be able to do on any/each environment. Part of the problem I have in
figuring this out is one of the Feature Scenarios I have to run contains an example table that will have different values for Test and Local.
Can I set up something like this in my Step Definition file?
[BeforeFeature("Test")]
public static void BeforeFeature_Test()
{
setupEnvironment("Test");
}
[BeforeFeature("Local")]
public static void BeforeFeature_Local()
{
setupEnvironment("Local");
}
If I have the tags #Test and #Local set up in my Feature files can I
run BeforeFeature like this to get the correct settings I might need
for my tests or environment?
With the Example Table I have something like:
Then I should be able to access <weblinks> pages
#Test
Examples:
| weblinks |
| http://test/url1 |
| http://test/url2|
#Local
Examples:
| weblinks |
| http://local/url1 |
| http://local/url2 |
Can the #Test and #Local tags work for both the Feature tests I want to run and the example tables?
I'm running this in NUnit, and I have my configuration set up with allowRowTests="false" as I noticed someone mentioned on the list before, but that may have been in an earlier SpecFlow, I am using 1.8 in Visual Studio 2010 with WebDriver and C#.
It looks like I can do this, it just took me a bit to understand how to link the two together. The Setup issue is separate, and still an issue, than the Examples issue, but I know how to work the table issue out.

Tfs custom work item value migration

I have a task to create reports about various work items from a Team Foundation Server 2010 instance. They are looking for more information than the query tools seem to expose which is why I am not using the OOB reporting capabilities. The documentation on creating custom reports against TFS identify the Tfs_Analysis cube and the Tfs_Warehouse database as the intended sources for reporting.
They have created a custom work item, "Deployment Requests", to track requests for code migrations. This work item has custom urgency levels (critical, medium, low).
According to Manually Process the Data Warehouse and Analysis Services Cube for Team Foundation Server, every two minutes my ODS (Tfs_DefaultCollection) should sync with the Tfs_Warehouse and every 2 hours it hits the Tfs_Analysis cube. The basic work items correctly show up in my Tfs_Warehouse except not all of the data makes it over, in particular, the urgency isn't getting migrated.
As a concrete example, work item 19301 was a deployment request. This is what they can see using the native query tool from the web front-end.
I can find it in the Tfs_DefaultCollection and the "Urgency" is mapped to Fld10176.
SELECT
Fld10176 AS Urgency
, *
FROM Tfs_DefaultCollection.dbo.WorkItemsAre
WHERE ID = 19301
trimmed results...
Urgency Not A Field Changed Date
1 - Critical - (Right Away) 58 2011-09-07 15:52:29.613
If I query the warehouse, I see the deployment request and the "standard" data (people, time, area, etc)
SELECT
DWI.System_WorkItemType
, DWI.Microsoft_VSTS_Common_Priority
, DWI.Microsoft_VSTS_Common_Severity
, *
FROM
Tfw_Warehouse.dbo.DimWorkItem DWI
WHERE
DWI.System_Id = 19301
Trimmed results
System_WorkItemType Microsoft_VSTS_Common_Priority Microsoft_VSTS_Common_Severity
Deployment Request NULL NULL
I am not the TFS admin (first exposure to TFS is at this new gig) and thus far, they've been rather ...unhelpful.
Is there be a way to map that custom field over to an existing field in the Tfs_Warehouse? (Backfilling legacy values would be great but fixing current/future is all I need)
Is there a different approach I should be using?
Did you mark the field as reportable? See http://msdn.microsoft.com/en-us/library/ee921481.aspx for more information about this topic.
Based on Ewald Hofman's link, I ran
C:\Program Files\Microsoft Visual Studio 10.0\VC>witadmin listfields /collection:http://SomeServer/tfs > \tmp\witadmin.txt
and discovered a host of things not configured
Reportable As: None
At this point, I punted the ticket to the TFS admins and indicated they needed to fix things. In particular, examine these two fields
Field: Application.Changes
Name: ApplicationChanges
Type: PlainText
Use: Project1, Project2
Indexed: False
Reportable As: None
or
Field: Microsoft.VSTS.Common.ApplicationChanges
Name: Application Changes
Type: Html
Use: Project1, Project2
Indexed: False
Reportable As: None
It will be a while before the TFS Admins do anything but I'm happy to accept Edwald's answer.

How do you counter BDD-scripting anti-pattern in Specflow?

This is an example of one of our acceptance tests:
Feature: Add an effect to a level
In order to create a configuration
As a user
I want to be able to add effects to a level
Scenario: Add a new valve effect to a level
Given I have created a level named LEVEL123 with description fooDescription
And I am on the configuration page
When I click LEVEL123 in the level tree
And I expand the panel named Editor Panel
And I click the Add Valve Effect button
And the popup named ASRAddVal appears
And I click the Add new button
And I fill in these vertical fields
| field name | value |
| Name | Effect123 |
Then I should see the following texts on the screen
| text |
| Effect added : EFFECT123 |
We feel that this is getting a bit to verbose and we want to hear how you reduce steps in Specflow. From what I've read so far, creating specific non-reusable steps is not recommended, so what is considered "best practice" when doing this in SpecFlow?
Update:
What I am trying to say is that I've learned that you should try to create generic steps in order to re-use them across multiple tests. One way to do that is to parametrize your steps, for example: "Given I have created a level named ..", but the parameterization also introduces verbosity. I want to end up with something like Bryan Oakley suggests in his answer, but I just can't see how I can do that without creating steps which are very specific to each tests. This again means that I'll end up with a lot of steps which reduces maintainability. I looks like SpecFlow has some way of defining abbreviating steps by creating a file which inherits a base class called "Steps", but this still introduces new steps.
So to summarize things; show me a good approach for ending up with Bryan Oakleys answer which is maintainable.
I would simplify it to something like this:
Scenario: Add a new valve effect to a level
Given I have created a new level
When I add a new valve effect with the following values
| field name | value |
| Name | Effect123 |
Then I should get an on-screen confirmation that says "Effect added: Effect123"
The way I approached the problem was to imagine that you are completely redesigning the user interface. Would the test still be usable? For example, the test should work even if there is no "Add" button in the redesign, or you no longer user a popup window.
You could try wording them generically and use parameters.
Given i have create a new: Level
the ':' is only so you can identify the parameter. This means you would have one generic entry point for a step that needs to create a new something. Its up to the step then to look at the parameter of Level and create a new Level
Also try to come up with a naming conversion everyone can use. It should be easy to discover what steps have already been created so you don't get duplicate similar steps.
Can I suggest that maybe the code you are testing should go into unit tests. Maybe what you mean by "test specific" are individual unit tests that are not covered by your acceptance tests.
Just a thought :)

A way to find out all affected files of a workItem or group of chgsets in TFS 2008?

I'm trying to figure out a way to find out which files were affected by a work item in TFS 2008.
I realize that this is a duplication of a question already asked by someone else here - View a list of all files changed as part of a Workitem in TFS but it went unanswered and I've been, off and on, looking for this for a while.
I understand can view the links tab of the work item and then view each changeset to see the files that have been changed. But, the work item very likely will end up with many changesets linked to it, and I would like to review the files modified as part of the work item, but I feel like the likelihood of missing a file or two is very high if I have to rely on looking at each of the 100+ changesets individually.
Does anyone know of a way to accomplish this? Thanks in advance for any help or guidance.
Sounds like a job for Powershell...
function Get-TfsItem([int] $workItemNumber)
{
Get-TfsServer njtfs -all |
foreach { $_.wit.GetWorkItem($workItemNumber) } |
foreach { $_.Links } |
foreach { ([regex]'vstfs:///VersionControl/Changeset/(\d+)').matches($_.LinkedArtifactUri) } |
foreach { $_.groups[1].value } |
Get-TfsChangeset |
Select-TfsItem |
Sort Path -Unique
}
The first several lines are kind of ugly. We have to hit the webservice API directly since the TFS cmdlets don't cover the bug tracking system. And the objects we get back require some regular expression love before they'll do what we need. Piping to "foreach" over & over is an unfortunate Powershell idiom that arises when you mate an unfriendly API to a lame projection operator. (I use my own replacement, personally, but you can't rely on that.)
The last 3 lines should be self explanatory if my TFS Power Cmdlets are installed & doing their job.
I just found Scrum Power Tools plugin for VS 2010 that does this with a button click in VSS, installed and it worked. http://visualstudiogallery.msdn.microsoft.com/3f261226-530e-4e9c-b7d7-451c2f77f262
I am just trying to make the powershell version 2010 work. http://msdn.microsoft.com/en-us/vstudio/bb980963
First problem is that the pwoer shell option is not installed by default, use custom install and select that option. When completed there is a powershell prompt in the TFS powertools 2010 menu, the commands only work in there.
The get server I had to replace njtfs with the url http://tfsserver:8080/tfs and remove -all. The script still fails.
Ultimately I need a detail report that lists:
source 'work item' 'change set'
For example:
xyz.cs 'work item 1' 'C397'
xyz.cs 'work item 2' 'C399'
Eventually I have to then work out that work item 1 is dependant on work item 2. I also have to track back to work item 1 to check the status.
Can someone assist with a 2010 version script? I have never written PS before.
I needed the exact same thing and I wrote a TFS utility for myself, using TFS API. It allows you to see all changes a work item triggered over time, and some things more. I've put it on codeplex. You can get it from:
tfshelper.codeplex.com

Resources