box-v7 패턴: alt+tab → click(PowerShell) → ctrl+c ctrl+c 가 재생 시 SUT 외부 창(브라우저 등)에 입력을 보내는 버그. - PlayerEngine.Run: trailing (alt+tab → optional click → ctrl+c+) 감지 시 제거 - leading alt+tab 제거와 대칭적으로 동작 - ctrl+c 단독으로는 제거하지 않음 (SUT 내 복사 액션과 구분) - 테스트 2건 추가 (138 total) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
65 lines
2.7 KiB
C#
65 lines
2.7 KiB
C#
namespace Recordingtest.Runner;
|
|
|
|
public static class Program
|
|
{
|
|
public static int Main(string[] args)
|
|
{
|
|
var options = new RunnerOptions();
|
|
string? sidecarUrl = null;
|
|
bool noSidecar = false;
|
|
for (int i = 0; i < args.Length; i++)
|
|
{
|
|
switch (args[i])
|
|
{
|
|
case "--scenarios": options.ScenariosDir = args[++i]; break;
|
|
case "--baselines": options.BaselinesDir = args[++i]; break;
|
|
case "--out": options.OutDir = args[++i]; break;
|
|
case "--profile": options.Profile = args[++i]; break;
|
|
case "--no-launch": options.NoLaunch = true; break;
|
|
case "--sidecar-url": sidecarUrl = args[++i]; break;
|
|
case "--no-sidecar": noSidecar = true; break;
|
|
case "--sidecar-profile": options.SidecarProfile = args[++i]; break;
|
|
case "--scenario": options.ScenarioFilter = args[++i]; break;
|
|
case "-h":
|
|
case "--help":
|
|
Console.WriteLine("Usage: Recordingtest.Runner --scenarios <dir> --baselines <dir> --out <dir>");
|
|
Console.WriteLine(" [--profile <name>] [--no-launch]");
|
|
Console.WriteLine(" [--sidecar-url http://localhost:38080] [--no-sidecar]");
|
|
Console.WriteLine(" [--sidecar-profile engine-state]");
|
|
Console.WriteLine(" [--scenario <name>] (run only this scenario)");
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
if (string.IsNullOrEmpty(options.ScenariosDir) ||
|
|
string.IsNullOrEmpty(options.BaselinesDir) ||
|
|
string.IsNullOrEmpty(options.OutDir))
|
|
{
|
|
Console.Error.WriteLine("Missing required args. Use --help.");
|
|
return 2;
|
|
}
|
|
|
|
// engine-bridge v3 — default to the well-known localhost bridge port
|
|
// unless the caller explicitly opts out or overrides the URL.
|
|
IEngineStateSnapshotClient? sidecar = null;
|
|
if (!noSidecar)
|
|
{
|
|
sidecar = new HttpEngineStateSnapshotClient(
|
|
sidecarUrl ?? HttpEngineStateSnapshotClient.DefaultBaseUrl);
|
|
}
|
|
|
|
var runner = new TestRunner();
|
|
var report = runner.RunAll(
|
|
options,
|
|
new DefaultHostFactory(),
|
|
new DefaultNormalizer(),
|
|
new DefaultDiffer(),
|
|
sidecarClient: sidecar);
|
|
|
|
(sidecar as IDisposable)?.Dispose();
|
|
|
|
Console.WriteLine($"Total: {report.Total}, Passed: {report.Passed}, Failed: {report.Failed}, Errored: {report.Errored}");
|
|
return TestRunner.ToExitCode(report);
|
|
}
|
|
}
|