Skip to content

VinTest.Cake.ContextBase

VinTest.Cake

ContextBase Class

FrostingContext substitute that provides common arguments for running VS integration tests. Inherit from this in your mod's BuildContext and supply the remaining project-specific properties.

public abstract class ContextBase : Cake.Frosting.FrostingContext

Inheritance ObjectCake.Core.CakeContextAdapterCake.Frosting.FrostingContext → ContextBase

Constructors

ContextBase(ICakeContext) Constructor

Initializes a new instance of the Cake.Frosting.FrostingContext class.

protected ContextBase(Cake.Core.ICakeContext context);

Parameters

context Cake.Core.ICakeContext

The Cake context.

Fields

ContextBase.TestResultsDirName Field

Directory under the VS data path where VinTest will store its files. Shared with VinTest.Runner.

public const string TestResultsDirName = "TestResults";

Field Value

String

Properties

ContextBase.AutotestsProjectName Property

Name of the test mod project (WITHOUT .csproj extension). You can redefine it in your BuildContext class if you use different naming convention.

public virtual string AutotestsProjectName { get; }

Property Value

String

ContextBase.BuildConfiguration Property

[ARG] Dotnet configuration (Debug/Release) to build the solution in.

public string BuildConfiguration { get; }

Property Value

String

ContextBase.DataPath Property

[ARG] Absolute path to the VS data directory (containing Saves/, Logs/, etc.).

public string DataPath { get; }

Property Value

String

ContextBase.IgnoreLogErrors Property

[ARG] If set, log lines matching error patterns are captured but do not fail the build.

public bool IgnoreLogErrors { get; }

Property Value

Boolean

ContextBase.ManualMode Property

[ARG] When set, launches VS without running tests automatically. Cake will wait for VS to exit without checking for test results.

public bool ManualMode { get; }

Property Value

Boolean

ContextBase.PidFilePath Property

Path to the PID file written by cake task once VintageStory is launched.

public string PidFilePath { get; }

Property Value

String

ContextBase.ProjectName Property

Name of your core mod's project (WITHOUT .csproj extension) You must define it in your BuildContext class.

public abstract string ProjectName { get; }

Property Value

String

ContextBase.TestCaseFilter Property

[ARG] Case-insensitive substring filter applied to SuiteName.CaseName. Leave empty to run all tests. When non-empty, only matching tests are executed.

public string TestCaseFilter { get; }

Property Value

String

ContextBase.TestResultsPath Property

Path to the JSON file where test results are written by the test runner.

public string TestResultsPath { get; }

Property Value

String

ContextBase.TestRunTimeoutSeconds Property

[ARG] Maximum seconds to wait for all tests to finish before timing out.

public int TestRunTimeoutSeconds { get; }

Property Value

Int32

ContextBase.TestWorldName Property

[ARG] Name of the world save to load for tests.

public string TestWorldName { get; }

Property Value

String

ContextBase.VsExePath Property

Absolute path to VS executable (Vintagestory.exe on Windows, Vintagestory on Linux).

public string VsExePath { get; }

Property Value

String

ContextBase.VsPath Property

[ARG] Absolute path to the VintageStory installation directory.

public string VsPath { get; }

Property Value

String