I have talked about unit testing the Metric Dashboard, today I had some time to dive into the task.
I decided to test the Bugs Caught feature of the Visual Studio Addin, I caught two bugs, the first has to do with the order of reading the trx files, the second had to do with saving the unfixed unit tests between sessions so that we don’t re-count failed test that are run multiple times.
Using Files in Unit Tests
I decided to use real trx files in the unit test (I found several different ways to do this, using real files seemed the easiest). This is what the file structure looks like
To read the file the tests I had to either deploy the files or do the following.
underTest.Load(@"..\..\..\