I often “see” functionality I am testing as a tree diagram

Creating a tree diagram can be a helpful way to visualise functionality that is accessed via hierarchical structures like menus and the tree diagrams can help to plan testing. In my mind’s eye I often see functionality as a tree diagram.

C.S French says that trees are “hierarchical data structures rather like the familiar family tree” and that “the elements of a tree are called nodes” [1].  The example tree diagram below shows the settings menus on a website. 

Tree diagrams are hierarchical and show the items that you are analysing as nodes in a hierarchy like the hierarchy they are part of. This means that in the example above you see the menu items in the tree diagram similar to how they appear in the menu hierarchy in the app you are testing. 

In the diagram above each node is a menu item, if your diagram was for config options each node would be a different config option. 

It could also be that there are a series of choices that a user can make that are not in a menu. The user starts by choosing a or b, but then for either a or b there can be more choices and then for those choices there may also be more choices that can be made. The structure of these choices is a hierarchy that can also be analysed in a tree diagram.

Visualising the choices in the functionality you are testing as nodes on a tree diagram can help you plan to get the test coverage you want to achieve.You can show in the diagram which nodes you are going to test, or you can use the diagram to ensure that you do some testing of all the nodes. It could be that for the changes that you are testing you need to test all menu options, or it could be that you only need to test all the menu options at a particular level in the menu. Your tree diagram can sometimes contain more nodes than you have time to test. If there are more nodes in the tree diagram than you are going to test then being able to visualise your choices can make choices as to what to test.

Diagrams are also useful to share. If you have created a tree diagram you can share it with your team members and ask them to review it. The team can then see what you are going to test, and you can explain your reasoning. This is really helpful as it can improve understanding of the functionality and team members can offer suggestions that improve the diagram. The diagram can also be useful to share with managers, particularly if you need to show that there is insufficient time to test all the items.

I find tree diagrams are a useful way to visualise functionality that is accessed via menus as a tree diagram. I hope that you find tree diagrams useful too.


[1] Computer Science 4th Edition by C.S French

Published by Mike Harris

Mike has been working in testing for 20 years and is currently the lone tester for Geckoboard. He has been a Test Lead and has also worked as a part of waterfall, lean and agile teams. He is also Programme Secretary of BCS SIGiST. Mike has a B.Sc.(HONS) from Middlesex University and is an Associate of the University of Hertfordshire. He has set up and led a Testing Community of Practice and been part of a successful agile transition. He is Co-Programme Chair of the British Computer Society’s Specialist Interest Group in Software Testing. He also contributed to the e-book Testing Stories and has had articles published by the Ministry of Testing. Follow Mike on Twitter: @TestAndAnalysis

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: