kyubuns / AutomaticOperationTest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AutomaticOperationTest

Automatic Operation Test

Under development

Buy Me A Coffee

How to use

[MenuItem("Test/AutomaticOperationTest/Run1")]
public static void Run1()
{
    Core.TimeScale = 10.0f;
    var runner = Runner.Run(new IAction[]
    {
        new RandomButtonClickAction(new RandomButtonClickActionOptions
        {
            Condition = Condition.Is<Button>(x =>
                !x.gameObject.GetFullName().StartsWith("AbcConsole(Clone)/") // AbcConsoleのボタンは除外
            )
        })
    }, new RunnerOptions
    {
        LogToConsole = false,
    });

    runner.ErrorDetected += x =>
    {
        var (logger, error) = x;
        Debug.Log($"Error Detected", ("Action", logger.CurrentAction));
        Debug.Log($"{error.Condition}");
        Debug.Log($"{error.StackTrace}");
        foreach (var log in logger.CurrentActionLogs)
        {
            Core.Log($"{log}");
        }
        // スクリーンショットを撮ってSlackに送るとか
    };
}

Installation

UnityPackageManager

  • https://github.com/kyubuns/AutomaticOperationTest.git?path=Assets/AutomaticOperationTest

Target Environment

  • Unity2020.3 or later

License

MIT License (see LICENSE)

Buy me a coffee

Are you enjoying save time?
Buy me a coffee if you love my code!
https://www.buymeacoffee.com/kyubuns

"I used it for this game!"

I'd be happy to receive reports like "I used it for this game!"
Please contact me by email, twitter or any other means.
(This library is MIT licensed, so reporting is NOT mandatory.)
Message Form

https://kyubuns.dev/

About

License:MIT License


Languages

Language:C# 100.0%