Unit Testing the Metric Dashboard
While developing the Metric Dashboard, I on purposely did not write any unit tests. I wanted to feel and remember what is like to develop without unit test and see how to write the unit tests after the deed
Manually Unit Testing
The first issue that I had with developing is that I found myself running the code- either with the debugger or without – much more then usual – lets call this Manual Unit Testing . There where times when I know that I was wasting my time, and manually rerunning the same scenarios over and over again. I felt the urge to write a unit test as I knew that I was wasting my time. But the feeling that I had was always: I am nearly there, I’m just about to fix the bug, so why waste time writing a unit test. Most times, I wasn’t there and it took many runs and setups just to reach the correct scenario.
If I had the Metric Dashboard running I would have seen this
That is 32% of my time in the debugger and running the application, and 68% of my time authoring production code.
Seeing this is a great indicator that I can do better. because after all this work, I still have ZERO tests to cover me.
Application Architecture
I am going to start writing unit tests, but beforehand lets give a short architecture overview.
There are 3 components
Typemock Server
This component is responsible to store the metrics of the team and publish them to the dashboard
- The Server is a Windows Service
- It broadcasts itself to the world so that clients can discover servers automatically and free them from manually typing in the servers address
- It merges and stores the data
Managers Dashboard
This component is the reporting component and allows managers and team leader to see how unit testing helped the team (by catching bugs early on) and by spending less time doing manual unit testing. Using this dashboard we can see how much time is being put into writing unit tests and how useful it really is.
- Auto-Finder, discovers the Typemock Server and then automatically connects to it.
- Data Filtering is done in the Dashboard via different criteria’s
- Export the data as Excel
- Charts and Pies
Visual Studio Add-in
This component tracks the unit testing effort per each solution and saves it locally and on the Typemock Server. Using this each develop can see how much time is being invested in unit tests and the immediate benefits.
- Auto-Finder, discovers the Typemock Server and then automatically connects to it.
- Current Action, discovers what the developer is doing. Debugging, Running the application, Writing unit tests, Writing production code, Idle or in another application.
- Bugs caught, reads the test run data and calculates the numbers of bugs found. i.e. the number of failing tests. This component counts each failed test once until it is fixed.
- Charts and Pies.
What do the colors mean?
The colors are:
- Yellow: Communication aspects
- Green: Data aspects
- Charts: UI aspects
- White: others
Where do I start?
So now that I want to get going, my biggest question is where do I start?
1 Comment to “Unit Testing the Metric Dashboard”
Recent Posts
- Top 5 questions to ask when checking references
- Unacceptable: Unit testing will take 20 years to catch on
- The 4 reasons why we DIDN’T choose Oslo
- Typemock Academy Launch
- The First Rule to Software Craftsmanship
Categories
- .NET Tests
- Agile
- Code Integrity
- Community
- Debugging
- Fun
- Management for Geeks
- Marketing
- Product
- Release
- Reviews
- SharePoint
- TDD
- Time Management
- Uncategorized
- Unit Tests
Archives
- August 2010
- May 2010
- April 2010
- March 2010
- February 2010
- December 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- December 2008
- November 2008
- August 2008
- July 2008
- May 2008
- April 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006

[...] This is a continuation of the unit testing the Metric Dashboard series, you can find part 1 here [...]