skipcheck

TM1 Testcontainers · Docs · Writing tests

RequiresPawFactAttribute

using Skipcheck.Tm1.Testcontainers.Xunit;

Runs a test class or method against a real Planning Analytics Workspace and TM1 server, and skips it when either isn't available.

It includes RequiresTm1FactAttribute, so tests also skip without Docker or a Tm1Source, and can still take a Tm1ServerContainer parameter. They also skip without a PawSource, or when IBM's PAW license hasn't been accepted with PAW_ACCEPT_LICENSE=true. Declare a PawContainer parameter to get the shared PAW, which logs users on to the shared TM1 server:

public sealed class WorkspaceTests(PawFixture paw) : IClassFixture<PawFixture>
{
    [RequiresPawFact]
    public void OpensPaw()
    {
        // http://localhost:54321/, which logs on to the shared TM1 server
        Assert.StartsWith("http://", paw.Paw.Url);
        // ...
    }
}

Members

NoSourceMessage staticWhy a test is skipped without a source.
NoLicenseMessage staticWhy a test is skipped until the license is accepted.
RequiresPawFactAttribute constructorSkips unless there's TM1 and PAW to test against.
NoDockerMessage staticWhy a test is skipped without Docker.
Tm1SkipReason staticWhy a TM1 test is skipped, or null to run it (a wrong source runs it, to fail).

NoSourceMessage

static
const string NoSourceMessage

Why a test is skipped without a source.

NoLicenseMessage

static
const string NoLicenseMessage

Why a test is skipped until the license is accepted.

RequiresPawFactAttribute

constructor
RequiresPawFactAttribute()

Skips unless there's TM1 and PAW to test against.

NoDockerMessage

static
const string NoDockerMessage

Why a test is skipped without Docker.

Tm1SkipReason

static
string? Tm1SkipReason()

Why a TM1 test is skipped, or null to run it (a wrong source runs it, to fail).