R53 and R55
This commit is contained in:
@ -897,6 +897,15 @@ public class AdaptationTesting : ISMTP
|
||||
return results;
|
||||
}
|
||||
|
||||
public (string i, string v, string c, string n, int p, string f) GetCellInstanceVersionCore(string testName)
|
||||
{
|
||||
(string, string, string, string, int, string) results;
|
||||
MethodBaseName mbn = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, testName, @"D:\Tmp\Phares");
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName);
|
||||
results = new(mbn.CellInstanceName, mbn.CellInstanceVersionName, cellInstanceVersionTuple.Item2.CellCommunicatingRule, cellInstanceVersionTuple.Item2.CellNotCommunicatingRule, cellInstanceVersionTuple.Item2.EdaConnection.PortNumber, cellInstanceVersionTuple.Item2.FrozenBy);
|
||||
return results;
|
||||
}
|
||||
|
||||
public string[] GetCSharpText(string testName)
|
||||
{
|
||||
string[] results;
|
||||
|
190
Adaptation/_Tests/Static/EAF.cs
Normal file
190
Adaptation/_Tests/Static/EAF.cs
Normal file
@ -0,0 +1,190 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Adaptation._Tests.Static;
|
||||
|
||||
[TestClass]
|
||||
public class EAF : LoggingUnitTesting, IDisposable
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static EAF LoggingUnitTesting { get; private set; }
|
||||
|
||||
internal static AdaptationTesting AdaptationTesting { get; private set; }
|
||||
|
||||
public EAF() : base(testContext: null, declaringType: null)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public EAF(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
|
||||
{ }
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
LoggingUnitTesting = new EAF(testContext);
|
||||
string dummyRoot = string.Empty;
|
||||
bool skipEquipmentDictionary = true;
|
||||
AdaptationTesting = new(dummyRoot, testContext, skipEquipmentDictionary, LoggingUnitTesting.TestContextPropertiesAsJson, LoggingUnitTesting.HasWaitForProperty);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
if (LoggingUnitTesting.Logger is not null)
|
||||
LoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (LoggingUnitTesting is not null)
|
||||
LoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Staging()
|
||||
{
|
||||
string testName;
|
||||
Task<string> task;
|
||||
string[] segments;
|
||||
HttpClient httpClient = new();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string currentActiveVersionTag = "CurrentActiveVersion>";
|
||||
string managementSite = "http://mestsa07ec.ec.local:9003/CellInstances/entity/";
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
string[] cellInstances = new string[] { "R74-PLC", "MET08THFTIRQS408M", "HGCV1", "TENCOR1", "R53-EQPT", "EC", "TENCOR1-EDA", "R47-PLC-EDA", "SPV01", "CDE4-EDA", "MET08DDUPSP1TBI", "BACKLOG", "R34", "BIORAD5", "CDE3-EQPT", "BIORAD4-EDA", "CDE2-EDA", "CDE5-EDA", "DEP08SIHTRPLC", "R70-PLC-EDA", "MET08THFTIRSTRATUS", "R34-EQPT", "MET08ANLYSDIFAAST230", "BIORAD4", "CDE3-EDA", "CDE5-EQPT", "R72-PLC-EDA", "R74-PLC-EDA", "BACKLOG-EQPT", "CDE3", "TENCOR3-EDA", "R73-PLC-EDA", "R47-PLC", "SP101", "SPV01-EDA", "BIORAD3-EDA", "R70-PLC", "MET08RESIHGCV", "CDE4", "MET08RESIMAPCDE", "TENCOR2", "TENCOR3", "DEP08SIASM", "SP101-EQPT", "BIORAD2", "CDE2", "HGCV3-EDA", "HGCV2-EDA", "HGCV1-EDA", "BIORAD2-EDA", "TENCOR2-EDA", "CDE4-EQPT", "R72-PLC", "HGCV3", "HGCV2", "BIORAD3", "BIORAD5-EDA", "R34-EDA", "SP101-EDA", "R73-PLC", "CDE5", "MET08DDUPSFS6420" };
|
||||
foreach (string cellInstance in cellInstances.OrderBy(l => l))
|
||||
{
|
||||
if (!cellInstance.Contains('-'))
|
||||
continue;
|
||||
task = httpClient.GetStringAsync($"{managementSite}{cellInstance}");
|
||||
task.Wait();
|
||||
if (task.Result is not string response)
|
||||
continue;
|
||||
segments = response.Split(currentActiveVersionTag);
|
||||
if (segments.Length < 2)
|
||||
continue;
|
||||
testName = string.Concat("Staging__v", segments[1].Split('<')[0].Replace('.', '_'), "__", cellInstance.Replace('-', '_'), "__");
|
||||
(string i, string v, string c, string n, int p, string f) = AdaptationTesting.GetCellInstanceVersionCore(testName);
|
||||
LoggingUnitTesting.Logger.LogInformation($"{p},{v},{i},{c},{n},{f}");
|
||||
}
|
||||
Assert.IsTrue(true);
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 553,v2.19.0,R47-PLC-EDA,,,messtec102.EC.local
|
||||
// 553,v2.19.0,R47-PLC,,,messtec102.EC.local
|
||||
// 7589,v2.43.3,CDE5-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,messtec102.EC.local
|
||||
// 8034,v2.43.4,R34-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,
|
||||
// 8034,v2.43.4,R53-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,
|
||||
// 8134,v2.43.4,R34,jpeg.Communicating,jpeg.NotCommunicating,
|
||||
// 8134,v4.15.0,R34-EDA,,,messtec102.EC.local
|
||||
// 8409,v2.43.0,MET08ANLYSDIFAAST230,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,messtec102.EC.local
|
||||
// 8439,v2.43.1,EC,,,messtec102.EC.local
|
||||
// 8500,v2.43.0,BIORAD2,QS408M.Communicating,QS408M.NotCommunicating,messtec102.EC.local
|
||||
// 8500,v4.15.0,BIORAD2-EDA,,,messtec102.EC.local
|
||||
// 8501,v2.43.0,BIORAD3,QS408M.Communicating,QS408M.NotCommunicating,messtec102.EC.local
|
||||
// 8501,v4.15.0,BIORAD3-EDA,,,messtec102.EC.local
|
||||
// 8509,v2.43.2,MET08THFTIRQS408M,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,messtec102.EC.local
|
||||
// 8510,v2.43.0,BIORAD4,QS408M.Communicating,QS408M.NotCommunicating,messtec102.EC.local
|
||||
// 8510,v4.15.0,BIORAD4-EDA,,,messtec102.EC.local
|
||||
// 8511,v2.43.0,BIORAD5,QS408M.Communicating,QS408M.NotCommunicating,messtec102.EC.local
|
||||
// 8511,v4.15.0,BIORAD5-EDA,,,messtec102.EC.local
|
||||
// 8519,v2.43.2,MET08THFTIRSTRATUS,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,messtec102.EC.local
|
||||
// 8520,v2.43.4,CDE2,txt.Communicating,txt.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8520,v4.15.0,CDE2-EDA,,,messtec102.EC.local
|
||||
// 8521,v2.43.4,CDE5,RsM.Communicating,RsM.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8521,v4.15.0,CDE5-EDA,,,messtec102.EC.local
|
||||
// 8524,v2.43.0,BACKLOG,json.Communicating,json.NotCommunicating,
|
||||
// 8524,v2.43.4,CDE3,RsM.Communicating,RsM.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8524,v2.43.4,CDE4,RsM.Communicating,RsM.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8524,v4.15.0,CDE3-EDA,,,messtec102.EC.local
|
||||
// 8524,v4.15.0,CDE4-EDA,,,messtec102.EC.local
|
||||
// 8526,v2.43.0,CDE3-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,messtec102.EC.local
|
||||
// 8526,v2.43.3,CDE4-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,
|
||||
// 8528,v2.43.0,BACKLOG-EQPT,ConvertExcelToJson.Communicating,ConvertExcelToJson.NotCommunicating,
|
||||
// 8529,v2.43.4,MET08RESIMAPCDE,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,
|
||||
// 8530,v2.43.4,HGCV1,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8530,v4.15.0,HGCV1-EDA,,,messtec102.EC.local
|
||||
// 8531,v2.43.4,HGCV2,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8531,v4.15.0,HGCV2-EDA,,,messtec102.EC.local
|
||||
// 8532,v2.43.4,HGCV3,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8532,v4.15.0,HGCV3-EDA,,,messtec102.EC.local
|
||||
// 8537,v2.43.4,DEP08SIASM,MonitorApplication.Communicating,MonitorApplication.NotCommunicating,
|
||||
// 8538,v2.43.0,DEP08SIHTRPLC,ZipFilesByDate.Communicating,ZipFilesByDate.NotCommunicating,
|
||||
// 8539,v2.43.4,MET08RESIHGCV,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8540,v2.43.4,TENCOR1,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8540,v4.15.0,TENCOR1-EDA,,,messtec102.EC.local
|
||||
// 8541,v2.43.4,TENCOR2,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8541,v4.15.0,TENCOR2-EDA,,,messtec102.EC.local
|
||||
// 8542,v2.43.4,TENCOR3,pcl.Communicating,pcl.NotCommunicating
|
||||
// 8542,v4.15.0,TENCOR3-EDA,,,messtec102.EC.local
|
||||
// 8549,v2.43.4,MET08DDUPSFS6420,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,
|
||||
// 8550,v4.15.0,SP101-EDA,,,messtec102.EC.local
|
||||
// 8551,v2.43.4,SP101,txt.Communicating,txt.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8555,v2.43.0,SP101-EQPT,MoveAllFiles.Communicating,MoveAllFiles.NotCommunicating,messtec102.EC.local
|
||||
// 8559,v2.43.4,MET08DDUPSP1TBI,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8569,v2.43.0,SPV01,,,messtec102.EC.local
|
||||
// 8569,v4.15.0,SPV01-EDA,,,messtec102.EC.local
|
||||
// 8770,v1.0.1,R70-PLC-EDA,,,messtec102.EC.local
|
||||
// 8770,v2.19.0,R70-PLC,,,messtec102.EC.local
|
||||
// 8772,v1.0.1,R72-PLC-EDA,,,messtec102.EC.local
|
||||
// 8772,v2.19.0,R72-PLC,,,messtec102.EC.local
|
||||
// 8773,v1.0.1,R73-PLC-EDA,,,messtec102.EC.local
|
||||
// 8773,v2.19.0,R73-PLC,,,messtec102.EC.local
|
||||
// 8774,v1.0.1,R74-PLC-EDA,,,messtec102.EC.local
|
||||
// 8774,v2.19.0,R74-PLC,,,messtec102.EC.local
|
||||
|
||||
// p p v i
|
||||
// 553 553 v2.19.0 R47-PLC
|
||||
// 7589 7589 v2.43.3 CDE5-EQPT
|
||||
// 8034 8034 v2.43.4 R34-EQPT
|
||||
// 8034
|
||||
// 8134 8134 v2.43.4 R34
|
||||
// 8409 8409 v2.43.0 MET08ANLYSDIFAAST230
|
||||
// 8439 8439 v2.43.1 EC
|
||||
// 8500 8500 v2.43.0 BIORAD2
|
||||
// 8501 8501 v2.43.0 BIORAD3
|
||||
// 8509 8509 v2.43.2 MET08THFTIRQS408M
|
||||
// 8510 8510 v2.43.0 BIORAD4
|
||||
// 8511 8511 v2.43.0 BIORAD5
|
||||
// 8519 8519 v2.43.2 MET08THFTIRSTRATUS
|
||||
// 8520 8520 v2.43.4 CDE2
|
||||
// 8521 8521 v2.43.4 CDE5
|
||||
// 8524
|
||||
// 8524 8524 v2.43.4 CDE3
|
||||
// 8524 v2.43.4 CDE4
|
||||
// 8526 8526 v2.43.0 CDE3-EQPT
|
||||
// 8526 v2.43.3 CDE4-EQPT
|
||||
// 8528 8528 v2.43.0 BACKLOG-EQPT
|
||||
// 8529 8529 v2.43.4 MET08RESIMAPCDE
|
||||
// 8530 8530 v2.43.4 HGCV1
|
||||
// 8531 8531 v2.43.4 HGCV2
|
||||
// 8532 8532 v2.43.4 HGCV3
|
||||
// 8537 8537 v2.43.4 DEP08SIASM
|
||||
// 8538 8538 v2.43.0 DEP08SIHTRPLC
|
||||
// 8539 8539 v2.43.4 MET08RESIHGCV
|
||||
// 8540 8540 v2.43.4 TENCOR1
|
||||
// 8541 8541 v2.43.4 TENCOR2
|
||||
// 8542 8542 v2.43.4 TENCOR3
|
||||
// 8549 8549 v2.43.4 MET08DDUPSFS6420
|
||||
// 8551 8551 v2.43.4 SP101
|
||||
// 8555 8555 v2.43.0 SP101-EQPT
|
||||
// 8559 8559 v2.43.4 MET08DDUPSP1TBI
|
||||
// 8569 8569 v2.43.0 SPV01
|
||||
// 8770 8770 v2.19.0 R70-PLC
|
||||
// 8772 8772 v2.19.0 R72-PLC
|
||||
// 8773 8773 v2.19.0 R73-PLC
|
||||
// 8774 8774 v2.19.0 R74-PLC
|
||||
// 8775 v2.43.0 BACKLOG
|
||||
// 8653 v2.43.4 R53-EQPT
|
74
Adaptation/_Tests/Static/xml.cs
Normal file
74
Adaptation/_Tests/Static/xml.cs
Normal file
@ -0,0 +1,74 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Adaptation._Tests.Static;
|
||||
|
||||
[TestClass]
|
||||
public class XML : LoggingUnitTesting, IDisposable
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static XML LoggingUnitTesting { get; private set; }
|
||||
|
||||
public XML() : base(testContext: null, declaringType: null)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public XML(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
|
||||
{ }
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
LoggingUnitTesting = new XML(testContext);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
if (LoggingUnitTesting.Logger is not null)
|
||||
LoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (LoggingUnitTesting is not null)
|
||||
LoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TestXmlBuild()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
string key;
|
||||
string value;
|
||||
int counter = 500;
|
||||
StringBuilder stringBuilder = new();
|
||||
string a = "<d2p1:ModelObjectParameterDefinition z:Id=\"i";
|
||||
string c = "\"><d2p1:EnumType></d2p1:EnumType><d2p1:Id>0</d2p1:Id><d2p1:Name>CellInstance.R";
|
||||
string f = "</d2p1:Name><d2p1:Value>";
|
||||
string h = "</d2p1:Value><d2p1:ValueType>String</d2p1:ValueType></d2p1:ModelObjectParameterDefinition>";
|
||||
int[] reactors = new int[] { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 70, 72, 73, 74, 75, 77, 79 };
|
||||
foreach (int reactor in reactors)
|
||||
{
|
||||
for (int i = 1; i < 4; i++)
|
||||
{
|
||||
counter += 1;
|
||||
key = i switch { 1 => ".Alias", 2 => "-EQPT.Alias", 3 => "-EQPT.StaticFileServer", _ => throw new Exception() };
|
||||
value = i switch { 1 or 2 => $"R{reactor}", 3 => "10.95.154.##", _ => throw new Exception() };
|
||||
_ = stringBuilder.Append(a).Append(counter).Append(c).Append(reactor).Append(key).Append(f).Append(value).AppendLine(h);
|
||||
}
|
||||
}
|
||||
System.IO.File.WriteAllText(@"D:\Tmp\Phares\a.xml", stringBuilder.ToString());
|
||||
Assert.IsTrue(true);
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user