Standard executable UML/SysML for model-based testing – is it a dream?

In many industries, like aerospace, defense, telecommunication and others, it’s becoming common to use UML/SysML to describe system architectures. With the introduction of OMG fUML, many companies began refining their models to the level where they became executable. The next big step is to adopt model-based testing in which standard executable models are reused to generate tests.

I think those who know and use UML/SysML and are still dreaming about standardized executable diagrams/models and test generation, should really take a look at Conformiq’s new integration with MagicDraw which fulfills this dream. Now the standardized ALF action language enables users to complete UML diagrams, simulate them, as well as automatically generate test scripts and test documentation from them. This brings a new, long-awaited way of using UML and allows testers to work more closely with system engineers. This solution applies not only to UML but to an even larger extent to SysML (Systems Modeling Language) and it helps to implement MBSE (Model-Based Systems Engineering)!

MagicDrawBlog1
Figure 1. Integrated Solution Architecture and Workflow

Now with this approach it’s possible to generate tests and do model-based testing (MBT). What is model-based testing? Model-based testing generates from a model optimized test suites with test data by using a powerful engine. The engine will optimize the test suite to give you the best tests and also help you to automate test execution. This gives a new dimension to testing. Here you are no longer working on a test, but directly on the model. So how does this actually work?

MagicDrawBlog2
Figure 2 Behavior Model of the System under Test. Model Shall have Just the Details Which Needs to be Tested.

First of all, you will import a diagram (e.g. MBSE models) created by systems engineers in MagicDraw. The systems engineer will have already validated that model to some extent by running simulations in MagicDraw. All you need to do is to enhance this model with test-specific information — mainly using ALF— and pre-check your model quickly.

When your model is done and ready to be used, you select your test target. Do you want to have full data coverage? Requirements coverage? Boundary value analysis? One of those? All of them? It’s just a matter of setting your test targets in your MBT tool. Then you click on “Generate test cases”. The tool will give you the best test suite to cover all your options.

MagicDrawBlog3
Figure 3 : Generation and Test Case Coverage.

Then when it’s done you simply select the language for the automation and click to export the tests to your test automation framework! Are you storing requirements and/or tests in an ALM tool? Automatic test generation can automatically track requirements coverage and upload test documentation to ALM tools! (to know more on “click to generate”, read this blog: www.conformiq.com/2015/11/click-here-to-automate-everything/).

Another benefit of this integrated environment is the learning curve. As I stated previously, UML/SysML is already well known in many industries. Now you need 2 days to learn UML/SysML + ALF and 2 days for how to work with automatic test design, and you can start using this solution.

In conclusion, UML/SysML and ALF bring a new dimension which not only allows you to simulate but also to automatically generate executable test cases from models. And you should definitely take a look and try it out.

Alexis Despeyroux is a Conformiq technical field application engineering specialist.

Continue exploring
Products Case studies Demo