skipcheck

TM1 Testcontainers · Docs · Writing tests

RequiresCognos

import { RequiresCognos } from "@skipcheck/tm1-testcontainers";

Runs a test class or method that needs IBM Cognos Analytics (CAM security) as well as TM1, and skips it when either isn't available.

It includes RequiresTm1, so tests also skip without Docker or a Tm1Source. Declare a CognosSource parameter to get the source CognosSource.discover found. Cognos takes minutes to start and its test users vary by test, so there's no shared Cognos: build a CognosContainer with the users the test needs.

requiresCognos("readers can only read", async ({ cognosSource }) => {
  // No shared Cognos: each test starts its own, with the users it needs
  await using cognos = new CognosContainer(cognosSource).withUser("viewer", "viewerpw", "Readers");
  await cognos.start();
  // ...
});

Members

NO_SOURCE_MESSAGE staticWhy tests skip when no Cognos source is configured, and what to set.
skipReason static

NO_SOURCE_MESSAGE

static
NO_SOURCE_MESSAGE

Why tests skip when no Cognos source is configured, and what to set.

skipReason

static
static skipReason(): Promise<string | undefined>