Unit testing with AMB
I am currently coaching mainframe teams in adopting practices that make up Continuous Delivery. This is part of a bigger agile transformation the organisation is going through.
The teams develop in AMB (AppMaster Builder) using Micro Focus Mainframe Express (MFE) v3.1 on Windows. I've understood AMB is a language similar to COBOL that generates native Mainframe COBOL. What I don't know yet is: can the AMB code be directly executed inside MFE on Windows without first generating the COBOL ?
I would like to introduce the concept of automated unit testing. Googling around I found COBOLUnit, IBM zUnit and that Micro Focus actually also has a unit testing framework.
First of all, can any COBOL code directly call AMB code. So can any unit testing framework call AMB code and have this executed inside MFE on Windows ?
Second, does Micro Focus have a unit testing framework specifically for AMB ?
Thank you for your time.
I do not agree that it is not possible to do Unit Testing with AMB code once it is generated under MFE EE. As bazc states correctly AMB generates your COBOL source but then MFE has the compiler and run-time environment for the mainframe subsystems such as CICS, IMS, Batch to execute/debug those programs.
So as I understand you are looking to build a Unit Test framework. The Micro Focus Unit Test framework supports native COBOL only but not programs that require the IMS or CICS environment for example. And it is only available in latest product version of Enterprise Developer not with MFE EE.
Saying that you would be able write your own Framework once you understand the interface of the AMB generated COBOL programs to call.
Another discussion which is currently ongoing is what do you define as Unit able to test in a (monolithic) legacy mainframe application. Without re-architecture and applying microservice architecture it might be your IMS or CICS transaction, which in most cases has a BMS/MFS 3270 screen, IMS Connect or CTG interface or triggered by MQ. So your unit test framework might have to stick with those interfaces.
The beauty is that with MFE EE you already have Test Coverage which at the end produces a report to document that you have tested your actual module and also which lines of the generated COBOL code has been tested.
If you need more information please let me know.
I hope that helps,