TFS, Scrum template and Product Backlog Item - tfs

I am trying to add stories to my product backlog.
Am I right in saying that, within the PBI in TFS(2012), for a story that sounds like:
As a user, I want to login to the system so that I have access to the features my login allows.
Is that a valid story? And then, within TFS, there's a 'Name' and a 'Description'. Wouldn't the description be what I wrote above, and the name be 'Login'? I'm battling to work out what best practice would be for entering my product backlog items.

When I have used TFS, I have tried to keep the "Title" (or "Name") to be a shortened value that can be easily searched and sorted. That value is used when displayed in queries and on the board, so I find it handy to have a different format than the standard user story description.
I would then recommend the user story text you have be in the description. Something like this:
Title: Authentication: Login
Description: As a user, I want to login to the system so that I have access to the features my login allows.
In earlier versions of TFS, I wasn't able to tag stories (which is now possible) so we used a Theme in the title of our stories to quickly identify in the Title what investment theme the story belong to (in my example, Authentication).
You may want to consider that the story may get broken down into multiple stories, and your Title should be able to be used to represent that. For example, you may have a story about an SSO requirement, a Logout requirement, a loading of personal details upon login, a "Remember Me" story, etc. Using your Title in such a way as to allow for the grouping of all these stories will help you down the road.

My version of the Scrum Process Template doesn't have a name field, I'm not sure where that is coming from (it might be a customization in your TFS instance).
Your story seems like a proper Title.
The Description would probably expand on the title adding because, why, value proposition. May possibly elaborate a bit more or give context to the story.
Be careful that the story you add has proper value. I as a user don't want to login to a system, I want it to recognize me in the easiest and secure way possible. I want it to ensure I am the only person who can see my personal data. A logon screen is an implemetation of these desires, but it's usually just one of them and possibly not the best one to match my demands as a user.

Related

Is there a way to show commits on subtasks of stories in a Jira scrum board?

We are migrating from an in-house tool to Jira for managing our scrum board, and we have concerns that I have been unable to resolve by searching the Internet. But you folks are smart, right? ;-)
Our current scrum board shows the usual swim lanes across state columns (for todo, progress, review, done). Each swim lane represents a user story, and has a link to (and a snippet of) the user story description in Jira. It also has a number of 'tickets' (these would be subtasks in Jira lingo) that start in 'todo' and move across to eventually end up in 'done'.
So far, Jira can do all of this, too (although creating sub-tasks is rather a lot more work in Jira than in our in-house tool). However:
When we commit code, we include a ticket ID in the commit message, and thus each ticket displays a list of commits that were done to complete that particular ticket / partial story. I haven't been able to find out how to do this in Jira -- if it's possible at all. Instead, it seems one must open a sub-task to see if there are any commits on it?
Each commit also shows its review state, which gives us an excellent overview of how close to done a ticket really is. I haven't been able to find out how to do this in Jira -- if it's possible at all. Instead, it seems one must open the sub-task, and drill down further into Fisheye(?) in order to see the review state?
In total, our tool provides a one-screen overview of the state of each user story, ticket, commit, and review state; and it's very lightweight to pull in new stories (from Jira) and add tickets. We fear that Jira is not able to provide such a one-screen overview, forcing us to open Fisheye in order to know whether a given commit has passed review.
Is it really true that Jira must be this cumbersome?
For reference, here is what a single ticket (subtask) looks like in our system:
And if you look at the whole scrum board, it's actually quite easy to get a feel for the number of commits on individual user stories and tickets, and the ratio of pending/passed/failed code reviews:
I agree with your fears when you say
We fear that Jira is not able to provide such a one-screen overview
In my experience (7+ years with Jira/Agile) I've not seen a such condensed view of information about a sigle user story even on a swimlane with relative cards.
Also in the Atlassian marketplace there seems to be no good plugin to solve your issue, even partially.
To make such move from your in-house tool to Jira retaining all you have there, I fear you should develop a custom Plug-in using Jira SDK to integrate with the agile boards.
It may be enough to start by developing a custom field to show what you need from a "ticket" (ie sub-issue) and trying to insert it into one of the three "slots" available for cards (I mean Rapidboard card layout configuration screen).
If you wanna try, start from here.
Another option to create a new custom field would be the Adaptavist Scriptrunner plugin. It will ease the building of custom fields: your new field can be written also in Groovy rather than plain Java. I've used it to build an extended status custom field (just to give the user an immediate big picture of it) that informs him in plain english and with stylish css colors why an issue is blocked or anything else relevant, getting data from other fields or linked issues that are not immediately visible to the user. IMHO, it is very similar to your problem.

TFS 2017 power tool custom field connected to User Story

Using the power tool I was able to add a new custom field but I want that it take automatically a specific value if present.
Each test case has a "user story" associated but to associate it we have to go in "Tested User Story Section" so I'd like that in the main page appear automatically the ID of the user story.
Sorry for the confusion maybe with the image will be more understandable:
Someone can advice me of what to introduce in the Visual Studio Power Tool please? because I'm finding different example but none explain how to auto-populate with another dynamic item.
If you are asking me why it's because we want to have the "User Story ID" present in the main page so we know directly at which user story the test case is associated:
There is no way to get the User Story ID as a field. Since a single Test Case can test multiple User Stories this makes little sense anyway.
Have you tried adding Requirement based Suits to Test Professional so that you can see all of the Test Cases under a Story? From a testing perspective it makes lots of sense to look from the Story down to Tests rather than Test up to Stories.
Although my screenshots are from the Web App the features at the same in MTM. You can add a Requirement Based Test Suite that relates back to the User Story.
As #MrHinsh mentioned, there is no direct way to get the User Story ID from a field.
From TFS query, it's easy to get the linked User Story, you can select the Work Item and Direct Links in work item query, check the screenshot below:

How do describe a simple process in Gherkin-style? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Suppose I'm designing some SaaS service. And I need to have a function that allow users create sites. User can makes special settings for each site in the admin panel (e.g. design of widget) and gets unique code for install service to his own site.
User story could be:
As a logged user I want to add the new site in the admin panel so that I could configure each instance of widgets separately and could get a unique code for install widget to my own site.
Form
But if I will try to describe this functionality with BDD or GWT (Given When Then) or Gherkin-style, I will face with some trouble. I start from next description:
GIVEN I'm logged into admin panel
AND I'm on "Sites" page
WHEN I click "Add site" button
THEN Pop-up window "Add site" come up
As you can see above realization suppose that site adding will be in pop-up window (e.g. it very important for UX). Pop-up window contains Site URL input field, drop-down control with languages and "Add" and "Cancel" buttons.
And we got a strange scenario which responsible for just pop-up opening. Is it correct? And how can I name this scenario ("Add site's form opening" ??)? Also this scenario has only a one case (when I click - pop-up open). Maybe this scenario not needed at all? I'm confused...
In this case we need to create another scenario when describes:
GIVEN "Add site" pop-up form is opened
WHEN I fill the "Site URL" field
AND click on "Add" button
THEN New site will be create in system
AND I will transfer to my own site's list
How do you think, where do I need to apply a business rules such as:
1) When new site is created a unique code must be generated and consist of minimum 8 characters including numbers and Alphabetical symbols.
2) checks doesn't apply for Site URL input field and user can input a Cyrillic symbols
3) etc?
I have a lot of additional question and hope on the community help!
The thing with BDD is to stay away from implementation details as much as possible. This scenario has multiple implementation details:
GIVEN I'm logged into admin panel AND I'm on "Sites" page
WHEN I click "Add site" button
THEN Pop-up window "Add site" come up
What happens if the "Sites" page becomes "Awesome Site" page or is simply deleted?
What happens if "Add site" is not a button anymore?
What happens if it's not a popup but a redirect occuring
What happens after? Is the value simply in showing the popup? I guess not...
For this specific example, a better approach would be:
GIVEN I'm an authorised administrator
WHEN I enter all the required information for a new site and save it
THEN I should see that site in my own sites list
With this scenario, if your implementation changes, you will only have to change your step definitions, you won't have to change your gherkin. Don't forget that those tests are supposed to explain the Behaviour of the system, not the way it is implemented.
The other questions you have are more related to unit testing in my opinion:
When new site is created a unique code must be generated and
consist of minimum 8 characters including numbers and Alphabetical
symbols => I'd do it at the class level, gherkin would not be
appropriate unless the customer specifically asked for this, then
the condition is "THEN a code having the required characteristics is
generated for that site" and you would have to define "required
characteristics" in a glossary the customer can read and understand.
Checks doesn't apply for Site URL input field and user can input a Cyrillic symbols => again, would put that at the class level en same as for 1. unless the customer wants to be able to read something about it, it should be at the unit level.
I hope that answers your question. I recommend this article by Dan North if you want to have a better idea of how to write better gherkin features.
EDIT 11/13/14
Based on your comments, I suggest we take a step back and describe a way to deal with requirements in your case. I have to tell you that I'm not a BDD expert and am only sharing my own personal experience, for more info on the subject I suggest you get in touch with the guys behind BDD Kickstart and Cucumber.pro where you will find online BDD courses. They will be able to give you lots of information and books to read.
That being said, let's dive into the subject.
The first thing you get is a list of features or stories that, if you follow Mike Cohn's story template would look like:
As a <type of user> I want <to do something> in order to <serve a business purpose>
I personally like to put the business purpose first to make sure we don't skip it in the discussions. You might also not follow that template and that's fine, but remember that it's a good idea to make sure the features you are listing with your customers have a business purpose. If there is no business value behind a feature then what's the point of doing it anyway...
So you do have a list of features/stories described as above. Now for each of these features, there are different cases or scenarios, that's what Dan describes in his article. This is where the Given-When-Then is introduced.
Scenario: Title
Given <some context>
When <there is an event>
Then <something happens>
Each of those scenarios are examples on how this specific feature behaves in different contexts. They are the different acceptance criteria for a specific feature, things the customer described as the expected behaviour of the system. They should be ignorant of any implementation details. So stuff like:
Given I am on page "First page"
When I click "Hello world"
Then I should see "You clicked hello world"
Is wrong for the reasons described prior to this edit.
Let's assume the following feature:
In order to save time when answering clients requests, as a webmaster,
I want to be able to manage the list of websites I am responsible for
Scenarios for this story would be:
Scenario 1: Show a list of websites
GIVEN I am an authorised administrator
AND I am managing several websites
THEN I should see a list of all the sites I manage
Scenario 2: Add website to list
GIVEN I am an authorised administrator
WHEN I enter all the required information for a new site and save it
THEN I should see that site in my own sites list
Scenario 3: Edit website from list
GIVEN I am an authorised administrator
WHEN I edit the site informations
THEN I the changes should be visible in my sites list
...
Now what if you want to go into data validation stuff like "site should have a title" for instance. To me there are two different ways to approach this. You can test that from the user's perspective with a full-stack test or test that there is some validation at the object level.
Let's assume the following scenario:
Scenario: New site has no title
GIVEN I'm an authorised administrator
WHEN I forget to fill in the title for a new site and save it
THEN I should be warned the site is not valid
You can use cucumber or specflow to run this scenario from the UX, therefore using some kind of browse-based proxy to test your app. That is usually slow as it hits the whole system and simulates a real user. It's an option, but I don't think it's the best though. IMO not all tests should be run against the UX and having too many Gherkin features can be a pain to maintain, that's why I prefer focusing on having the happy or critical path (usually I ask myself, where does the money comes from) tested full-stack and put the rest at lower levels.
You can still use Gherkin for these unit tests if you'd like. But that is not mandatory. You only need a way to show your customer you actually have a test for all those specific format controls and validation checks.
That doesn't mean you are not doing BDD anymore, you can still use the given-when-then-should pattern in rspec if you're a rubyist, or any other testing framework you use.
Hope that clarifies all this, let me know if there are any confusing parts...
I think Marc simply deserves the big green tick on this one, thanks to his amazingly thorough answer!
I just wanted to add a few comments.
You don't need to automate all your scenarios.
If you want to capture business requirements in a form that everyone (i.e. including non-tech savvy folks) can understand and Gherkin's Given/When/Then work for you, just go for it. There's nothing forcing you to automate all of your scenarios.
You don't need to automate all your scenarios through the UI.
Your software is made of layers that often respond to similar behaviours, via different interfaces (UI, HTTP, API, ...). Should you want to describe fine-grained business rules (i.e. site name constraints) with automated gherkin scenarios, you could write step definitions that talk directly to your domain layer instead of going through the user interface. That would probably still give you a decent level of confidence.
As a side note, I would recommend not to use Given/When/Then in classic testing frameworks (i.e. those that only devs can see!) if your purpose is to share your tests/requirements with non-tech people.
Have conversations!
Above all, BDD is about better communication: try to talk more, involve your developers (or some of them) earlier in the process so that they gain more knowledge, sooner. Formalising Gherkin scenarios comes in a second phase. Automating them should even be further down your priority list!

Is it possible to write a TFS Shared Query with a parameter on a custom field?

I have a set of queries on the Team home page that use the standard #Me, for example to let different users quickly get to bugs they have personally raised, PBIs they created that are now in a certain state.
The users are in customer groups and I'd like to have a similar set of queries showing as tiles on the home page, e.g. "Team Open Bugs", "Team PBIs for review".
Is it possible to write a query that does this -
Select all [work item type] from [team project] where [state] and [#myCustomerTeam] ?
From what I have read so far I believe this is not possible, and certainly not possible through the UI. I'm curious to find out if anyone has solved a problem like this - having different customer groups see different Team Favorites tiles on the Home page of Team Web Access - in some other way. I'm going to try making three sets of queries and putting different permissions on them (there are TFS groups that correspond to the Customer Group field) but I'm not confident that Denying even Read permission on the query itself will stop the tile showing on everyone's homepage.
Edited to say that solution worked for my purposes, as per comment.
Still interested to know if anyone has managed something like this more cleanly. In this case the field I would have liked to parameterise happened to be something I could map to a completely different type of thing, thus shifting the problem. I can imagine wanting to parameterise a field that didn't have that characteristic though.

TFS task with more assignees

What is the best way to store a task for multiple users in TFS 2010 ? I can only assign one for one task.
(for example: when I plan a demo to all developers)
(this is a scrum Msf Agile project, where the task is part of a user story)
I'm sorry to tell you that you can't assign multiple users to a single work item out of the box; At the same time, I do not recommended trying as this, as it does not fit the model in TFS. The conventional / recommended way to handle this type of scenario is to create multiple tasks; one for each developer in this case. You can easily accomplish this by copying a set of tasks using MS Excel. Another option (given the example you used) is to create a "Meeting" work item that has multiple drop-downs - one for each person that would attend meetings like for a demo or a technical review.
Yet another option is to create a custom control to format and store a list of users. This would likely be relatively complex to maintain, as you have to distribute it to each user's machine (it will need to be installed locally), and last I checked you would need 2 versions; one for the Team Explorer user interface and another for the Web Access tool that most people use to create work items from a web page on their TFS server. Future updates to TFS could possibly break your custom control. It is rarely worth the effort. Another downside is the you would likely be limited by how you can use MS Excel to work with the data you store in the field that the custom control works with. If you want to look into this further you can find some examples in the following CodePlex project: http://witcustomcontrols.codeplex.com/
You might consider your true goals in tracking such things as meetings and other items you want to assign multiple people to. Tasks are the heart of tracking progress of user stories in the MSF Agile Template. Tracking meeting attendance does not typically relate directly to a User Story, for example; so it won't typically assist you to determine how much close you are to being "done" with a User Story. If you want to take advantage of the existing reports, then you should organize your tasks so that they roll up as child work items to User Story (or Bug) work items.
Short story: you can't. Work items in the Process Template of Microsoft are designed to target nobody or only one User.
Now you can customize the Process Template to change this.
Take this post for instance, the customization works for group. But I don't recommend you to do so because TFS is basically not designed for that and you may end up disappointed.

Resources