From c4a3f8db90530a727ffab77c3bb5bb7d782792bf Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 25 八月 2025 15:50:27 +0800
Subject: [PATCH] 上传代码;
---
HMI.UnitTest/MainWindow.xaml.cs | 51 ++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/HMI.UnitTest/MainWindow.xaml.cs b/HMI.UnitTest/MainWindow.xaml.cs
index d367685..a267a28 100644
--- a/HMI.UnitTest/MainWindow.xaml.cs
+++ b/HMI.UnitTest/MainWindow.xaml.cs
@@ -1,10 +1,10 @@
锘縰sing ConnectionUtil;
using HMI.Core.Api;
using HMI.Core.Util;
+using HMI.Simple.Util;
using log4net;
using Panuon.WPF.UI;
using Plugin.DataBoard;
-using Plugin.TestBuilder;
using Plugin.TestResult_WPF;
using Plugin.TsExecution;
using System;
@@ -22,6 +22,7 @@
private ILog log = LogManager.GetLogger("UnitTest");
public MainWindow()
{
+ ProductModelHelper.GetModelBySNR("cc123", out string model, out string msg);
LangUtil.Load();
InitializeComponent();
//page.Children.Add(new UserControl1());
@@ -33,13 +34,58 @@
private void Button_Click(object sender, RoutedEventArgs e)
{
+ Task.Run(() =>
+ {
+ for (int j = 0; j < 1000; j++)
+ {
+ string status = (j % 2 == 0) ? "Passed" : "Failed";
+ string d = (j % 2 == 0) ? "9" : "9999999999999999999999999999999999999999999999999999999999999999995";
+ tsExecution.AddTestData(0, $"ConnectivityCANRec,2,3,4,{d},6,{status}");
+ Thread.Sleep(5);
+ }
+ });
+
+ Task.Run(() =>
+ {
+ for (int j = 0; j < 1000; j++)
+ {
+ string status = (j % 2 == 0) ? "Passed" : "Failed";
+ string d = (j % 2 == 0) ? "9" : "9999999999999999999999999999999999999999999999999999999999999999995";
+ tsExecution.AddTestData(1, $"ConnectivityCANRec,2,3,4,{d},6,{status}");
+ Thread.Sleep(5);
+ }
+ });
+
+ Task.Run(() =>
+ {
+ for (int j = 0; j < 1000; j++)
+ {
+ string status = (j % 2 == 0) ? "Passed" : "Failed";
+ string d = (j % 2 == 0) ? "9" : "9999999999999999999999999999999999999999999999999999999999999999995";
+ tsExecution.AddTestData(2, $"ConnectivityCANRec,2,3,4,{d},6,{status}");
+ Thread.Sleep(5);
+ }
+ });
+
//Task.Run(() =>
//{
// for (int j = 0; j < 1000; j++)
// {
// string status = (j % 2 == 0) ? "Passed" : "Failed";
// string d = (j % 2 == 0) ? "9" : "9999999999999999999999999999999999999999999999999999999999999999995";
- // tsExecution.AddTestData(0, $"ConnectivityCANRec,2,3,4,{d},6,{status}");
+ // tsExecution.AddTestData(3, $"ConnectivityCANRec,2,3,4,{d},6,{status}");
+ // Thread.Sleep(5);
+ // }
+ //});
+
+ //Task.Run(() =>
+ //{
+ // for (int j = 0; j < 1000; j++)
+ // {
+ // string status = (j % 2 == 0) ? "Passed" : "Failed";
+ // string d = (j % 2 == 0) ? "9" : "9999999999999999999999999999999999999999999999999999999999999999995";
+ // tsExecution.AddTestData(1, $"ConnectivityCANRec,2,3,4,{d},6,{status}");
+ // Thread.Sleep(5);
// }
//});
@@ -160,7 +206,6 @@
private TsExecution tsExecution;
- private TestBuilder testBuilder;
private DataBoard dataBoard;
private void Window_Loaded(object sender, RoutedEventArgs e)
--
Gitblit v1.9.1