Making unit tests your primary attention point

Publish date:

What if you get immediate feedback about your code quality, even while typing? What if you can immediately see if the performance of your code has improved with your latest change?

Test-driven development and behavior-driven development ensure that testing plays an important role in your software development. I really like the concepts that bridge the gap between software developers and non-technical roles (e.g., business analysts, functional designers, etc.) Using unit testing improves the quality of your delivery and can help you  keep your documentation up to date.

One other thing that has really got my attention in the last couple of years is live unit testing. Live unit testing is part of your Visual Studio Enterprise edition but if you don’t have that, NCrunch delivers the same thing. Even though I have a VS Enterprise license, I still bought the NCrunch license. It is quick, easy to set up, and efficiently delivers as per my requirements. For best performance, you need a heavy-duty machine – but all developers should have that anyway, right?

Live unit testing gives me insight into the results of my development work. This is especially true if I am refactoring a bit of code. If the original code is backed by proper unit tests, you will get immediate feedback on whether your refactoring works or not. I find it very comfortable to check the visual indicators in the margin of the editor for failing and succeeding unit tests. If the marker is green, I’m good to go. If it’s red, the code needs attention. The colors tell me everything

Source: https://www.freeimages.com/photo/traffic-lights-1562546

Unit tests also give you code performance metrics. The visual indicators indicate the success or failure of the unit test, but will also give the performance metrics. You will see immediately – even while typing – what the effect of your efforts are on the performance of your code.

For me, that is magic. Even before saving your code, the editor gives feedback about these metrics. It is very easy to try a different approach if a previous one didn’t give you the results you were looking for.

The big picture here is the evolution of the tools that we give our developers. Developers can be extremely productive and the tools to help them with that are readily available. One might need bigger and faster machines to make good use of them, but the proper tools are excellent value for money. A fast machine and, in this case, live unit testing make a much more productive developer. Investment in those tools is always a good idea.

Give Live unit testing a go. It really has changed my perspective on unit testing and helps in my day to day work.

Related Posts

Digital Transformation

Finance automation in the financial services sector

SEGUIN, PIERRE LOUIS
Date icon October 18, 2018

Financial services organizations aren’t as far advanced in intelligent automation as might be...

digital banking

Digital IDs help banks reduce compliance burdens, become more efficient, and less error-prone

Cliff Evans
Date icon October 17, 2018

Digital identification is appealing to banks as it helps them as well as benefits customers and...

erp

NetSuite: A platform for innovation

Matthew Haller
Date icon October 17, 2018

With NetSuite’s platform, innovation is created without impacting the software upgrade.

cookies.

By continuing to navigate on this website, you accept the use of cookies.

For more information and to change the setting of cookies on your computer, please read our Privacy Policy.

Close

Close cookie information