skipcheck

TM1 Testcontainers · Docs · Writing tests

RequiresTm1WebFactAttribute

using Skipcheck.Tm1.Testcontainers.Xunit;

Runs a test class or method against real TM1 Web and TM1 servers, 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. Declare a Tm1WebContainer parameter to get the shared TM1 Web, which lists and logs on to the shared TM1 server:

public sealed class WebsheetTests(Tm1WebFixture web) : IClassFixture<Tm1WebFixture>
{
    [RequiresTm1WebFact]
    public void OpensAWebsheet()
    {
        // http://localhost:54321/tm1web/, which lists the shared TM1 server
        Assert.EndsWith("/tm1web/", web.Tm1Web.Url);
        // ...
    }
}

Members

NoSourceMessage staticWhy a test is skipped without a source.
RequiresTm1WebFactAttribute constructorSkips unless there's TM1 and TM1 Web 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.

RequiresTm1WebFactAttribute

constructor
RequiresTm1WebFactAttribute()

Skips unless there's TM1 and TM1 Web 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).