I am a big fan of Brownfield application development. Without a doubt, a great book, and I would recommend it to all developers. I am here because I realized that in code coverage. In my new store, we use Team City for automated build / continuous integration, and it takes about 40 minutes to complete the build. Brownfield's book talks about frictionless development and how we want to alleviate the overall burden developers must bear. Here is what I read on page 130.
“Code coverage: two processes for the price of one? As you can see from the sample goal in Listing 5.2, you get two output files: one with test results and one with code coverage results. This is because you actually perform your tests during this task.
You do not need to technically perform your tests in a separate task if you are working on a code coverage task. For this reason, many teams will replace the automatic code coverage task for their testing task, which basically performs both actions in a CI process. The CI server will compile the code, test it, and generate statistics coverage code for each registration.
Although there is nothing conceptually wrong with this approach, be aware of some of the negative aspects. Firstly, theres overhead to generate code coverage statistics. when there are many tests, this overhead can be significant enough to cause friction to form a longer automated build script. Remember that the main build script should run as quickly as possible in order to encourage team members to run it often. If it takes too much time, you can find developers who are looking for workarounds.
For these reasons, we recommend that you complete the code coverage task separately from the default script build task. It should run at regular intervals, perhaps as a separate scheduled task in your build file, which runs every two weeks or even monthly, but we don’t feel that the indicator has a sufficient advantage to guarantee additional overhead for each registration. "
This is contrary to practice in my current store, we performed NCover for assembly. I want to go to my example and ask us not to do this, but the best thing I can do is tell him: "This is what Brownfield's book says." I do not think this is good enough. Therefore, I rely on you guys to fill me with my personal experience and advice on this topic. Thanks.