With the imminent arrival of useMango version 5.1 I'm like a child on Christmas Eve because we've got a fantastic upgrade to core useMango test capability that's sure to transform all of our tests. Alongside Standard, Scanned and Scripted components we’ve added Composite components to the toolset (and retiring the former Grouped components).
Since you’re able to use these new components in your tests I want to give you a bit of background and explanation of what Composite components are and how they're a significant upgrade to the useMango test architecture. Then in future posts I'll explain more about how and when to use them and what benefits you should expect when you do.
What are Composite Components?
The essence of a composite component is very easy to explain: -
a composite component is a component made from multiple other components.
You create a composite component by putting together a load of other components so that the composite carries out in one go all the actions that the included components would do one by one.
That is a nice and simple idea. And the reason why it's so powerful is that the simple idea is exactly what we give you, without complicating it with rules or special cases or caveats. You just take some steps from a test, give them a name and click the compose button and you get a composite component that does exactly what the original steps did.
(The main reason that we've gone and replaced Grouped components with Composite components is that grouped components did have lots of caveats and restrictions.)
If composites were only the exact reproduction of a set of steps built in a test, then they'd have limited utility because you would only be able to use them in tests where those exact same steps need to be carried out. But we wanted composite components to be reusable in as many tests as possible because reusability is one of the foundations of useMango.
So we've included parameters in composite components, enabling data to be fed into a composite and result data to be extracted from it. By making use of test-specific data you can then reuse a composite component in a wider range of tests.
Parallels with Tests
In useMango, a test carries out a sequence of steps using components and data. And as you will have understood, a composite component also carries out a sequence of steps using components and data.
So, in many ways a composite component is a test.
|Contains a sequence of steps||Y||Y|
|Supports internal data variables||Y||Y|
|Has parameters to feed in data||Y||Y|
|Has parameters to return data||Y||N|
|Can be run as a test||N||Y|
Since composite components are mini tests, the same tools used to work with tests in useMango 5 is also used to work with composite components. This means you don't have anything new to learn when you come to use composites. You already know all there is to know because it is just like building a test!
Now available in useMango 5.1!
Now that I've introduced the concept of composites, you might still be wondering why they're so important and why I'm so excited on their availability in version 5.1 so much. Well, composites really help deliver on the core purposes of useMango: creating automated tests that are