diff --git a/Adaptation/FileHandlers/Stratus/FileRead.cs b/Adaptation/FileHandlers/Stratus/FileRead.cs index 3d93801..aff92e0 100644 --- a/Adaptation/FileHandlers/Stratus/FileRead.cs +++ b/Adaptation/FileHandlers/Stratus/FileRead.cs @@ -118,7 +118,10 @@ public class FileRead : Shared.FileRead, IFileRead } if (!iProcessData.Details.Any()) throw new Exception(string.Concat("No Data - ", dateTime.Ticks)); - results = iProcessData.GetResults(this, _Logistics, results.Item4); + if (iProcessData.Details[0] is Detail detail && string.IsNullOrEmpty(detail.PassFail)) + results.Item4.Add(new FileInfo(reportFullPath)); + else + results = iProcessData.GetResults(this, _Logistics, results.Item4); } return results; } diff --git a/Adaptation/FileHandlers/Stratus/ProcessData.cs b/Adaptation/FileHandlers/Stratus/ProcessData.cs index 7b9a088..1d0d733 100644 --- a/Adaptation/FileHandlers/Stratus/ProcessData.cs +++ b/Adaptation/FileHandlers/Stratus/ProcessData.cs @@ -427,6 +427,8 @@ public partial class ProcessData : IProcessData StdDev = StdDev.Remove(StdDev.Length - 1, 1); } } + if (receivedData.Contains("------------- Process failed -------------")) + details.Add(new()); } StringBuilder stringBuilder = new(); UniqueId = string.Concat("StratusBioRad_", Reactor, "_", RDS, "_", PSN, "_", logistics.DateTimeFromSequence.ToString("yyyyMMddHHmmssffff")); diff --git a/Adaptation/FileHandlers/txt/FileRead.cs b/Adaptation/FileHandlers/txt/FileRead.cs index aa5d444..00aef0c 100644 --- a/Adaptation/FileHandlers/txt/FileRead.cs +++ b/Adaptation/FileHandlers/txt/FileRead.cs @@ -17,7 +17,7 @@ public class FileRead : Shared.FileRead, IFileRead private readonly string _OriginalDataBioRad; public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) : - base(new Description(), true, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted) + base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted) { _MinFileLength = 10; _NullData = string.Empty; diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.0/BIORAD4.cs b/Adaptation/_Tests/Extract/Staging/v2.39.0/BIORAD4.cs index 18a3371..47c6b3f 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.39.0/BIORAD4.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.39.0/BIORAD4.cs @@ -44,6 +44,18 @@ public class BIORAD4 Helpers.Metrology.UpdatePassDirectory(variables[2]); } + [TestMethod] + public void Staging__v2_39_0__BIORAD4__txt637818036815840307__ProcessFailed() + { + string check = "*DataBioRad.txt"; + _BIORAD4.Staging__v2_39_0__BIORAD4__txt(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + _ = fileRead.ReExtract(); + Helpers.Metrology.UpdatePassDirectory(variables[2]); + } + [TestMethod] public void Staging__v2_39_0__BIORAD4__txt637746296480404920__Failure() { @@ -51,10 +63,7 @@ public class BIORAD4 _BIORAD4.Staging__v2_39_0__BIORAD4__txt(); MethodBase methodBase = new StackFrame().GetMethod(); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); - - _ = Helpers.Metrology.GetLogisticsColumnsAndBody(variables[2], variables[4]); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); - _ = fileRead.ReExtract(); Helpers.Metrology.UpdatePassDirectory(variables[2]); } @@ -103,6 +112,18 @@ public class BIORAD4 Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); } + [TestMethod] + public void Staging__v2_39_0__BIORAD4__Stratus637818036815840307__ProcessFailed() + { + string check = "CassetteDataBioRad_*.txt"; + _BIORAD4.Staging__v2_39_0__BIORAD4__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + _ = fileRead.ReExtract(); + Helpers.Metrology.UpdatePassDirectory(variables[2]); + } + [TestMethod] public void Staging__v2_39_0__BIORAD4__QS408M() => _BIORAD4.Staging__v2_39_0__BIORAD4__QS408M(); diff --git a/Adaptation/package.json b/Adaptation/package.json index b5ddcde..5f45d1c 100644 --- a/Adaptation/package.json +++ b/Adaptation/package.json @@ -5,17 +5,19 @@ "dotnet-format": "dotnet format --report .vscode --verbosity detailed --severity warn", "pull": "git pull", "garbage-collect": "git gc", - "AA-CreateSelfDescription.Staging.v2_39_0-BIORAD5_EQPT-Staging__v2_39_0__BIORAD5_EQPT__DownloadRsMFile": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD5_EQPT & Staging__v2_39_0__BIORAD5_EQPT__DownloadRsMFile\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", + "AA-CreateSelfDescription.Staging.v2_39_0-BIORAD5_EQPT-Staging__v2_39_0__BIORAD5_EQPT__DownloadRsMFile": "dotnet test --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD5_EQPT & Staging__v2_39_0__BIORAD5_EQPT__DownloadRsMFile\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", "AT-CreateSelfDescription.Staging.v2_39_0-MET08THFTIRSTRATUS": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~MET08THFTIRSTRATUS\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", "AV-CreateSelfDescription.Staging.v2_39_0-BIORAD4_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD4_EQPT\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", "AW-CreateSelfDescription.Staging.v2_39_0-BIORAD4": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD4\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", "AX-CreateSelfDescription.Staging.v2_39_0-BIORAD5_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD5_EQPT\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", "AY-CreateSelfDescription.Staging.v2_39_0-BIORAD5": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD5\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", "AZ-CreateSelfDescription.Staging.v2_39_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "BA-Extract.Staging.v2_39_0-BIORAD5-Staging__v2_39_0__BIORAD5__RsM643047560320000000__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD5 & Staging__v2_39_0__BIORAD5__RsM643047560320000000__Normal\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "BB-Extract.Staging.v2_39_0-MET08THFTIRSTRATUS-Staging__v2_39_0__MET08THFTIRSTRATUS__MET08THFTIRSTRATUS___637745411457972777__First": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~MET08THFTIRSTRATUS & Staging__v2_39_0__MET08THFTIRSTRATUS__MET08THFTIRSTRATUS___637745411457972777__First\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "BC-Extract.Staging.v2_39_0-BIORAD5-Staging__v2_39_0__BIORAD5__txt637805172599370243__Why": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD5 & Staging__v2_39_0__BIORAD5__txt637805172599370243__Why\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "BD-Extract.Staging.v2_39_0-BIORAD5-Staging__v2_39_0__BIORAD5__Stratus637805172599370243__Why": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD5 & Staging__v2_39_0__BIORAD5__Stratus637805172599370243__Why\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", + "BA-Extract.Staging.v2_39_0-BIORAD5-Staging__v2_39_0__BIORAD5__RsM643047560320000000__Normal": "dotnet test --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD5 & Staging__v2_39_0__BIORAD5__RsM643047560320000000__Normal\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", + "BB-Extract.Staging.v2_39_0-MET08THFTIRSTRATUS-Staging__v2_39_0__MET08THFTIRSTRATUS__MET08THFTIRSTRATUS___637745411457972777__First": "dotnet test --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~MET08THFTIRSTRATUS & Staging__v2_39_0__MET08THFTIRSTRATUS__MET08THFTIRSTRATUS___637745411457972777__First\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", + "BC-Extract.Staging.v2_39_0-BIORAD5-Staging__v2_39_0__BIORAD5__txt637805172599370243__Why": "dotnet test --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD5 & Staging__v2_39_0__BIORAD5__txt637805172599370243__Why\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", + "BD-Extract.Staging.v2_39_0-BIORAD5-Staging__v2_39_0__BIORAD5__Stratus637805172599370243__Why": "dotnet test --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD5 & Staging__v2_39_0__BIORAD5__Stratus637805172599370243__Why\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", + "BE-Extract.Staging.v2_39_0-BIORAD4-Staging__v2_39_0__BIORAD4__txt637818036815840307__ProcessFailed": "dotnet test --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD4 & Staging__v2_39_0__BIORAD4__txt637818036815840307__ProcessFailed\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", + "BF-Extract.Staging.v2_39_0-BIORAD4-Staging__v2_39_0__BIORAD4__Stratus637818036815840307__ProcessFailed": "dotnet test --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD4 & Staging__v2_39_0__BIORAD4__Stratus637818036815840307__ProcessFailed\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", "BT-Extract.Staging.v2_39_0-MET08THFTIRSTRATUS": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~MET08THFTIRSTRATUS\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", "BV-Extract.Staging.v2_39_0-BIORAD4_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD4_EQPT\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", "BW-Extract.Staging.v2_39_0-BIORAD4": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD4\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",