Home Applications IrisOASTestGen

IrisOASTestGen

InterSystems does not provide technical support for this project. Please contact its developer for the technical assistance.
0
0 reviews
0
Awards
12
Views
0
IPM installs
0
0
Details
Releases (1)
Reviews
Issues
Contest
OpenAPI Specification (OAS) generator for Intersystems IRIS REST API client tests written in ObjectScript.

What's new in this version

Initial Release

Gitter
Quality Gate Status
Reliability Rating

License: MIT

🚀 IrisOASTestGen: Automated ObjectScript REST Test Generation

This tool is an OpenAPI Generator designed specifically for Intersystems IRIS. It ingests an OpenAPI Specification (Swagger) document and automatically produces robust, maintainable, and executable ObjectScript code to validate your IRIS REST APIs.

🚧 Note: Some data types aren’t still covered, like List and File. Those will be added in the next releases.

Key Features:

  • Specification-Driven Testing: Ensure your API implementation strictly adheres to the defined OAS contract.
  • ObjectScript Native: Generates client-side testing classes ready to run directly within the IRIS environment.
  • Rapid Development: Dramatically accelerates the creation of integration and regression test suites for IRIS REST services.
  • Comprehensive Coverage: Supports validation of endpoints, parameters, request bodies, and expected response schemas.

Target Audience: IRIS developers, QA engineers, and DevOps teams looking to integrate automated testing into their Intersystems IRIS ObjectScript projects.

Prerequisites

Make sure you have git and Docker desktop installed.

Usage

Clone/git pull the repo into any local directory

git clone https://github.com/musketeers-br/iris-oas-test-gen.git
cd iris-oas-test-gen
chmod -R o+w tests # allow container processes to write in the tests directory

Build and run InterSystems IRIS in container:
Note: Users running containers on a Linux CLI, should use “docker compose” instead of “docker-compose”
See Install the Compose plugin

docker-compose up -d

With the container built and running, let’s access the IRIS terminal

docker exec -it iris-oas-test-gen-iris-1 /bin/bash
iris session iris -U IRISAPP

Now, we can generate the tests classes. For this example, this toy REST API specification will be used.

Set openapiFile = "/home/irisowner/dev/assets/person-api.json"
Set outputDir = "/tmp/output"
Write ##class(dc.musketeers.irisOasTestGen.Main).Run(openapiFile, outputDir)
Halt

By default the output files are stored in /tmp/output/src. Let’s copy them to the mounted volume and allow edition.

cp -r /tmp/output/src /home/irisowner/dev/tests
chmod -R o+w /home/irisowner/dev/tests/src # allow edition in the host machine
exit

Now open VSCode on the project dir.

code .

You can check the generated files inside dir tests.

Model for tests created form the OpenAPI Specification

API test created form the OpenAPI Specification

Made with
Install
zpm install iris-oas-test-gen download archive
Version
0.0.529 Nov, 2025
Ideas portal
https://ideas.intersystems.com/ideas/DPI-I-816
Category
Solutions
Works with
InterSystems IRISInterSystems IRIS for Health
First published
29 Nov, 2025
Last edited
29 Nov, 2025