Add PoC smoke verification
This commit is contained in:
38
TornadoAce_CJOnStyle.SmokeTests/Program.cs
Normal file
38
TornadoAce_CJOnStyle.SmokeTests/Program.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System.Text.Json;
|
||||
using TornadoAce_CJOnStyle.Services;
|
||||
|
||||
var workspace = AutomationWorkspace.CreateDemo();
|
||||
Require(workspace.CueSheets.Count == 3, "Expected 3 cue sheet records.");
|
||||
Require(workspace.ErpSchedules.Count == 3, "Expected 3 ERP schedule records.");
|
||||
Require(workspace.ActiveTemplate.Mappings.Count == 5, "Expected 5 field mappings.");
|
||||
|
||||
var engine = new PocAutomationEngine(workspace);
|
||||
var result = engine.RunFullPoc(0, workspace.ActiveTemplate);
|
||||
|
||||
Require(result.Selection.Record.CueSheetId == "CJ-20260817-001", "Unexpected selected cue sheet.");
|
||||
Require(result.Schedule?.ProgramCode == "PGM-CHOI-0900", "ERP schedule was not matched.");
|
||||
Require(result.GeneratedScene.VisibleTextObjects.Count == 5, "Scene snapshot did not include all visible text objects.");
|
||||
Require(result.MappingValidations.All(validation => validation.Status == "통과"), "Mapping profile validation failed.");
|
||||
Require(result.AdapterChecks.Count >= 3, "Tornado adapter checks were not produced.");
|
||||
Require(result.InspectionSummary.Results.Count == workspace.CueSheets.Count, "Inspection did not cover all cue sheets.");
|
||||
Require(result.InspectionSummary.ReviewCount == 2, "Expected 2 inspection review candidates.");
|
||||
Require(result.LlmReviewRequests.Count == 2, "Expected 2 LLM review candidates.");
|
||||
|
||||
var logPath = new PocRunLogWriter().Write(result);
|
||||
Require(File.Exists(logPath), "PoC audit log was not written.");
|
||||
|
||||
using var logDocument = JsonDocument.Parse(File.ReadAllText(logPath));
|
||||
var root = logDocument.RootElement;
|
||||
Require(root.GetProperty("cueSheetId").GetString() == result.Selection.Record.CueSheetId, "Log cue sheet id mismatch.");
|
||||
Require(root.GetProperty("llmRequestCount").GetInt32() == result.LlmReviewRequests.Count, "Log LLM request count mismatch.");
|
||||
|
||||
Console.WriteLine("PoC smoke verification passed.");
|
||||
Console.WriteLine(logPath);
|
||||
|
||||
static void Require(bool condition, string message)
|
||||
{
|
||||
if (!condition)
|
||||
{
|
||||
throw new InvalidOperationException(message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Platforms>x64</Platforms>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\TornadoAce_CJOnStyle\TornadoAce_CJOnStyle.csproj" />
|
||||
<Content Include="..\TornadoAce_CJOnStyle\Data\PocWorkspace.json" Link="Data\PocWorkspace.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -5,4 +5,7 @@
|
||||
<Project Path="TornadoAce_CJOnStyle/TornadoAce_CJOnStyle.csproj">
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
</Project>
|
||||
<Project Path="TornadoAce_CJOnStyle.SmokeTests/TornadoAce_CJOnStyle.SmokeTests.csproj">
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
</Project>
|
||||
</Solution>
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace TornadoAce_CJOnStyle.Services
|
||||
{
|
||||
private static readonly JsonSerializerOptions JsonOptions = new()
|
||||
{
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||
WriteIndented = true
|
||||
};
|
||||
|
||||
|
||||
@@ -30,6 +30,15 @@
|
||||
4. RFP 구축 범위가 화면 또는 문서에서 추적 가능해야 한다.
|
||||
5. 추후 실제 큐시트 API, ERP API, Tornado SDK, LLM 서비스로 교체할 인터페이스 경계가 유지된다.
|
||||
|
||||
## 검증 명령
|
||||
|
||||
```powershell
|
||||
dotnet build .\TornadoAce_CJOnStyle.slnx -p:Platform=x64 -p:OutDir=artifacts\verify-build\
|
||||
dotnet run --project .\TornadoAce_CJOnStyle.SmokeTests\TornadoAce_CJOnStyle.SmokeTests.csproj -p:Platform=x64
|
||||
```
|
||||
|
||||
스모크 검증은 JSON seed 로드, ERP 매칭, Tornado adapter Scene 생성/추출, 자동 검수, LLM 후보 생성, 실행 로그 저장을 확인한다.
|
||||
|
||||
## 다음 구현 후보
|
||||
|
||||
- 실제 큐시트/ERP API 응답 DTO와 현재 JSON seed 스키마를 대조한다.
|
||||
|
||||
Reference in New Issue
Block a user