Test Generation

    Test Generation


    Article summary

    4.1 Generating Test Cases

    In this Quality Modeller 101 Tutorial on Generating Test Cases, you'll learn how to maximise coverage in your models and define test coverage to optimise your testing.

    The coverage algorithm in Quality Modeller creates paths, including valid but also invalid, which also can be controlled through Quality Modeller’s coverage metrics to ensure you get the perfect coverage in your test suite. These coverage techniques are set up as profiles which then are set up as low, for maybe a light-touch test, through to medium, high and possibly exhaustive.

    For this tutorial, under projects, we’re using an invoicing process to generate tests through the Scenarios pane in Quality Modeller. Then cycling through the paths, each click shows a different variation on the flow through the Model.

    To further understand how the algorithm determines each path, clicking in the Test Generation tab in the ribbon menu reveals the Coverage button. Clicking this, you can see there’s an option to vary the amount of coverage according to your testing requirements.

    A benefit of using coverage profiles is that, where we may struggle to write a complex amount of tests, the algorithm in Quality Modeller can more easily determine these probable flows as part of a Test Suite.


    4.2 Browsing Test Cases and Data

    In this Quality Modeller 101 Tutorial on Browsing Test Cases & Data you'll learn how to browse test cases and export them using Quality Modeller.

    Browsing and viewing detailed information on test cases is relatively simple in Quality Modeller once you have built out your Model, you can also use built in example models as well.

    Open your chosen model and generate the test cases using the generate button in Quality Modeller. Once generated, you'll be able to view detailed information about each test case, edit them and review each path taken through your model.

    Exporting these test cases to your chosen platform is also super simple with Quality Modeller! Hitting the run button will open the export window with a range of options, including automation, test cases, test data management etc.

    For this tutorial, we're exporting test cases to Excel, however you can also export to Jira, Azure DevOps, Microsoft Word and more! Exporting test cases allows you to share information on your tests, your test steps and data with other team members.

    Additionally, you can also preview your model's test data by following the same steps as above, but instead selecting Preview Test Data rather than Export Test Cases in the export window. This will open the test data table where you can find your synthetic test data generated by Quality Modeller or any other type of data you used. If you use Quality Modeller's Synthetic Test Data capabilities, you would see a different set of data each time you check it.


    4.3 Negative Testing

    In this Quality Modeller 101 Tutorial on using modelling to optimise your test cases by always defining Negative Testing alongside positive, happy path outcomes.

    Negative Testing will provide scope to widen the amount of scenarios for testing, and this more akin to exploratory testing which model-based test case design in Quality Modeller accelerates.  

    Setting up a new Model, you’ll see it used to determine the probable journey a user would take through a process. Once generated, these journeys can be seen as Test Steps, which are easily previewed by clicking the cog in the Scenarios pane.

    Building out the model with both a happy path but also negative test paths, you’ll see use of a conditional block. Placed on the canvas, this helps punctuate a flow, from which point valid and invalid paths typically branches off through a Linear Model.     

    As a detailed example, you’ll see the invoicing system model used to demonstrate using coverage to pick up a majority of the scenarios. Decisions around how much to test are effected by factors including the amount of time, complexity required, but also your knowledge of the system under test.  

    Finally, you’ll see how to search across a model using pre-determined Tags in parallel to setting its coverage profile.


    4.4 Advanced Constraints

    In this Quality Modeller 101 Tutorial on Advanced Constraints, you'll learn how to maximise coverage in your models and define the test coverage for your testing needs.

    To understand coverage in Quality Modeller, you first must learn how Quality Modeller path generation algorithm works. The generation algorithm generates an optimised set of test cases that enables greater coverage for less test cases. The Quality Modeller algorithm allows you to maintain the model rather than individual test assets, a crucial benefit of Quality Modeller!

    Advanced coverage techniques can also be applied to ensure the perfect test suite for you is being generated. This can be done through constraints or Tags across your model. Tags and constraints can be used in combination with Quality Modeller's coverage algorithm, in order to better define your results or to only generate specific paths that you would like to test, for example positive only paths. These custom coverage profiles can also be saved, so you can switch between them on the fly.

    As a detailed example, you could have a car rental system modelled out, and use custom coverage profiles to generate tests. These custom profiles can determine if you only test paths for invalid car licences, paths for a specific car make, paths for electric only vehicles and anything else you could think of.