for Push.

This commit is contained in:
nobobo
2026-06-01 13:23:34 +09:00
parent 9e093ea99f
commit a6550e9928
93 changed files with 10393 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KssSmaPlaLib.AutoTest.Core
{
/// <summary>
/// 全体統括・ステップ順実行・ログ出力
/// </summary>
public static class StepTestRunnerUxer
{
/// <summary>
/// 起動パラメータのUIテスト指定
/// </summary>
private const string KIDOU_PARA_UITEST = "--uitest";
/// <summary>
/// メインPJのエントリーポイント用:
/// 起動パラよりUIテストモード判定
/// </summary>
/// <param name="args">起動パラメータ</param>
/// <returns>UIテストモード?</returns>
public static bool IsModeByArgs(string[] args)
{
// 起動パラ判定
return args.Any(m => m.ToLower() == KIDOU_PARA_UITEST);
}
}
}
+64
View File
@@ -0,0 +1,64 @@
using DocumentFormat.OpenXml.Wordprocessing;
using KssSmaPlaLib.Commons;
using KssSmaPlaLib.AutoTest.Script;
using Serilog.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using KssSmaPlaLib.Batch.Log;
using KssSmaPlaLib.AutoTest.Command.Alias.Loader;
using KssSmaPlaLib.AutoTest.Command.Alias;
using KssSmaPlaLib.AutoTest.Script.Load;
using KssSmaPlaLib.AutoTest.Script.Storage;
using KssSmaPlaLib.AutoTest.Script.Parse;
namespace KssSmaPlaLib.AutoTest.Core
{
public static class TestModeInitializerUxer
{
public static bool TryInitialize(string[] args, out string resultMessage)
{
resultMessage = string.Empty;
// UIステップテストモード判定
var isMode = StepTestRunnerUxer.IsModeByArgs(args);
TestModeUxer.SetTestMode(isMode);
if (!isMode) return true;
// モードのとき、ロード(エイリアス)
if (!CommandAliasLoaderUxer.Try(out var aliasDic, out var messageForMe))
{
resultMessage = messageForMe;
return false;
}
// 保存
CommandAliasUxer.SetAleiasDic(aliasDic);
// ロード(テストスクリプト)
if (!LoadTryUxer.TryLoad(out var stepInfoDTO, out messageForMe))
{
resultMessage = messageForMe;
return false;
}
// 保存
TestScriptStorageUxer.SetStepInfo(stepInfoDTO);
// ステップ内容パース
foreach (var step in stepInfoDTO.StepList)
{
if (!ParseTryUxer.TryParse(step.Raw, out var parsed, out messageForMe))
{
resultMessage = $"ステップ内容が不正です。[ステップNo:{step.StepNo},ステップテキスト:{step.Raw.StepText},エラー内容:{messageForMe}]";
return false;
}
}
// ステップ情報ログ出力
// ↓ToDo自動テスト用ログ出力を作る!
//StepLogUxer.StepInfoLog(stepInfoDTO);
return true;
}
}
}
+18
View File
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KssSmaPlaLib.AutoTest.Core
{
public static class TestModeUxer
{
public static bool IsTestMode { get; private set; }
public static void SetTestMode(bool value)
{
IsTestMode = value;
}
}
}