Automation in the test preparation phase

Nowadays we don’t need to explain that functional testing is a standard component within the total development cycle. Functional testing is becoming even more important and more complex. Therefore we constantly need to improve the testing process. One of the most importantimprovementscould be to automate the development of test cases in the preparation phase. This because developing test cases is one of themost time consumingactivities within the whole test process. EspeciallyinAgileprojectswhere changes in the requirements are very common. Automating the development of test cases, cansave a lot of time and moneybutalso will ensure the qualityofthe test cases!

To be able to guarantee a stable and structured testing process in the future, were we can deliver high quality and also save time and money, we need to automatethe developing oftest cases. Model Based Testing (MBT) in combination with a functional MBT tool makes this possible. 

Model-based testing is a testing technique where the runtime behaviour of an implementation under test is checked against predictions made by a model.

- From: Colin Campbell, Microsoft Research

Model based testing

To perform MBT we first require models from which we can generate our test cases. There are many different type ofmodels available withinthe development process, mostly technical models or models that are generated from the code. For the test process, we don’t require these models.

For example, if we would use a model that is generated from code, we would only test what was built. In this case: the test result is always OK. Technical models are also difficult to maintain and therefore the test process also will be less maintainable and reproducible. Above all we want the models to be readable for everyone. A readable model is an excellent way of communication to clarify the business case as soon as possible.

So the models that we do require for the test process have to be made by the tester in close consultation with the business. These test models must be maintainable and from these test models we should be able to generate the test cases. If the generation of test cases could be automated, we would be able to organize our test process more effective and efficient.

Working with the DTM tool

The DTM tool is an easy-to-use MBT tool. Within a couple of hours anyone can start to draw a test model. Thisincontrast to many other MBT tools. The test model, based on business requirements and / or (additional) input from the business, must include all possible conditions and paths. A big advantage is that this test model can be drawn in the DTM tool itself by simply drag and drop the different symbols and connector lines into a canvas. There are just 6 symbols and with those 6 symbols we can draw any test model. It’s also possible to connect one test model to another test model by using a reference symbol. In the near future it will be also possible to import Visio models directly into the DTM tool and export them to Viso if required.

When the test model is drawn and we want to generate our test cases, just click on the button ‘Generate’. We can choose to generate the test cases based on medium test coverage or high test coverage. The medium test coverage will generate all possible combinations of 2 consecutive test paths (multiple condition coverage). The high test coverage will generate all possible paths from the start of the test model till the end of the test model. Now the DTM tool automatically places numbers to the arrows out from a decision symbol in the test model. All the possible test cases will be generated automatically, based on the chosen algorithm (medium or high test coverage).

If we generate our test cases based on an incorrect test model, we will be notified by an error pop-up message, explaining for example if the model is missing an ‘end’ symbol or a connector line. If a connector line is missing this will be highlighted in the model itself.

After the test cases are generated, it is possible to highlight an entire test path of a test case in the test model. Simply by clicking on the various test cases, the entire test path for the relevant test case becomes green. If we need we can prioritise the test cases so we can obtain the test cases related to the highest risk first, etc. (risk based testing). The different categories are low, medium, high and all.

Now it is possible to automatically generate the complete test design. This means that all the test cases inclusive the test results are specified in text, in a separate document (PDF or Excel). The test design can be generated by selecting a test case priority; low, medium, high orall.

The structure of the test design in Excel is based on requirements of the quality management tool HP Quality Center. Therefore it’s easy to export the test design into HP Quality Center.

All the test cases are generated from a specific model. If there is a changein the requirementswe only needs to update the test model and thetool will automatically and easily generate all the test cases and related test design again. This saves a lot of time!

Conclusion

The automation of developing test cases has great advantages compared with the manual preparation. Not only in terms of saving time, but also in terms of high quality. Because generating the test cases is done automatically and no mistakes are made.

The DTM Tool could save a rough estimate of 70% of the total preparation time.

The DTM test tool has been used successfully in various Agile projects. A frequentlyheard comment about the DTM tool is “simplicity is its strength”.

Learn more about the capabilities of DTM tool or do you want a demo of this product? Feel free to contact Silvio Cacace, silvio.cacace@xlteam.nl

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>