Galasa: integration testing that reaches all the way to the mainframe
Written by Rajeev Puri
Most testing tools are great until your application stops being one thing. A modern banking app might have a React front end, a few services on Kubernetes, a message queue, and a CICS transaction on z/OS doing the real work at the bottom. Unit tests cover each piece. Cypress or Selenium cover the browser. But who tests the whole path, all the way down to the mainframe, every time someone pushes a change? That's the gap Galasa was built for.
The short version
Galasa is an open source deep integration test framework. "Deep" means a single test can cross system boundaries: open a 3270 terminal session, call an HTTP API, check a Docker container and read a z/OS dataset, all in one Java test class. The same test can run on your laptop while you write it, then run at scale in a CI/CD pipeline without code changes.
It's licensed under the Eclipse Public License 2.0 and lives on GitHub under galasa-dev.
Where it came from
Galasa started life as an internal IBM tool, built from the ideas of IBM's own users and customers. IBM eventually decided it would be useful outside the company and open sourced it. In September 2023 it was welcomed into the Open Mainframe Project, the Linux Foundation initiative that also hosts Zowe. That move gave it neutral governance through a Technical Steering Committee, and later that year it was recognised as "Most Innovative Open Source Project" in DevOps.com's DevOps Dozen awards.
The pitch from the start was simple: agile, automated testing has always been easier in greenfield cloud projects. Galasa tries to bring the same habits to mainframe teams.
The problem it solves
Hybrid applications are hard to test for a few boring but painful reasons:
Every layer has its own tool. Terminal scripts for 3270 screens, JCL for batch, Postman for APIs, Selenium for the browser. Stitching them together usually means fragile glue scripts.
Test environments are shared and fussy. Two tests grabbing the same CICS region or test account at the same time will break each other.
Results end up everywhere. Logs on one box, screenshots on another, terminal output nowhere at all.
Lots of it is manual. Which doesn't work when you want tests to run on every merge.
Galasa's answer is one framework, one API and one place for results.
How it works
There are a few core ideas worth knowing.
Managers
Managers are Galasa's plugins. Each one knows how to talk to a specific technology: z/OS, CICS TS, 3270 terminals, MQ, Db2, HTTP, Docker, Kubernetes, Selenium, JMeter and more. In your test you declare what you need with an annotation, and the manager provisions it before the test starts and cleans it up afterwards. Your test code never has to know hostnames, credentials or which test region it got.
Here's what actually happens when a single test runs, from managers waking up to locks being released:
Late binding
Because managers resolve resources at run time from configuration, the same test can point at a dev system today and a staging system next week without being edited. You change configuration, not code.
Test isolation
The framework hands out resources so parallel tests don't trample each other. That's what lets tests scale horizontally.
Local runs vs the ecosystem
You can run a test locally, which is how you write and debug it. When it's ready, you submit it to a Galasa ecosystem, a server deployment that runs on Kubernetes. The ecosystem schedules runs, runs them in parallel, and stores every result and artifact centrally, including logs and captured terminal screens. Under the hood it uses etcd for configuration and CouchDB for results.
Locally, everything runs on your own machine: galasactl scaffolds the project, tests run in a local JVM, and config, credentials and results are plain files in ~/.galasa. SimBank gives you something safe to practise against.
What's inside an ecosystem
The IBM Redpaper on Galasa breaks the architecture into a few layers, and it helps to know the names because they show up everywhere in the docs:
Test runner: starts a test, works out which managers it needs, and drives the lifecycle from provisioning through to cleanup.
Framework: the core that coordinates the runner and managers and gives them shared services.
Configuration Property Store (CPS): where environment details live, like which z/OS image, which CICS region, which hostnames and ports. This is what makes late binding work: tests ask the CPS, they never hard-code.
Dynamic Status Store (DSS): tracks what's happening right now, such as which runs are active and which resources are locked by whom. It's how two parallel tests avoid grabbing the same test account.
Credentials store: keeps passwords and tokens out of test code.
Result Archive Store (RAS): the single home for results and artifacts. One run might produce 3270 screen captures, JCL spool output, HTTP logs and Selenium screenshots, and they all land here together.
Resource management: background clean-up that reclaims resources if a test crashes halfway, so a dead run doesn't leave a CICS region locked forever.
Locally these are plain files under ~/.galasa. In an ecosystem they're backed by proper services (etcd and CouchDB) running on Kubernetes, which is why the same test behaves the same in both places.
Test streams and portfolios
As the test suite grows, you stop running tests by class name. Galasa groups published tests into test streams, essentially a catalogue pointing at a Maven repository of test bundles. From a stream you build a portfolio: a YAML file listing exactly which tests to run and with which overrides. That's the unit a pipeline hands to the ecosystem.
What a test looks like
Tests are plain Java classes, packaged as OSGi bundles. A tiny HTTP test looks roughly like this:
Swap @HttpClient for @ZosImage, @Zos3270Terminal or a CICS annotation and you're driving the mainframe in the same style. Galasa also supports Gherkin feature files if your team prefers writing tests that way.
Getting started
The quickest route is the galasactl CLI:
12345678910# set up a local Galasa home
galasactl local init
# scaffold a test project
galasactl project create --package dev.galasa.example.banking --obr
# build it, then run a test locally
galasactl runs submit local --log - \
--obr mvn:dev.galasa.example.banking/dev.galasa.example.banking.obr/0.0.1-SNAPSHOT/obr \
--class dev.galasa.example.banking.account/dev.galasa.example.banking.account.TestAccount
If you don't have a mainframe lying around (most of us don't), there's SimBank, a simulated banking application with a 3270 interface. It comes with the Galasa VS Code extension, which also lets you run and debug tests and browse captured artifacts like terminal screens from inside the editor. It's the easiest way to see what Galasa actually does before touching real systems.
How it works in a hybrid cloud
Here's the reality of a lot of enterprise apps. A customer taps "transfer" in a mobile app. That hits an API gateway in the cloud, which calls a microservice on Kubernetes, which puts a message on MQ, which triggers a CICS transaction on z/OS, which updates Db2. Five platforms, one button.
Cloud-native teams test their part well: containers spin up, dependencies get mocked, tests run in seconds. The mainframe side usually can't work like that. You can't spin up a disposable CICS region per pull request, and mocking the system of record misses exactly the bugs you care about. IBM's own research in the Redpaper found that 92 to 95% of testing on z/OS in the CICS user base was entirely or mostly manual. So hybrid apps end up tested in two halves, and the end-to-end path gets checked late, by hand, if at all.
Galasa's approach is to put every layer into the same test context. As Will Yates, the Galasa lead at IBM, puts it, a real integration test has to drive the system of engagement and then check the change actually landed in the system of record. In one Galasa test you can:
Drive the front end with the Selenium manager, or call the API with the HTTP manager.
Check the message went through with the MQ manager.
Log in to the 3270 screen or query Db2 to confirm the account balance really changed.
Pull back the CICS logs and JCL output if anything fails.
Each manager handles its own platform's quirks, so the test reads like the business scenario instead of a pile of connection code. And because environments come from the CPS, the same test runs against a dev LPAR, a test cluster or a pre-prod system just by changing configuration.
The ecosystem itself also fits the hybrid picture: it runs on Kubernetes and only needs network access to the systems under test, mainframe included, and results for every platform end up in one RAS instead of five different tools.
Using Galasa in a CI/CD pipeline
This is where Galasa earns its keep. The Redpaper makes a point I like: the CI pipeline shouldn't run tests itself. It should ask a test service to run them and then read back the results. Galasa is that service, and galasactl is how your pipeline talks to it.
The flow
Build and publish the tests. Test code lives in Git like anything else. The pipeline builds the bundles with Maven or Gradle and publishes them (plus an OBR) to a Maven repository that a test stream points at.
Deploy the change. Your normal CD step pushes the new build of the application to a test environment, whether that's a container image or new COBOL load modules in a CICS region.
Prepare a portfolio.galasactl runs prepare picks tests from the stream and writes a portfolio, with overrides for this specific environment.
Submit and wait.galasactl runs submit sends the portfolio to the ecosystem, which runs the tests in parallel, and the CLI polls until they finish.
Gate on the result.galasactl exits with a non-zero code when tests fail (unless you pass --noexitcodeontestfailures), so the pipeline stage fails and the change doesn't get promoted.
Debug from one place. When something breaks, every artifact for that run is in the RAS, viewable in the Galasa web UI or pulled down with the CLI.
What the commands look like
1234567891011121314# Pick tests from a stream and pin them to this environment
galasactl runs prepare \
--portfolio portfolio.yaml \
--stream banking-tests \
--package dev.galasa.example.banking \
--override zos.default.lpar=TESTLPAR \
--override zos.default.cluster=TESTPLEX
# Run them in the ecosystem and wait for the result
galasactl runs submit \
--portfolio portfolio.yaml \
--poll 10 \
--throttle 5 \
--log -
--throttle caps how many tests run at once, which matters when the systems under test are shared.
Jenkins example
Galasa doesn't care which CI tool you use. Here's roughly what a Jenkins stage looks like:
The same pattern works in GitHub Actions, GitLab CI or Tekton: install galasactl, store the personal access token (created in the Galasa web UI) as a secret, log in, prepare, submit.
You don't need a full ecosystem on day one
A team at the Open Mainframe Project wrote up how they did this. Their tests didn't share resources, so they skipped the ecosystem entirely: they put Galasa on a Linux server, made that server a Jenkins node, and ran galasactl runs submit local from a Jenkinsfile kept in the same repo as the tests. They went from people running tests by hand on their own workstations to anyone with access being able to trigger the whole suite from Jenkins. That's a sensible first step. Move to an ecosystem once you need parallel runs, resource locking and central results.
Running the right tests at the right stage
Not every pipeline stage should run everything. The Redpaper recommends tagging tests with metadata (the area they cover, which release they support, whether they're core regression) and letting the pipeline select by tag. A typical setup looks like:
On pull request: a small set of fast tests for the area that changed.
On merge to main: the core regression suite against an integration environment.
Nightly: the full suite, in parallel, across every supported environment.
Before release: performance and load tests with the JMeter manager.
New tests get picked up automatically as they're added to the stream, so nobody has to maintain a hard-coded list in the pipeline.
Who it's for
Galasa makes the most sense if:
your application spans mainframe and distributed or cloud components,
you want those end-to-end tests inside a CI/CD pipeline rather than run by hand,
and you need tests to run against several environments as code moves through release stages.
If your whole stack is a Next.js app and a Postgres database, it's overkill. Playwright and a decent API test suite will do. Galasa earns its keep when there's a z/OS system somewhere in the path and the team is tired of testing it manually.
My take
What I like is that Galasa doesn't try to replace the tools you already use. It wraps them in one model: declare what you need, let the framework provision it, and get every result in one place. The trade-off is setup. Running a full ecosystem means Kubernetes, configuration and a Java and OSGi toolchain, which is a real cost for a small team. But for organisations that run critical workloads on the mainframe and want the same automated testing habits as their cloud teams, it fills a gap almost nothing else does, and being open source under the Open Mainframe Project means you aren't locked into a vendor to get it.