以下の内容はhttps://baba-s.hatenablog.com/entry/2020/06/10/090000より取得しました。


【Unity】Unity Test Runner の開始終了を検知する方法

概要

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 );
    }
}

参考サイト様




以上の内容はhttps://baba-s.hatenablog.com/entry/2020/06/10/090000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14