UI Views – Include or Exclude from Code Coverage
My post today comes after watching the code coverage hover just over 70%, constantly asking myself is it possible to get

100% coverage and a discuss with a few internal colleagues on the subject. Interesting to know is if I exclude the views from code coverage, I hit a high of just over 90%. So, is not testing your UI the end of the world? Not at all, as long as you use good development practices and aim to make your UI as slim as possible, without any business processing, branching or conditional type logic.
I’ve been very pleased with using the PureMVC framework on my current project, and haven’t running into any Ah! Ha! I gotcha scenarios yet and frankly can’t envision any as we continue to add new features to this application. In fact using PureMVC has helped me think more about testability of our code and its single messaging bus has been just what the doctor ordered in terms of eliminating Publishing/Subscribing to events between the various components of the system, namely Mediators, Proxies and Commands. But with great power comes great responsibility.
One could easily access the Singleton Facade of the PureMVC framework directly from your view and send a system wide message to any component interested in that message. The problem here is testability of the UI event required to trigger that system notification.
For instance in the code snippet below you would have to create an instance of the UpgradeView and simulate a click of the download button in order to test sending this notification.
Read more »


