QuickStart Mainframe Automation
Welcome to the Test Modeller QuickStart Mainframe Automation Tutorial series. In this series, we are going to take you through Getting started, Modelling out combinations, Generating & Running test cases and Publishing a test suite all for mainframe testing.
Watch the 4 tutorials to guide you in using QuickStart Mainframe Automation in Test Modeller.
Objectives: By the end of the series, you'll be able to:
- Create and/or edit an Automation Model
- Navigate the Test Modeller UI
- Understand the directory structure in Test Modeller
- Name and Configure a Project
- Identify Components and Actions
- Overlay Logic onto a Model
- Identify Subflows (subprocesses) in a Master Model
- Link nodes on the model canvas
- Generate Test Cases
- Run, Execute and Review Pass and Fail Tests
- Publish a Regression pack
- Understand how this might be used in Git
- Identify the use of Test Modeller's Test Plan feature
- See the use of Framework in the CI/CD Pipeline
3-Minute Mainframe Test Automation Example
Get Started with Mainframe Automation
Setting up for Mainframe Automation incredibly quickly with Test Modeller Accelerators. Initially we need a Project and for simplicity we are going to connect to our mainframe to the Project Configuration which provides us with Assets that we can use later on. For the Connector, it’s simply Add New Connection.
Using the Mainframe Connector type: in the example we’re using Astrom with the specific Port. Once set-up we get a folder of models, Components and Actions to quickly Run Mainframe Automation without delay. The components show Actions and Commands that we can Run against the Mainframe, capturing screenshots, different Assertions for immediate use.
As this is my first Mainframe Automation, it's a fairly linear model, to open up a connection, where those host details set up earlier appear. I've got it automated to capture screenshots, and we are good to go.
To get going, let’s Generate just one Test Case as one path through this straightforward model and Run. Choose Automation Code, and Execute. Essentially is going to pick up some Code Templates that sit in the background of Test Modeller to automatically Generate and Run Tests, and as expected with a straightforward Test it has zero failures.
The results can be downloaded as a zip file if we want or sync that into a Git repository. Back in Test Modeller there’s a Test Summary on which clicking a Run ID reveals the Steps and additional Log information. Next we’ll consider combinations to see how Test Modeller can really accelerate Automated Testing.
Model Out Combinations
From a straightforward linear Model, let’s now use different Components in Test Modeller to vary some details. So on the left-hand side of the model view we've got various Tasks and Conditions, ready for applying different Logic into this particular model. Use a Condition node for adding in a User Login and again capture a screenshot, and also a Password, before updating the Parameters.
Previously we had just one path or one Test Case and now with two we'll Run this Automation Code, again picking up the Code Template in the background which looks at specific Data Variables added to the demo.
Looking at our demo application, we'll see that we've actually logged into it as hoped. I would recommend you go through, make some modifications in terms of some of the Logic you to play with next. In the next video, we’ll test the Login process in more detail to quickly make testing even better. And also further explore the UI.
Generate and Run Tests
Previously we executed some simple Mainframe Automation, navigating through the UI, and now to add further Logic. In review, at the end of our process, we aim to achieve a Successful Login. Between the two states of either pass or fail, we use Conditions in order to test for instance of a Valid User, Valid Password or similar combinations, just as a start.
Getting the same results can always be modelled differently, along with different Scenario or testing combination, for instance Invalid User and Valid Password or Valid User and Invalid Password etc.
In this example, we’ll add in a fake user, but also know that Valid Users potentially may have Invalid Passwords. So let’s put this in as a fake class, knowing that the end point here is not necessarily going to be a failure. To highlight this possibility, I'm just going to leave the default node name of End. Additionally, we can set the Data Type with this as Invalid, and also for the Username to essentially say that this is not correct.
Let’s Re-Generate the Tests, giving us five paths, including three that are negative. Now go and Run this particular Automation Code and preview the Logs as they process. Again, we could commit to a Git repository.
Coming to the Test section it says 1135 tests have just ran, so let's locate one for the fake user, ie a fake user with a Valid Password. So when we get to try to enter in our fake credentials, this is actually as far as the path goes before hitting a fail. So we're happy that that's been inserted, and this test has been passed correctly because we haven't been able to actually log in.
Where in this tutorial we’ve looked at the various Mainframe screen, next we’ll overlay some Logic to one particular process. Also, to highlight different ways we can build out models using different screen clicks, tabs, enters, screenshots, that are slightly more complex.
Publish a Test Suite
The focus here is on Regression packs and changing some of these tests related to a Login process that allows us to test Valid and Invalid combinations. So here we've built out a few simple Models to demo functionality within our Mainframe, including a messaging system that allows the review of internal mails, emails, etc. This requires a profile screen, and in here we’re adding text Assertions to check valid access to the screen and see what results get returned.
We've also got the ability to just test our Mainframe Connection and make sure that that opens every time. So again, we're just checking some text that's present and its intersection. But rather than coming in and running these all individually, we are going to build a model, which I'm going to call My Mainframe end-to-end.
And just go and create that model using Subflows to essentially chain all of our different tests together, in whichever sequence. The MMS is the only Subflow which has further functionality in my Mainframe that I might want to model out, so I can go and view different screenshots. But for the moment we're going to Generate our tests, which in this case should just be three running through separate Scenarios.
But what I actually want to do is when I come in and click run is for my Automation code to Publish a Regression Suite. So, name this Regression, Save and Execute to Run the Automation, for it to test as pass or fail.
We can also store the Regression pack that we can Run any time from within Test Modeller, through the Dashboard itself. So rather than having to come into models and Execute them individually, you can save them as part of a broader Regression strategy, or simply trigger it through individual models that you just want to go and Execute at any time.
Under Test Modeller’s Test section we can see what we are running, for instance our Mainframe end-to-end automation, and we see all tests have passed. Additionally, there’s Test Plans for my Mainframe Regression tests. So if I click on that, the details of the tests that we're running will appear, including the Results from tests we've already Executed. But of course we can just come in and Run these tests again directly.
So I'll kick off a Job and Run those particular tests for you. That's just an API call that can be embedded into a CI/CD Pipeline in whatever Framework you want. In practice, it's really just about simplifying using a Model-based solution that’s able to wrap up lots of tests in Mainframes quickly and efficiently.