概要
using UnityEditor;
using UnityEditor.TestTools.TestRunner.Api;
using UnityEngine;
[InitializeOnLoad]
internal sealed class Example : ICallbacks
{
static Example()
{
var api = ScriptableObject.CreateInstance<TestRunnerApi>();
api.RegisterCallbacks( new Example() );
}
public void TestStarted( ITestAdaptor test )
{
Debug.Log( "テスト開始:" + test.Name );
}
public void RunStarted( ITestAdaptor testsToRun )
{
Debug.Log( "実行開始:" + testsToRun.Name );
}
public void RunFinished( ITestResultAdaptor result )
{
Debug.Log( "実行終了:" + result.Name );
}
public void TestFinished( ITestResultAdaptor result )
{
Debug.Log( "テスト終了:" + result.Name );
}
}
参考サイト様