Jim Counts
http://ihadthisideaonce.com
@jamesrcounts
| Forum | Thread | Replies | Latest activity |
|---|---|---|---|
| Coffeehouse | Using MEF for the first time : any words of experience? | 11 | Feb 03, 2012 at 6:25 AM |
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
| Forum | Thread | Replies | Latest activity |
|---|---|---|---|
| Coffeehouse | Using MEF for the first time : any words of experience? | 11 | Feb 03, 2012 at 6:25 AM |
Testing ASP.NET MVC Views, from New Project to the Build Server
Jul 26, 2012 at 10:15 AMHere are a couple follow up notes about getting the project to work on the build server.
Testing ASP.NET MVC Views, from New Project to the Build Server
Jul 22, 2012 at 9:48 AMCertainly there are aspects of testing views that are less than ideal.
To me the ideal workflow would be something like this.
// Instantiate ViewEngine
// Render a view to a string by providing a path to a template and an in-memory model
// Verify.
But that's not the world we live in, so Llewellyn (@llewellynfalco) and Henrik (@henebb) found another way.
When someone says an approach is fragile, and we're talking about testing, to me that means the test fails when it shouldn't--reacting to changes in the environment that I don't care about. We've found some ways to resolve some of these sources of fragility. For example, we resolved the problem caused by specifying a relative path when starting up CassiniDev. The exact location of the webapp on the disk is not something I care about, so that was fragility and we resolved it.
Some parts remain fragile, like the problem with port numbers. I don't care about the port number, but it makes my test break when I change it. After the talk, Llewellyn and I brainstromed some ideas for resolving the problem with ports, but its too early to say if any of those ideas will pan out.
I'd like to know some specific areas you found fragile and if you had any ideas about resolving them. Testing Views isn't pretty, but I know of at least three teams using this approach in production, and we're all pretty happy with the results. The day to day "practical" fragility is not as high as one might think after watching a 1 hour demo.