Java · Python · .NET · TypeScript · Testing
TM1 Testcontainers
Test against real Planning Analytics, in Docker
Start a real TM1 server for your tests, shared across the test run, and skipped cleanly where Docker or TM1 isn't available. Add TM1 Web, Planning Analytics Workspace and Cognos security with test users when you need them. No IBM software is included: you supply your own licensed TM1.
Docs, in every languageSource on GitHub
v0.1.1The latest release. The install steps below use it, in every language.
Quick start
Add it to your tests.
Needs Java 17 or later.
Gradle (Kotlin)
testImplementation("io.skipcheck:tm1-testcontainers:0.1.1")Maven
<dependency> <groupId>io.skipcheck</groupId> <artifactId>tm1-testcontainers</artifactId> <version>0.1.1</version> <scope>test</scope> </dependency>Needs Python 3.11 or later.
Terminal
pip install skipcheck-tm1-testcontainers==0.1.1Needs .NET 10.
Terminal
dotnet add package Skipcheck.Tm1.Testcontainers --version 0.1.1Needs Node 22.22 or later.
Terminal
npm install --save-dev @skipcheck/tm1-testcontainers@0.1.1- Tell it where your TM1 is. The quickest way is to set
TM1_BUNDLE_DIRto the folder holding IBM'stm1server-*-linuxi38664h_bundle.tar.gzdownload when you run your tests, with Docker running. Tm1Source lists the other ways, such as an installed TM1 or a private image, which start in seconds. Write a test. It gets a TM1 server that is started once for the test run and shared, and is skipped when Docker or TM1 isn't available:
@RequiresTm1 static class HelloTm1Test { @Test void connects(Tm1ServerContainer server) { Tm1Client tm1 = Tm1Client.builder() .baseUrl(server.getRestUrl()) .basicAuth(server.getUsername(), server.getPassword()) .build(); try { assertNotNull(tm1.session().version().block(Duration.ofSeconds(30))); } finally { tm1.close().block(Duration.ofSeconds(30)); } } }# The tm1_server fixture is the shared TM1 server; without one configured, the test is skipped @pytest.mark.requires_tm1 def test_connects(tm1_server: Tm1ServerContainer) -> None: builder = Tm1Client.builder().base_url(tm1_server.rest_url).basic_auth(tm1_server.username, tm1_server.password) with builder.build() as tm1: assert tm1.session.version() is not Nonepublic sealed class HelloTm1Tests(Tm1ServerFixture server) : IClassFixture<Tm1ServerFixture> { [RequiresTm1Fact] public async Task Connects() { await using var tm1 = server.Client(); Assert.NotNull(await tm1.Session.VersionAsync()); } }import { Tm1Client } from "@skipcheck/tm1-client"; import { requiresTm1 } from "@skipcheck/tm1-testcontainers/vitest"; import { expect } from "vitest"; // Skipped when there's no Docker or no TM1 source; "tm1" is the shared server requiresTm1("connects", async ({ tm1 }) => { await using client = Tm1Client.builder().baseUrl(tm1.getRestUrl()).basicAuth(tm1.getUsername(), tm1.getPassword()).build(); expect(await client.session.version()).toBeDefined(); });
Next: test classes in full, and skipping by TM1 version; a server of your own, with the sample data or your own database; and whole environments, with several servers, TM1 Web, Workspace and Cognos security together.
New to it? Take it step by step: Test your code against a real TM1.
Walkthroughs
Step by step, with the code in your language:
- Test your code against a real TM1: Add tm1-testcontainers, point it at your TM1, and write tests that get a real server, with their own objects or IBM's sample data.
Build it with an agent
Hand this prompt to a coding agent to build a first prototype. It names the package, how to install it, the docs and the walkthroughs, and asks you for anything it can't work out.
Prompt Show the full promptHide the prompt
Build me a first prototype in Java: a test that runs against a real IBM Planning Analytics (TM1) server in Docker, using Skipcheck TM1 Testcontainers: the package io.skipcheck:tm1-testcontainers, version 0.1.1. It talks to the server with the Skipcheck TM1 client, which it depends on.
Before you write code, ask me what the test should check, unless I've said already. Suggest a small start, such as making a dimension, checking it's there and deleting it again. Then ask me where my TM1 comes from: the folder that holds IBM's tm1server-*-linuxi38664h_bundle.tar.gz download is the quickest. Never copy, upload or share IBM's software: point the tests at where it already is.
1. Check that Docker is installed and running. The tests need it.
2. Set up a Java project with tests, if there isn't one. Testcontainers for TM1 needs Java 17 or later.
3. Add it to the tests:
Gradle (Kotlin):
```kotlin
testImplementation("io.skipcheck:tm1-testcontainers:0.1.1")
```
Maven:
```xml
<dependency>
<groupId>io.skipcheck</groupId>
<artifactId>tm1-testcontainers</artifactId>
<version>0.1.1</version>
<scope>test</scope>
</dependency>
```
4. Write the test. These walkthroughs do it step by step, with the code in every language:
- Test your code against a real TM1: https://skipcheck.io/tm1-testcontainers/walkthroughs/first-test/
5. Look up each type and method you use in the Java docs: https://skipcheck.io/tm1-testcontainers/docs/java/. Its Tm1Source page lists every way to say where TM1 comes from. The landing page, the walkthroughs and every type's overview are also in one file for agents: https://skipcheck.io/llms-full.txt
6. Run the tests with TM1_BUNDLE_DIR set to the folder with the download, and show me the result. The first run installs TM1 into a Docker volume, which takes a few minutes; later runs are fast. A test skips, rather than fails, when Docker or TM1 isn't there: if it skipped, find out why.
To run TM1 on this computer outside the tests, these instructions set it up:
- pa-setup: https://raw.githubusercontent.com/ajmyers/skipcheck-tm1/v0.1.1/agent-plugin/skills/pa-setup/SKILL.md
Set up a local IBM Planning Analytics environment in Docker with pa-setup and pa-environment.yaml, in any combination of TM1 servers (with a shared Admin Server), TM1 Web, Planning Analytics Workspace (PAW), and Cognos Analytics security (CAM) with test users through LDAP and OpenID Connect (Keycloak).
- tm1-setup: https://raw.githubusercontent.com/ajmyers/skipcheck-tm1/v0.1.1/agent-plugin/skills/tm1-setup/SKILL.md
Set up and start one local IBM Planning Analytics (TM1) server in Docker with tm1-server's setup script, check that it's healthy, and troubleshoot it.
Open in Claude DesktopOpen in Claude Code
Either link fills in the prompt, and you press Enter to send it. "Open in Claude Code" is for the terminal app, and works once you've run claude on this computer. Another agent, such as Codex, Cursor or Gemini CLI? Copy the prompt.
Prompt Show the full promptHide the prompt
Build me a first prototype in Python: a test that runs against a real IBM Planning Analytics (TM1) server in Docker, using Skipcheck TM1 Testcontainers: the package skipcheck-tm1-testcontainers, version 0.1.1. It talks to the server with the Skipcheck TM1 client, which it depends on.
Before you write code, ask me what the test should check, unless I've said already. Suggest a small start, such as making a dimension, checking it's there and deleting it again. Then ask me where my TM1 comes from: the folder that holds IBM's tm1server-*-linuxi38664h_bundle.tar.gz download is the quickest. Never copy, upload or share IBM's software: point the tests at where it already is.
1. Check that Docker is installed and running. The tests need it.
2. Set up a Python project with tests, if there isn't one. Testcontainers for TM1 needs Python 3.11 or later.
3. Add it to the tests:
Terminal:
```sh
pip install skipcheck-tm1-testcontainers==0.1.1
```
4. Write the test. These walkthroughs do it step by step, with the code in every language:
- Test your code against a real TM1: https://skipcheck.io/tm1-testcontainers/walkthroughs/first-test/
5. Look up each type and method you use in the Python docs: https://skipcheck.io/tm1-testcontainers/docs/python/. Its Tm1Source page lists every way to say where TM1 comes from. The landing page, the walkthroughs and every type's overview are also in one file for agents: https://skipcheck.io/llms-full.txt
6. Run the tests with TM1_BUNDLE_DIR set to the folder with the download, and show me the result. The first run installs TM1 into a Docker volume, which takes a few minutes; later runs are fast. A test skips, rather than fails, when Docker or TM1 isn't there: if it skipped, find out why.
To run TM1 on this computer outside the tests, these instructions set it up:
- pa-setup: https://raw.githubusercontent.com/ajmyers/skipcheck-tm1/v0.1.1/agent-plugin/skills/pa-setup/SKILL.md
Set up a local IBM Planning Analytics environment in Docker with pa-setup and pa-environment.yaml, in any combination of TM1 servers (with a shared Admin Server), TM1 Web, Planning Analytics Workspace (PAW), and Cognos Analytics security (CAM) with test users through LDAP and OpenID Connect (Keycloak).
- tm1-setup: https://raw.githubusercontent.com/ajmyers/skipcheck-tm1/v0.1.1/agent-plugin/skills/tm1-setup/SKILL.md
Set up and start one local IBM Planning Analytics (TM1) server in Docker with tm1-server's setup script, check that it's healthy, and troubleshoot it.
Open in Claude DesktopOpen in Claude Code
Either link fills in the prompt, and you press Enter to send it. "Open in Claude Code" is for the terminal app, and works once you've run claude on this computer. Another agent, such as Codex, Cursor or Gemini CLI? Copy the prompt.
Prompt Show the full promptHide the prompt
Build me a first prototype in .NET: a test that runs against a real IBM Planning Analytics (TM1) server in Docker, using Skipcheck TM1 Testcontainers: the package Skipcheck.Tm1.Testcontainers, version 0.1.1. It talks to the server with the Skipcheck TM1 client, which it depends on.
Before you write code, ask me what the test should check, unless I've said already. Suggest a small start, such as making a dimension, checking it's there and deleting it again. Then ask me where my TM1 comes from: the folder that holds IBM's tm1server-*-linuxi38664h_bundle.tar.gz download is the quickest. Never copy, upload or share IBM's software: point the tests at where it already is.
1. Check that Docker is installed and running. The tests need it.
2. Set up a .NET project with tests, if there isn't one. Testcontainers for TM1 needs .NET 10.
3. Add it to the tests:
Terminal:
```sh
dotnet add package Skipcheck.Tm1.Testcontainers --version 0.1.1
```
4. Write the test. These walkthroughs do it step by step, with the code in every language:
- Test your code against a real TM1: https://skipcheck.io/tm1-testcontainers/walkthroughs/first-test/
5. Look up each type and method you use in the .NET docs: https://skipcheck.io/tm1-testcontainers/docs/dotnet/. Its Tm1Source page lists every way to say where TM1 comes from. The landing page, the walkthroughs and every type's overview are also in one file for agents: https://skipcheck.io/llms-full.txt
6. Run the tests with TM1_BUNDLE_DIR set to the folder with the download, and show me the result. The first run installs TM1 into a Docker volume, which takes a few minutes; later runs are fast. A test skips, rather than fails, when Docker or TM1 isn't there: if it skipped, find out why.
To run TM1 on this computer outside the tests, these instructions set it up:
- pa-setup: https://raw.githubusercontent.com/ajmyers/skipcheck-tm1/v0.1.1/agent-plugin/skills/pa-setup/SKILL.md
Set up a local IBM Planning Analytics environment in Docker with pa-setup and pa-environment.yaml, in any combination of TM1 servers (with a shared Admin Server), TM1 Web, Planning Analytics Workspace (PAW), and Cognos Analytics security (CAM) with test users through LDAP and OpenID Connect (Keycloak).
- tm1-setup: https://raw.githubusercontent.com/ajmyers/skipcheck-tm1/v0.1.1/agent-plugin/skills/tm1-setup/SKILL.md
Set up and start one local IBM Planning Analytics (TM1) server in Docker with tm1-server's setup script, check that it's healthy, and troubleshoot it.
Open in Claude DesktopOpen in Claude Code
Either link fills in the prompt, and you press Enter to send it. "Open in Claude Code" is for the terminal app, and works once you've run claude on this computer. Another agent, such as Codex, Cursor or Gemini CLI? Copy the prompt.
Prompt Show the full promptHide the prompt
Build me a first prototype in TypeScript: a test that runs against a real IBM Planning Analytics (TM1) server in Docker, using Skipcheck TM1 Testcontainers: the package @skipcheck/tm1-testcontainers, version 0.1.1. It talks to the server with the Skipcheck TM1 client, which it depends on.
Before you write code, ask me what the test should check, unless I've said already. Suggest a small start, such as making a dimension, checking it's there and deleting it again. Then ask me where my TM1 comes from: the folder that holds IBM's tm1server-*-linuxi38664h_bundle.tar.gz download is the quickest. Never copy, upload or share IBM's software: point the tests at where it already is.
1. Check that Docker is installed and running. The tests need it.
2. Set up a TypeScript project with tests, if there isn't one. Testcontainers for TM1 needs Node 22.22 or later.
3. Add it to the tests:
Terminal:
```sh
npm install --save-dev @skipcheck/tm1-testcontainers@0.1.1
```
4. Write the test. These walkthroughs do it step by step, with the code in every language:
- Test your code against a real TM1: https://skipcheck.io/tm1-testcontainers/walkthroughs/first-test/
5. Look up each type and method you use in the TypeScript docs: https://skipcheck.io/tm1-testcontainers/docs/typescript/. Its Tm1Source page lists every way to say where TM1 comes from. The landing page, the walkthroughs and every type's overview are also in one file for agents: https://skipcheck.io/llms-full.txt
6. Run the tests with TM1_BUNDLE_DIR set to the folder with the download, and show me the result. The first run installs TM1 into a Docker volume, which takes a few minutes; later runs are fast. A test skips, rather than fails, when Docker or TM1 isn't there: if it skipped, find out why.
To run TM1 on this computer outside the tests, these instructions set it up:
- pa-setup: https://raw.githubusercontent.com/ajmyers/skipcheck-tm1/v0.1.1/agent-plugin/skills/pa-setup/SKILL.md
Set up a local IBM Planning Analytics environment in Docker with pa-setup and pa-environment.yaml, in any combination of TM1 servers (with a shared Admin Server), TM1 Web, Planning Analytics Workspace (PAW), and Cognos Analytics security (CAM) with test users through LDAP and OpenID Connect (Keycloak).
- tm1-setup: https://raw.githubusercontent.com/ajmyers/skipcheck-tm1/v0.1.1/agent-plugin/skills/tm1-setup/SKILL.md
Set up and start one local IBM Planning Analytics (TM1) server in Docker with tm1-server's setup script, check that it's healthy, and troubleshoot it.
Open in Claude DesktopOpen in Claude Code
Either link fills in the prompt, and you press Enter to send it. "Open in Claude Code" is for the terminal app, and works once you've run claude on this computer. Another agent, such as Codex, Cursor or Gemini CLI? Copy the prompt.
What's in it
- One server per test run: started on first use, handed to each test that asks for it, and skipped, not failed, when it can't start. In Java that is the
@RequiresTm1annotation; the other languages have the same as a fixture. - Your TM1, your way: from IBM's download file, a download link, an installed folder or a private image.
- The whole suite: TM1 Web, Planning Analytics Workspace, an Admin Server with several servers, and Cognos (CAM) or OIDC security with test users.
- Sample data: start from IBM's SData sample, or your own database.