using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEditor.TestTools.TestRunner.Api;
namespace MCPForUnity.Editor.Services
{
///
/// Options for filtering which tests to run.
/// All properties are optional - null or empty arrays are ignored.
///
public class TestFilterOptions
{
///
/// Full names of specific tests to run (e.g., "MyNamespace.MyTests.TestMethod").
///
public string[] TestNames { get; set; }
///
/// Same as TestNames, except it allows for Regex.
///
public string[] GroupNames { get; set; }
///
/// NUnit category names to filter by (tests marked with [Category] attribute).
///
public string[] CategoryNames { get; set; }
///
/// Assembly names to filter tests by.
///
public string[] AssemblyNames { get; set; }
}
///
/// Provides access to Unity Test Runner data and execution.
///
public interface ITestRunnerService
{
///
/// Retrieve the list of tests for the requested mode(s).
/// When is null, tests for both EditMode and PlayMode are returned.
///
Task>> GetTestsAsync(TestMode? mode);
///
/// Execute tests for the supplied mode with optional filtering.
///
/// The test mode (EditMode or PlayMode).
/// Optional filter options to run specific tests. Pass null to run all tests.
Task RunTestsAsync(TestMode mode, TestFilterOptions filterOptions = null);
}
}