Feedback Tool
Standalone feedback tool while the person reviews the application. Not part of visual studio but actually a small application that handles that feedback. Similar to the test manager and records video and audio of the person reviewing the feature. All launched from an email.
Allows for informal feedback text area.
These feedback items are artifacts of the project. Comments and etc. part of a free download for the feedback tool.
Feedback to Feature
You can attach story boards created in PowerPoint to wire frame and mock up screens. This allows these assets to become artifacts to the PBI.
As long as you save to a shared share point location (share point or shared location) tfs can locate that item and associate the storyboard to the PBI.
Everything in TFS web access is now touch enabled.
Forecast feature that allows prediction when PBI will be completed based on correct velocity.
Lots of actions are dragable which automatically updates the state of the task instead of needing to update the work item directly.
Unit Test Explorer
Allows more unit test runners, more than just mstest.
Bug work item
Verify the feedback request and create a bug work item with all relevant information about the system and the screen shots. Under exploratory testing you can record the steps. This action of recording the bug also creates a test script. After the bug is created this test script can be used to verify that the bug was indeed fixed.
Suspend and Resume
The whole IDE is shelved to TFS, taking shelve sets to the next level. Allows you to completely shelve changes and start working on another task without having to worry about loosing work at all.
There are built in tools to help archive assets and test information.
Search everywhere, team explorer, solution explorer, even error output. Search is everywhere in Dev11
Inteillitrace is still only available to visual studio ultimate. Let’s you go forward and backward in the whole call stack.
Code Review
Part of dev11, request review from team explorer. Changes are automatically associated with your current to-do task in the project. Code review can be triggered easily from the in progress area in team explorer.
Reviewer accepts the request and shows the files that are modified for the request. You can view the code in a few modes, diff tool is the default view when doing the review. Allows you to add comments to the changed line that is bound to that file/line as an artifact in the system. Even if the file was not modified but part of the request you can add comments. (can be for the full review as well) You can save and finish the review or just send the comments only to the developer that submitted the request. Allows the developer to start fixing while the review is in process or start a dialog that is logged by the system. Requester looking at comments will take the user right to the file that has the comments so it is easy to see what exactly was commented on. The change set will associate the files and also the code review when checking into TFS.
Build Automation
Very similar to TFS2010, builds can detect test impact analysis so the testers know if any tests where impacted by the check in to TFS.
Can use most of the out of the box items, however if you want to do deployment still need to mess with windows workflow foundation.
Test Manager
During testing you can setup various data and diagnostics. Event log, action log, intelliTrace and other aspects. (Need to look into IntelliTrace and install on server, sort of a black box on an airplane so you can see what is happening while testing or even in production.) With an web application it will monitor the whole application pool or even a whole server. New feature packs for IntelliTrace will allows for greater control of diagnostics for example a single class.
When starting a test you can choose to create action recordings. These action recording allows you to script repeatable steps like logging into a system or repetitive tasks. Action recordings also allow you to automate a manual test since the actions of the user are now being recorded.
When doing a test you do not need to pass or fail each step but it helps to slice up the recorded video so the viewer of the video can easily jump to a section.
During the test phase you can create a new bug easily which includes all the data and diagnostics chosen when setting up the test case.
The exploratory phase (just checking out the app) allowed you to easily create test cases that can be easily reused later on in the process, this is perfect when you don’t have a dedicated test team.
Creating Automated Regression Test From Manual Test
Add a new test project to your solution to add a coded ui test. Since the tester used a the action recording when creating a new test you can use the existing action recording. In your test you need to build out assertions to make sure that the test actually passed successfully. You can add steps to the test and add these assertions by using the cross hair tool in the recorder to make sure that certain values present or not present on the page. This will allow you to correctly create the regression test.
You create a new test case and associate it the coded ui test so it can be added to the test plan.
Labs Management
This is now part of premium. Lab does not need to be virtual can be a mix of virtual and physical. They have network fencing so you could have identical environments setup for these automated testing. Open up the build definition and open up the process tab. Under lab process you can go through the wizard to setup the lab. Setup the build to run, deploy to that machine, and which test to run. Under environment you could even setup the process to revert back to a snap shot that is a clean slate or even at a particular state.
IntelliTrace
In DEV11 you can use this on production. You couldn’t do this with VS10. No software to install you just run a few files and it begins to capture information. The more you monitor the more performance hit you will experience since it intercepts and logs numerous pieces of information.
Ideal is to turn on the IntelliTrace do your action, turn it off and get out to run diagnostics at a later time in DEV11.
This creates an iTrace file which allows you to open it up in Visual Studio. Allows you to see thread list, exception details (if created by manual test the steps would be included). If you click on an exception you will be taken to the code that actually produced the exception. To accomplish this you need to make sure to publish the debug symbols to the server. If they are not you will not be able to harness the power of IntelliTrace. This is almost like a DVR for the debug session. You can step forward and backward during the call stack. No license required to run the collection tool but needed to open up the collected information.
It has been awhile since I posted something on F#, but I have been busy reading part 2 of Real-World Functional Programming. This so far has been one of the harder chapters. Not because I couldn’t understand what is going on in the examples it was more of a mind shift I didn’t quite yet grasp fully. Most of the examples were very easy to follow however the sheer functional aspect of the examples made me realize I am not thinking functionally quite yet, hopefully I will be soon. As usual here are some random notes and blurbs that stood out for me while reading this section.
Chapter 5, Using functional values locally
- In F#, if you need to recognize that a type either contains a value or does not, you can use the ‘option’ type. When working with the option type you never have the danger of dealing with a NullReferenceException since by definition an option type always is something either a value or missing a value.
- Values are typically used to solve problems in functional programming
- Data is usually something large and used by multiple portions of your program
- A type specifies an entire domain of values and a value is always an element within a domain specified by its type.
- Returning multiple values from a function is the primary motivation behind using tuples
- You can use out parameters in F# as you do in C#, however tuples is generally preferred, because of that .net method that utilize out parameters expose a method that returns tuples
let (success, parsed) = Int32.TryParse("42") - When using tuples always consider the complexity of the tuple you are creating
- A tuple can contain more than two elements however if you begin to use 3+ elements in your tuple consider creating a record type for greater readability and maintainability
- Discriminated unions provides support for values that can be a number of named cases
- When doing pattern matching on Discriminated unions you are required to write all possible matches since the value passed into the function is unknown.
- You can declare a variable with let bindings twice, this practice is known as hiding a value
- The pattern matching construct in F# is similar to the switch statement in C#
- In F# null is rarely used, most times when you encounter null it means you are working with other aspects of the .net framework, in F# the use of the option type is preferred
- When using the option type in F# you are forced to write the match when a value is undefined
- The option type is similar to Nullable<T> as in C#
- F# type inference allows for the creation of function that use generics automatically
- F# filter is to C# where linq extension method, they both take a predicate function
- In C# you create lambda expression and in F# it is a lambda function
- A function is called a pure function if it behaves in a mathematical way, a function that returns true for even numbers for example
- The F# lambda expression starts with the fun keyword, you specify multiple arguments with spaces, you do not have to specify the type explicitly.
- In C# you can not use the var keyword when creating lambda expressions since the compiler needs to know if it is a Func or an Expression
Chapter 6, Processing values using higher-order functions
- Higher order functions are very important to functional programming
- You can create custom operators in F# using the normal let binding as you do with functions. You can use any F# mathematical character or logical operators and other special characters ($%.?&^~!), you can also use * however care needs to be taken since that is also used for a multi-line comment
- When creating custom operators you can use infix (takes two parameters) notation when using the operator, “A” +> “B” +> “C”
- You can also create prefix operators (takes one parameter) you need to start the operator with either ~ or !
- Use of the |> operator allows you to write the argument on the left hand side of the call, this is very similar to the idea of calling C# extension methods where the variable is on the left as well
- If you wrap an operator inside of () this allows you to call the operator as you would a function. 2 + 2 using () would look like (+) 2 2
- One of the most important types in F# is the option type
- Option.map transforms a given option type into another option type specified by the mapping function supplied
- Understanding a behavior of a function using only the type is a very important skill of a functional programmer
- option.bind invokes a function that takes an option type that also returns an option type
- You can compose functions together by using the » operator
Example from MSDN, the result is 202 (100 + 1 * 2)let function1 x = x + 1 let function2 x = x * 2 let h = function1 >> function2 let result5 = h 100
- In F# if you want to do SelectMany the corresponding function is List.collect
Chapter 7, Designing data-centric programs
- When desiging a functional program, first think about the data that the program works with.
- When a record type in F# is simly a labeled tuple
- When declaring a record type you have to specify the types of the fields and their names
- When creating a record type you do not need to specify the type of the record since the F# compiler will infer the type based upon the fields
- A record is a functional data structure which also means it is immutable as well
- F# allows you to create new record types easily by using the with keyword, this allows you to create the new record type and only specify the fields the are changing, F# will copy the rest automatically
- The hole in the middle pattern allows you create a generic function that takes a function which gets executed in the middle. The hole is the function you supply to the other function that has pre and post logic.
- The .net IEnumerable<T> is abbreviated as seq<’a> in F#.
- Seq.head is the same Linq extension method .First()
- Code example from chapter 7
Chapter 8, Designing behavior-centric programs
- One frequent requirement for behavior-centric programs is the ability to load new behaviors dynamically from a library
- Since functions are treated as values you can easily create a list of functions to run on some type
- Storing functions in a list easily allow you to add and remove these behaviors
- Point free programming style allows you to define functions that do not directly specify the argument names, I do not exactly understand this yet but the wikipedia article sort of explains it
- Point-free style should be used only when the intent is very clear since removing the arguments from the definition could make the code harder to read and maintain
- The strategy pattern is useful whent he application needs to choose several algorithms at run time
- The command pattern describes a way to represent actions in an application, when using the command patter you most likely will need to work with mutable state. Since functional programming relies on immutable state when using the command pattern you should document clearly where the mutable portions are located.
- Closures allow you to limit the scope of mutable state when developing functional programs
- A function isn’t just code it also is a closure
- You can create mutable values by using the ref keyword
- C# variables are mutable by default so when using closures be very careful, an example would be a for loop creating a closure over a variable which ends up being the last value in the last iteration for all closures
- If you use a let binding followed by an and this allows both bindings to see each other
Next up in the book is advanced F# topics, I have a feeling tackling functional programming in one month might end up being a pipe dream. Learning the syntax is easy altering your mindset is hard.