Skip to main content
Version: 14.x (API 14) [Current]

Interface ISelfTestRegistry

Interface for registering and unregistering self-test steps from plugins.

Examples

Registering custom self-test steps for your plugin:

[PluginService]
public ISelfTestRegistry SelfTestRegistry { get; init; }

// In your plugin initialization
this.SelfTestRegistry.RegisterTestSteps([
new MyCustomSelfTestStep(),
new AnotherSelfTestStep()
]);

Creating a custom self-test step:

public class MyCustomSelfTestStep : ISelfTestStep
{
public string Name => "My Custom Test";

public SelfTestStepResult RunStep()
{
// Your test logic here
if (/* test condition passes */)
return SelfTestStepResult.Pass;

if (/* test condition fails */)
return SelfTestStepResult.Fail;

// Still waiting for test to complete
return SelfTestStepResult.Waiting;
}

public void CleanUp()
{
// Clean up any resources used by the test
}
}
Assembly: Dalamud.dll
Declaration
public interface ISelfTestRegistry : IDalamudService

Methods

RegisterTestSteps(IEnumerable<ISelfTestStep>)

Registers the self-test steps for this plugin.

Declaration
void RegisterTestSteps(IEnumerable<ISelfTestStep> steps)
Parameters
TypeNameDescription
System.Collections.Generic.IEnumerable<Dalamud.Plugin.SelfTest.ISelfTestStep>stepsThe test steps to register.