How to improve the coding when you are a Test Manager?

The idea for this post came up recently on the quite fruitful meeting, on which the management discovered that the code quality in the project is quite good, according to tools the team is using. It is impressively ‘green’ 🙂

On the other hand, when we’ve analyzed the other code metrics – it turned out that the cyclomatic complexity is not so great.

If you are not familiar with the term, cyclomatic complexity is used to measure the complexity at the class or the method level. It is a quantitative measure of the number of linearly independent paths through a program’s source code. It helps to keep the code in as testable and maintainable way as possible, by indicating unnecessary complexity. You can see an example below:

Example taken from https://craftofcoding.files.wordpress.com/2014/11/cyclo_complexity.jpg

What is more, in the project, I am thinking of, the complexity went up, completely unnoticed. It may mean that there was no one in the project, who payed attention to the overall coding progress and its’ quality. Developers did their job, used Sonar Cube to check their recent changes out and when they discovered no major bugs, they were happy with the result. Job done.

https://thewarrencentre.org.au/wp-content/uploads/2017/02/must-cat-yarn-960×447.jpg

The question was – what can I do about the code quality when I am not a developer? There will always be a specialist who might claim that he knows better, and in fact, this is the truth. Shall I stand against years of coding experiences with my gut feeling that we don’t improve the overall software quality but only test the separated pieces of it?

Our simple answer during the meeting was – I can check the metrics and then talk to the developers who can do something about the coding quality. I needed more metrics and more thinking, though.

Each project is different and each is a challenge for both – developers, managers, and the testers – but every time you wish to improve the quality – it is possible.

Testing management is still quite a big unknown for me, but I try to act like a tester but to think more like a manager with a broader perspective. To achieve my goal – fight the unnecessary complexity and improve our work quality – I decided to use some new tools.

I spent some time every day thinking of how to test differently, explore, how to x-ray the code to get more information about vulnerabilities and flaws. What helped me out? A set of tools that I use on a regular basis – they may not be always associated with testing, but I found them very useful – from a management perspective.

The first one was Jira plugin X-Ray and the second was SonarQube. I am sponsored by none of them, I just find them OK and worth to try out.

X-Ray turned out to be a nitty-gritty tool when you use Jira daily. It just adds value to your work. It gives the opportunity of managing all test cases, not only the automation but the manual ones as well – all in one place, with some basic visual reports. I like it, my bosses like it, you should at least try it.

The biggest flaw of the X-Ray is that it has poor overall metrics and helps you gather and name the tests, but is not the best in visualizing the progress or spotting the gaps. To do so, you need to know JQL as well and combine both to create filters and dashboards.

I’ve also discovered, that SonarQube may not necessarily be just a tool for developers, but also useful toy for the quality manager. I check Metrics and Activities tabs and look for points for improvements.

I don’t mean spotting the obvious errors or bugs – I mean rather mean hunting for vicious code in the project and implying the constant need for improvement.

If you have anything to to with the test management or quality assurance as well- I recommend this short exercise for you every day: start your working day from a short trip around different metrics – nightly builds, code coverage, cyclomatic complexity and so on. I guarantee that every day there can be a discovery that you can later address to improve the quality and stability of your product. If you tend to forget the obvious, as I do, make yourself a reminder in your calendar. It will help you structure your work and do better every day.

Managing, checking, metrics blah blah blah – “Do you fix it on your own, girl?” hahaha.

Here comes this harder part of the job – the part in which you approach people and kindly ask for help or advice. In my opinion, testing, managing, or whatever job you do, is always about talking to the people and working for the same goal – good product quality. The reports themselves or improved cyclomatic complexity won’t make your project better or worse – the point is – how can you benefit from them and what you can achieve as a team. This is a completely different story 🙂

If you would like to know more about tools that I use or if you have a better tool to recommend – just let me know in the comments section below or on Twitter.

Published by Kinga Witko

Author, Blogger, QA specialist, Agile Tester, cruelty-free. Sugar - free food lover.

Leave a comment