ProductionUiCordonel: - automatic start for assembly line

This commit is contained in:
Thomas Wiedebusch
2025-07-03 15:38:56 +02:00
parent 4cb63f521e
commit 4c6e467243
23 changed files with 1792 additions and 1213 deletions
@@ -0,0 +1,397 @@
[
{
"RegisterName": "SENSUSRADIO_RadioAddress",
"RegisterValue": "GI6fMA==",
"Source": 0
},
{
"RegisterName": "SENSUSRADIO_EncryptionKey",
"RegisterValue": "Dp+sxqDh7xw7J6SbrCFlNQ==",
"Source": 0
},
{
"RegisterName": "GENESISFLOW_MeterSize",
"RegisterValue": "AAAAAQ==",
"Source": 0
},
{
"RegisterName": "GENESISFLOW_DisplayUnits",
"RegisterValue": "AAAAAA==",
"Source": 0
},
{
"RegisterName": "METROLOGYASST_FlowUnits",
"RegisterValue": "AAAABA==",
"Source": 0
},
{
"RegisterName": "SENSUSRADIO_FrequencyIndicator",
"RegisterValue": "AAABsQ==",
"Source": 0
},
{
"RegisterName": "METROLOGYASST_PulseMode",
"RegisterValue": "AAAABQ==",
"Source": 0
},
{
"RegisterName": "METROLOGYASST_PulseLength",
"RegisterValue": "AAAACA==",
"Source": 0
},
{
"RegisterName": "METROLOGYASST_PressurePresent",
"RegisterValue": "AAAAAA==",
"Source": 0
},
{
"RegisterName": "METROLOGYASST_TemperatureUnits",
"RegisterValue": "AAAAAA==",
"Source": 0
},
{
"RegisterName": "METROLOGYASST_PressureRate",
"RegisterValue": "AAAAAA==",
"Source": 0
},
{
"RegisterName": "METROLOGYASST_PressureUnits",
"RegisterValue": "AAAAAA==",
"Source": 0
},
{
"RegisterName": "METROLOGYASST_PulseWeight",
"RegisterValue": "ADDUAA==",
"Source": 0
},
{
"RegisterName": "SENSUSRADIO_MbusState",
"RegisterValue": "AAAABw==",
"Source": 0
},
{
"RegisterName": "SENSUSRADIO_OmTxInterval",
"RegisterValue": "AAAOEA==",
"Source": 0
},
{
"RegisterName": "SENSUSRADIO_TxInterval",
"RegisterValue": "AAAADw==",
"Source": 0
},
{
"RegisterName": "SENSUSRADIO_WakeupInterval",
"RegisterValue": "AAAAAw==",
"Source": 0
},
{
"RegisterName": "SENSUSRADIO_LatInterval",
"RegisterValue": "AAAAAw==",
"Source": 0
},
{
"RegisterName": "GENESISFLOW_DisplayPow10",
"RegisterValue": "/f///w==",
"Source": 0
},
{
"RegisterName": "METROLOGYASST_FlowPoint",
"RegisterValue": "AgAAAA==",
"Source": 0
},
{
"RegisterName": "CUSTOMER_AlarmEnableMask",
"RegisterValue": "AACAUw==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_AlarmBroadcastMask",
"RegisterValue": "AAAf3A==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_AlarmVisualMask",
"RegisterValue": "AAAf3A==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_LeakTimeThreshold",
"RegisterValue": "AABOwA==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_ExcessFlowTimeThreshold",
"RegisterValue": "AAAABQ==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_ReverseFlowTimeThreshold",
"RegisterValue": "AAAHCA==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_TemperatureHighThreshold",
"RegisterValue": "AAAB9A==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_TemperatureHighDelay",
"RegisterValue": "AAABLA==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_TemperatureLowThreshold",
"RegisterValue": "AAAAFA==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_TemperatureLowDelay",
"RegisterValue": "AAABLA==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_PressureHighThreshold",
"RegisterValue": "ABhqAA==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_PressureHighDelay",
"RegisterValue": "AAABLA==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_PressureLowThreshold",
"RegisterValue": "AAB1MA==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_PressureLowDelay",
"RegisterValue": "AAABLA==",
"Source": 1
},
{
"RegisterName": "METROLOGYASST_TemperatureUnits",
"RegisterValue": "AAAAAA==",
"Source": 1
},
{
"RegisterName": "METROLOGYASST_PressureOffset",
"RegisterValue": "AAAAAA==",
"Source": 1
},
{
"RegisterName": "PERIODICLOG_DataLogContents",
"RegisterValue": "DAAkAw==",
"Source": 1
},
{
"RegisterName": "PERIODICLOG_DataLogPeriod",
"RegisterValue": "AAAAPA==",
"Source": 1
},
{
"RegisterName": "PERIODICLOG_AverageFlowPeriod",
"RegisterValue": "AAU=",
"Source": 1
},
{
"RegisterName": "SENSUSRADIO_AverageFlowPeriod",
"RegisterValue": "AAU=",
"Source": 1
},
{
"RegisterName": "PERIODICLOG_PeriodicLogLifeTimeCounter",
"RegisterValue": "AAAAAA==",
"Source": 1
},
{
"RegisterName": "SENSUSRADIO_MetroRadioLifeTimeCounter",
"RegisterValue": "AAAAAA==",
"Source": 1
},
{
"RegisterName": "PERIODICLOG_FixedDateReadingContents",
"RegisterValue": "DAAkAw==",
"Source": 1
},
{
"RegisterName": "PERIODICLOG_FixedDateDayOfMonth",
"RegisterValue": "AAAAAQ==",
"Source": 1
},
{
"RegisterName": "POWERMON_WarnFromClamp",
"RegisterValue": "JZgGAA==",
"Source": 1
},
{
"RegisterName": "SYSTEM_UpgradePermissions",
"RegisterValue": "AAAA/g==",
"Source": 1
},
{
"RegisterName": "POWERMON_BatteryQuantity",
"RegisterValue": "AAAAAg==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_SampleRate",
"RegisterValue": "AAI=",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_LedMode",
"RegisterValue": "AAAAAA==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_HardErrorLimit",
"RegisterValue": "AAQ=",
"Source": 1
},
{
"RegisterName": "IRDA_PulseReportRate",
"RegisterValue": "AAAAAA==",
"Source": 1
},
{
"RegisterName": "IRDA_AdapterPresenceLimit",
"RegisterValue": "AAM=",
"Source": 1
},
{
"RegisterName": "SENSUSRADIO_OTAControlFlags",
"RegisterValue": "AAA=",
"Source": 1
},
{
"RegisterName": "CUSTOMER_RebootCount",
"RegisterValue": "AAAAAA==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_LowFlowMaxPeriod",
"RegisterValue": "ADwAAA==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_LowFlowThreshold",
"RegisterValue": "AAAAyA==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_MaxValidAmplitude",
"RegisterValue": "rwAAAA==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_MaxValidDeltaToF",
"RegisterValue": "AAPGXg==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_MaxValidToF",
"RegisterValue": "AXl8ww==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_MeterSize",
"RegisterValue": "AAAAAQ==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_MinValidAmplitude",
"RegisterValue": "JYAAAA==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_MinValidToF",
"RegisterValue": "ANG3Fw==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_Timeout",
"RegisterValue": "AAE=",
"Source": 1
},
{
"RegisterName": "CUSTOMER_LeakFlowThreshold",
"RegisterValue": "AAF3AA==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_ExcessFlowVolumeThreshold",
"RegisterValue": "AMNQAA==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_AppArrangement",
"RegisterValue": "AAE=",
"Source": 1
},
{
"RegisterName": "METROLOGYASST_PressureUnits",
"RegisterValue": "AAA=",
"Source": 1
},
{
"RegisterName": "CUSTOMER_Locale",
"RegisterValue": "AAAA0A==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_MaxValidAmplitude",
"RegisterValue": "rwAAAA==",
"Source": 1
},
{
"RegisterName": "SENSUSRADIO_HistoricalAlarmsDays",
"RegisterValue": "AAAAWg==",
"Source": 1
},
{
"RegisterName": "SENSUSRADIO_OmTxInterval",
"RegisterValue": "AAADhA==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_ForwardArrow",
"RegisterValue": "AAAAAQ==",
"Source": 1
},
{
"RegisterName": "SENSUSRADIO_EncryptionKey",
"RegisterValue": "8L/KE0jHXszHydwgWg0KHQ==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_ArrowThreshold",
"RegisterValue": "HoSA",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_StartHit",
"RegisterValue": "AAAABg==",
"Source": 1
},
{
"RegisterName": "CUSTOMER_InstallationTime",
"RegisterValue": "AAAAAA==",
"Source": 1
},
{
"RegisterName": "METROLOGYASST_PressureRate",
"RegisterValue": "AADqYA==",
"Source": 1
},
{
"RegisterName": "GENESISFLOW_MaxDeltaToFDeviation",
"RegisterValue": "AAGtfw==",
"Source": 1
},
{
"RegisterName": "SENSUSRADIO_TemperatureMeasurePeriod",
"RegisterValue": "AAAAPA==",
"Source": 1
}
]
@@ -1 +1 @@
89102b0142e574de38a9f47d370f3334e5e6c268
8cb55c312de586b683d72cf58c13e2801d10e14b767777d98338d3e1473a1213
@@ -29,38 +29,41 @@ INPUTS: "Cordonel PcbId" essential to pass the register restorer
"Kill VerifyParams" forces the test to fail due to one changed parameter if set to "X", else set to "-".
OUTPUT: "StatusReturn" with results "Okay" or "Failed", additional check of complete EOL progress status. The expected EOL result
will be preset with the expected values and modified with the "Kill x" to force the change from "Okay" to "Failed".
COMMENT: NCrunch needs programming parameters in a specific folder
"[SolutionPath]\Hardware\WaterMeter\Genesis\MockGenesis\MockRawParameterExamples" as it copies all assemblies to a
special NCrunch working folder which is total separated from the project specific "\bin\Debug" folder!
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckFinalParametrization'
And Name the public function to be checked for functionality 'ExecuteProcess'
And Name the object type holding the property 'StatusReturn'
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckFinalParametrization'
And Name the public function to be checked for functionality 'ExecuteProcess'
And Name the object type holding the property 'StatusReturn'
# Name one production process to be checked in advance to the real test. This can be done more than once to fill a list with
# all required preceding production processes to check an entire sequence of processes.
And Define production process for sequencing before test 'ExecFinalParametrization'
And Define production process for sequencing before test 'ExecStoreConfiguration'
And Define production process for sequencing before test 'ExecRebootCordonel'
# Name one production process to be checked in advance to the real test. This can be done more than once to fill a list with
# all required preceding production processes to check an entire sequence of processes.
And Define production process for sequencing before test 'ExecFinalParametrization'
And Define production process for sequencing before test 'ExecStoreConfiguration'
And Define production process for sequencing before test 'ExecRebootCordonel'
# Activate the entire equality EOL progress check between requirement and result
And Activate EOL progress check
##--------------------------------- Define Test-Cases ------------------------------------------------------------------------
And Input matrix defining the test cases and results
# "Kill x" forces the test to fail to check if all tests are executed. REMIND: Set only ONE to "X" and leave all others as "-"! Otherwise the test will FAIL!
| TestNo | Cordonel PcbId | Cordonel FW Version | Cordonel Meter Size | Kill WriteParams | Kill StoreParams | Kill Reboot | Kill VerifyParams | Kill Registers | StatusReturn | Comment |
| 1 | 182100041 | R1.3.0B | DN50 | - | - | - | - | - | Okay | Sequence successfully executed for EMEA DN50 |
| 2 | 212120036 | R1.3.0B | DN80 | - | - | - | - | - | Okay | Sequence successfully executed for EMEA DN80 |
| 3 | 241630065 | R2.0.06 | US2 | - | - | - | - | - | Okay | Sequence successfully executed for NA US2 (2") |
| 4 | 182100041 | R1.3.0B | DN00 | - | - | - | - | - | Failed | Parameter file for EMEA DN00 missing CSD Params |
| 5 | 182100041 | R1.3.0B | DN01 | - | - | - | - | - | Failed | Parameter file for EMEA DN01 not present |
| 6 | 182100041 | R1.3.0B | DN50 | X | - | - | - | - | Failed | Parameter write failed |
| 7 | 182100041 | R1.3.0B | DN50 | - | X | - | - | - | Failed | Store configuration failed |
| 8 | 182100041 | R1.3.0B | DN50 | - | - | X | - | - | Failed | Reboot failed |
| 9 | 182100041 | R1.3.0B | DN50 | - | - | - | X | - | Failed | Parameter verify failed |
| 10 | 182100041 | R1.3.0B | DN50 | - | - | - | - | X | Failed | Registers not loaded: invalid configuration.json |
# Activate the entire equality EOL progress check between requirement and result
And Activate EOL progress check
When Execute the generic tests
Then Check the generic test results
##--------------------------------- Define Test-Cases ------------------------------------------------------------------------
And Input matrix defining the test cases and results
# "Kill x" forces the test to fail to check if all tests are executed. REMIND: Set only ONE to "X" and leave all others as "-"! Otherwise the test will FAIL!
| TestNo | Cordonel PcbId | Cordonel FW Version | Cordonel Meter Size | Kill WriteParams | Kill StoreParams | Kill Reboot | Kill VerifyParams | Kill Registers | StatusReturn | Comment |
| 1 | 182100041 | R1.3.0B | DN50 | - | - | - | - | - | Okay | Sequence successfully executed for EMEA DN50 |
| 2 | 212120036 | R1.3.0B | DN80 | - | - | - | - | - | Okay | Sequence successfully executed for EMEA DN80 |
| 3 | 241630065 | R2.0.06 | US2 | - | - | - | - | - | Okay | Sequence successfully executed for NA US2 (2") |
| 4 | 182100041 | R1.3.0B | DN00 | - | - | - | - | - | Failed | Parameter file for EMEA DN00 missing CSD Params |
| 5 | 182100041 | R1.3.0B | DN01 | - | - | - | - | - | Failed | Parameter file for EMEA DN01 not present |
| 6 | 182100041 | R1.3.0B | DN50 | X | - | - | - | - | Failed | Parameter write failed |
| 7 | 182100041 | R1.3.0B | DN50 | - | X | - | - | - | Failed | Store configuration failed |
| 8 | 182100041 | R1.3.0B | DN50 | - | - | X | - | - | Failed | Reboot failed |
| 9 | 182100041 | R1.3.0B | DN50 | - | - | - | X | - | Failed | Parameter verify failed |
| 10 | 182100041 | R1.3.0B | DN50 | - | - | - | - | X | Failed | Registers not loaded: invalid configuration.json |
When Execute the generic tests
Then Check the generic test results
# ===============================================================================================================================
@@ -110,7 +110,10 @@ DN80 and the US2.", ProgrammingLanguage.CSharp, ((string[])(null)));
"Return\" with results \"Okay\" or \"Failed\", additional check of complete EOL progre" +
"ss status. The expected EOL result \r\n will be preset with the expected " +
"values and modified with the \"Kill x\" to force the change from \"Okay\" to \"Failed" +
"\". ", tagsOfScenario, argumentsOfScenario);
"\". \r\nCOMMENT: NCrunch needs programming parameters in a specific folder \r\n " +
" \"[SolutionPath]\\Hardware\\WaterMeter\\Genesis\\MockGenesis\\MockRawParameterExa" +
"mples\" as it copies all assemblies to a \r\n special NCrunch working fold" +
"er which is total separated from the project specific \"\\bin\\Debug\" folder!", tagsOfScenario, argumentsOfScenario);
#line 11
this.ScenarioInitialize(scenarioInfo);
#line hidden
@@ -131,26 +134,26 @@ this.ScenarioInitialize(scenarioInfo);
else
{
this.ScenarioStart();
#line 34
testRunner.Given("Initialize new test scenario for production process \'CheckFinalParametrization\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line 37
testRunner.Given("Initialize new test scenario for production process \'CheckFinalParametrization\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line hidden
#line 35
testRunner.And("Name the public function to be checked for functionality \'ExecuteProcess\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 38
testRunner.And("Name the public function to be checked for functionality \'ExecuteProcess\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
#line 36
testRunner.And("Name the object type holding the property \'StatusReturn\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 39
testRunner.And("Name the object type holding the property \'StatusReturn\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
#line 40
testRunner.And("Define production process for sequencing before test \'ExecFinalParametrization\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 43
testRunner.And("Define production process for sequencing before test \'ExecFinalParametrization\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
#line 41
testRunner.And("Define production process for sequencing before test \'ExecStoreConfiguration\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
#line 42
testRunner.And("Define production process for sequencing before test \'ExecRebootCordonel\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 44
testRunner.And("Define production process for sequencing before test \'ExecStoreConfiguration\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
#line 45
testRunner.And("Activate EOL progress check", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
testRunner.And("Define production process for sequencing before test \'ExecRebootCordonel\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
#line 48
testRunner.And("Activate EOL progress check", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"TestNo",
@@ -284,14 +287,14 @@ this.ScenarioInitialize(scenarioInfo);
"X",
"Failed",
"Registers not loaded: invalid configuration.json"});
#line 48
testRunner.And("Input matrix defining the test cases and results", ((string)(null)), table1, "And ");
#line 51
testRunner.And("Input matrix defining the test cases and results", ((string)(null)), table1, "And ");
#line hidden
#line 62
testRunner.When("Execute the generic tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 65
testRunner.When("Execute the generic tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
#line 63
testRunner.Then("Check the generic test results", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 66
testRunner.Then("Check the generic test results", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line hidden
}
this.ScenarioCleanup();
@@ -16,24 +16,25 @@ INPUTS: The values needed to be predefined automatically by the "Sentinel" on
"Partial Compare" "X" will be used to check if the string contains a substring defined in the "StringReturn".
"Partial Compare" "-" will force the string being exact as defined!
OUTPUT: "StringReturn" as test result containing the expected string or "null" as error result from the method.
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the property to be checked for 'EOLSoftwareNameAndVersion'
And Name the object type holding the property 'StringReturn'
And Name the private function to be checked for functionality 'CheckEolProgress'
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the property to be checked for 'EOLSoftwareNameAndVersion'
And Name the object type holding the property 'StringReturn'
And Name the private function to be checked for functionality 'CheckEolProgress'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | EOL Id | EOL StartDate | Cordonel PcbId | EOL PcbId | Partial Compare | StringReturn | Comment |
| 1 | 123 | UTC Now | 182100041 | 182100041 | X | Cordonel | EOL Progress successfully created |
| 2 | 123 | UTC Now | 0 | 182100041 | - | null | Unmatching Cordonel PcbId |
| 3 | 123 | UTC Now | 182100041 | 0 | - | null | Unmatching EOL PcbId |
| 4 | 123 | unknown | 182100041 | 182100041 | - | null | Start date not set |
| 5 | 0 | UTC Now | 182100041 | 182100041 | X | null | EOL Id not set |
When Execute the generic tests
Then Check the generic test results
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | EOL Id | EOL StartDate | Cordonel PcbId | EOL PcbId | Partial Compare | StringReturn | Comment |
| 1 | 123 | UTC Now | 182100041 | 182100041 | X | Cordonel | EOL Progress successfully created |
| 2 | 123 | UTC Now | 0 | 182100041 | - | null | Unmatching Cordonel PcbId |
| 3 | 123 | UTC Now | 182100041 | 0 | - | null | Unmatching EOL PcbId |
| 4 | 123 | unknown | 182100041 | 182100041 | - | null | Start date not set |
| 5 | 0 | UTC Now | 182100041 | 182100041 | X | null | EOL Id not set |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@CheckProductionProperties
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_002]_Check_Requirements
FUNCTION: Check if any requirement is defined being active for this Cordonel.
@@ -45,56 +46,56 @@ INPUTS: Requirements "Standard Id" just a number or "null",
"Special Version" just a number or "null" and
"Special IsActive" if "X" else "-".
OUTPUT: "EOL Status" with results "Okay" or "Failed"
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the property to be checked for 'RequirementRequestChecked'
And Name the object type holding the property 'EOLStatus'
And Name the private function to be checked for functionality 'CheckRequirements'
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the property to be checked for 'RequirementRequestChecked'
And Name the object type holding the property 'EOLStatus'
And Name the private function to be checked for functionality 'CheckRequirements'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Standard Id | Standard Version | Standard IsActive | Standard IsApproved | Special Id | Special Version | Special IsActive | Special IsApproved | EOL Status | Comment |
| 1 | 10 | 5 | X | X | null | null | - | - | Okay | Standard Requirement is active and approved |
| 2 | 10 | 5 | X | X | 5 | 3 | X | - | Okay | Standard Requirement is active and approved, special is active but not approved |
| 3 | 10 | 5 | - | - | 5 | 3 | X | X | Okay | Special Requirement is active and approved |
| 4 | 10 | 5 | X | X | 5 | 3 | X | X | Okay | Both Requirements are active and approved |
| 5 | 10 | 5 | - | - | 5 | 3 | - | - | Failed | No Requirement is active and no requirement approved |
| 6 | 10 | 5 | X | - | 5 | 3 | - | - | Failed | Standard Requirement is active but not approved |
| 7 | 10 | 5 | - | - | 5 | 3 | X | - | Failed | Special Requirement is active but not approved |
| 8 | null | null | - | - | null | null | - | - | Failed | No Requirement is defined |
| 9 | null | null | - | - | 5 | 3 | X | X | Failed | Missing Standard Requirement |
| 10 | null | null | X | X | null | null | - | - | Failed | Standard Requirement is active but undefined |
| 11 | null | 5 | X | X | null | null | - | - | Failed | Standard Requirement is active but Id missing |
| 12 | 10 | null | X | X | null | null | - | - | Failed | Standard Requirement is active but version missing |
| 13 | 10 | 5 | X | X | null | 2 | X | X | Failed | Special Requirement is active but Id missing |
| 14 | 10 | 5 | X | X | 5 | null | X | X | Failed | Special Requirement is active but version missing |
When Execute the generic tests
Then Check the generic test results
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Standard Id | Standard Version | Standard IsActive | Standard IsApproved | Special Id | Special Version | Special IsActive | Special IsApproved | EOL Status | Comment |
| 1 | 10 | 5 | X | X | null | null | - | - | Okay | Standard Requirement is active and approved |
| 2 | 10 | 5 | X | X | 5 | 3 | X | - | Okay | Standard Requirement is active and approved, special is active but not approved |
| 3 | 10 | 5 | - | - | 5 | 3 | X | X | Okay | Special Requirement is active and approved |
| 4 | 10 | 5 | X | X | 5 | 3 | X | X | Okay | Both Requirements are active and approved |
| 5 | 10 | 5 | - | - | 5 | 3 | - | - | Failed | No Requirement is active and no requirement approved |
| 6 | 10 | 5 | X | - | 5 | 3 | - | - | Failed | Standard Requirement is active but not approved |
| 7 | 10 | 5 | - | - | 5 | 3 | X | - | Failed | Special Requirement is active but not approved |
| 8 | null | null | - | - | null | null | - | - | Failed | No Requirement is defined |
| 9 | null | null | - | - | 5 | 3 | X | X | Failed | Missing Standard Requirement |
| 10 | null | null | X | X | null | null | - | - | Failed | Standard Requirement is active but undefined |
| 11 | null | 5 | X | X | null | null | - | - | Failed | Standard Requirement is active but Id missing |
| 12 | 10 | null | X | X | null | null | - | - | Failed | Standard Requirement is active but version missing |
| 13 | 10 | 5 | X | X | null | 2 | X | X | Failed | Special Requirement is active but Id missing |
| 14 | 10 | 5 | X | X | 5 | null | X | X | Failed | Special Requirement is active but version missing |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@CheckProductionPrperties
@CheckProductionProperties
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_003]_Check_ProductionOrderNo
FUNCTION: Compare the Cordonel production-order with the production-order from the requirement to validate that the correct requirements
going to be used for the check of the actual production state.
PRESETS: none
INPUTS: "Cordonel ProdOrderNo" and "Requirement ProdOrderNo"
OUTPUT: "EOL Status" with results "Okay" or "Failed"
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckProductionOrderNumber'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'RequirementOrderChecked'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Cordonel ProdOrderNo | Requirement ProdOrderNo | EOL Status | Comment |
| 1 | 3118323 | 3118323 | Okay | Order number is identical |
| 2 | 3118323 | 0 | Failed | Unmatching Requirement Order number |
| 3 | 0 | 3118323 | Failed | Unmatching Cordonel Order number |
When Execute the generic tests
Then Check the generic test results
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckProductionOrderNumber'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'RequirementOrderChecked'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Cordonel ProdOrderNo | Requirement ProdOrderNo | EOL Status | Comment |
| 1 | 3118323 | 3118323 | Okay | Order number is identical |
| 2 | 3118323 | 0 | Failed | Unmatching Requirement Order number |
| 3 | 0 | 3118323 | Failed | Unmatching Cordonel Order number |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@@ -105,25 +106,25 @@ PRESETS: none
INPUTS: "Cordonel PcbId", EOL PcbId and "Requirement PcbId". If the requirement-PcbId id is "null" then the requirement is order based
and not just for a single Cordonel!
OUTPUT: "EOL Status" with results "Okay", "Failed" or "Skipped"
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckPcbId'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'RequirementPcbIdChecked'
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckPcbId'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'RequirementPcbIdChecked'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
# An order based requirement needs a "null" for "Requirement PcbId"
| TestNo | Cordonel PcbId | EOL PcbId | Requirement PcbId | EOL Status | Comment |
| 1 | 182100041 | 182100041 | null | Skipped | Order based requirement |
| 2 | 182100041 | 182100041 | 182100041 | Okay | PcbId is identical |
| 3 | 182100041 | 0 | 182100041 | Failed | Unmatching EOL Progress PcbId |
| 4 | 182100041 | 182100041 | 0 | Failed | Unmatching Requirement PcbId |
| 5 | 0 | 182100041 | 182100041 | Failed | Unmatching Cordonel PcbId |
| 6 | 1821000 | 182100041 | 182100041 | Failed | Cordonel PcbId to short |
| 7 | null | 182100041 | 182100041 | Failed | Cordonel PcbId is null |
When Execute the generic tests
Then Check the generic test results
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
# An order based requirement needs a "null" for "Requirement PcbId"
| TestNo | Cordonel PcbId | EOL PcbId | Requirement PcbId | EOL Status | Comment |
| 1 | 182100041 | 182100041 | null | Skipped | Order based requirement |
| 2 | 182100041 | 182100041 | 182100041 | Okay | PcbId is identical |
| 3 | 182100041 | 0 | 182100041 | Failed | Unmatching EOL Progress PcbId |
| 4 | 182100041 | 182100041 | 0 | Failed | Unmatching Requirement PcbId |
| 5 | 0 | 182100041 | 182100041 | Failed | Unmatching Cordonel PcbId |
| 6 | 1821000 | 182100041 | 182100041 | Failed | Cordonel PcbId to short |
| 7 | null | 182100041 | 182100041 | Failed | Cordonel PcbId is null |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@@ -133,23 +134,23 @@ FUNCTION: Compare the Region from Cordonel and requirement.
PRESETS: none
INPUTS: "Cordonel Region" and "Requirement Region".
OUTPUT: "EOL Status" with results "Okay" or "Failed"
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckRegion'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'RequirementRegionChecked'
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckRegion'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'RequirementRegionChecked'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Cordonel Region | Requirement Region | EOL Status | Comment |
| 1 | EMEA | EMEA | Okay | Region is identical |
| 2 | NA | NA | Okay | Region is identical |
| 3 | EMEA | NA | Failed | Unmatched Region |
| 4 | null | EMEA | Failed | Unknown Cordonel Region |
| 5 | EMEA | null | Failed | Unknown Requirement Region |
| 6 | null | null | Failed | Unspecified Region |
When Execute the generic tests
Then Check the generic test results
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Cordonel Region | Requirement Region | EOL Status | Comment |
| 1 | EMEA | EMEA | Okay | Region is identical |
| 2 | NA | NA | Okay | Region is identical |
| 3 | EMEA | NA | Failed | Unmatched Region |
| 4 | null | EMEA | Failed | Unknown Cordonel Region |
| 5 | EMEA | null | Failed | Unknown Requirement Region |
| 6 | null | null | Failed | Unspecified Region |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@@ -159,24 +160,24 @@ FUNCTION: Check for the checksum (cyclic redundancy check - CRC) of the metrolog
PRESETS: none
INPUTS: "Cordonel LUT CRC" and "Requirement LUT CRC" just a string representing a number in hex e.g. "0xEB7C.
OUTPUT: "StringReturn" as test result containing the expected string or "null" as error result from the method.
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckLutCrc'
And Name the object type holding the property 'StringReturn'
And Name the property to be checked for 'ProductionStatusLutCrc'
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckLutCrc'
And Name the object type holding the property 'StringReturn'
And Name the property to be checked for 'ProductionStatusLutCrc'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
# "StringReturn" "null" is the error return from the functions based on strings as return value!
| TestNo | Cordonel LUT CRC | Requirement LUT CRC | StringReturn | Comment |
| 1 | 0xEB7C | 0xEB7C | 0xEB7C | LUT CRC is identical |
| 2 | 0x0000 | 0xEB7C | null | Wrong Cordonel LUT CRC |
| 3 | 0xEB7C | 0x0000 | null | Wrong Requirement LUT CRC |
| 4 | null | 0xEB7C | null | Cordonel LUT CRC undefined |
| 5 | 0xEB7C | null | null | Requirement LUT CRC undefined |
| 6 | null | null | null | LUT CRC's undefined |
When Execute the generic tests
Then Check the generic test results
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
# "StringReturn" "null" is the error return from the functions based on strings as return value!
| TestNo | Cordonel LUT CRC | Requirement LUT CRC | StringReturn | Comment |
| 1 | 0xEB7C | 0xEB7C | 0xEB7C | LUT CRC is identical |
| 2 | 0x0000 | 0xEB7C | null | Wrong Cordonel LUT CRC |
| 3 | 0xEB7C | 0x0000 | null | Wrong Requirement LUT CRC |
| 4 | null | 0xEB7C | null | Cordonel LUT CRC undefined |
| 5 | 0xEB7C | null | null | Requirement LUT CRC undefined |
| 6 | null | null | null | LUT CRC's undefined |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@@ -186,24 +187,24 @@ FUNCTION: Compare the Meter Size from Cordonel and requirement.
PRESETS: none
INPUTS: "Cordonel Meter Size" and "Requirement Meter Size" as strings naming the size as e.g. "DN50", "US1_5" or "1 1/2 INC".
OUTPUT: "StringReturn" as test result containing the expected string or "null" as error result from the method.
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckMeterSize'
And Name the object type holding the property 'StringReturn'
And Name the property to be checked for 'ProductionStatusMeterSize'
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckMeterSize'
And Name the object type holding the property 'StringReturn'
And Name the property to be checked for 'ProductionStatusMeterSize'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
# "StringReturn" "null" is the error return from the functions based on strings as return value!
| TestNo | Cordonel Meter Size | Requirement Meter Size | StringReturn | Comment |
| 1 | DN50 | DN50 | DN50 | Meter size is identical |
| 2 | US1_5 | 1 1/2 INC | 1 1/2 INC | Meter size is identical but uses different naming |
| 3 | DN80 | 1 1/2 INC | null | Wrong Requirement Meter size |
| 4 | null | DN50 | null | Cordonel Meter size undefined |
| 5 | DN50 | null | null | Requirement Meter size undefined |
| 6 | null | null | null | Meter sizes undefined |
When Execute the generic tests
Then Check the generic test results
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
# "StringReturn" "null" is the error return from the functions based on strings as return value!
| TestNo | Cordonel Meter Size | Requirement Meter Size | StringReturn | Comment |
| 1 | DN50 | DN50 | DN50 | Meter size is identical |
| 2 | US1_5 | 1 1/2 INC | 1 1/2 INC | Meter size is identical but uses different naming |
| 3 | DN80 | 1 1/2 INC | null | Wrong Requirement Meter size |
| 4 | null | DN50 | null | Cordonel Meter size undefined |
| 5 | DN50 | null | null | Requirement Meter size undefined |
| 6 | null | null | null | Meter sizes undefined |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@@ -227,33 +228,62 @@ INPUTS: "Cordonel Core Revision" as float specifying the Breeze operating syst
"Change App CRC" "X" to set it to an invalid CRC else "-".
OUTPUT: "StringReturn" as test result containing the expected string or "null" as error result from the method, else it returns the
valid installed FW version string.
COMMENT: NCrunch needs FW package in a specific folder "C:\User\[UserName]\AppData\Roaming\Genesis\MockFwExamples" as it copies
all assemblies to a special NCrunch working folder which is total separated from the project specific "\bin\Debug" folder!
COMMENT: NCrunch needs programming parameters in a specific folder
"[SolutionPath]\Hardware\WaterMeter\Genesis\MockGenesis\MockFwExamples" as it copies all assemblies to a
special NCrunch working folder which is total separated from the project specific "\bin\Debug" folder!
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckFwAndApps'
And Name the object type holding the property 'StringReturn'
And Name the property to be checked for 'ProductionStatusFwVersion'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
# "StringReturn" "null" is the error return from the functions based on strings as return value!
| TestNo | Cordonel Core Revision | Cordonel FW Version | Requirement FW Version | Modify AppId | Erase App | Change App Version | Change App CRC | StringReturn | Comment |
| 1 | 1.71 | R1.3.0B | R1.3.0B | null | - | - | - | R1.3.0B | FW Version is identical |
| 2 | 1.71 | R2.0.06 | R2.0.06 | null | - | - | - | R2.0.06 | FW Version is identical |
| 3 | 1.60 | R1.3.0B | R1.3.0B | null | - | - | - | null | Core revision is incompatible |
| 4 | 1.71 | R1.3.0B | R1.2.47 | null | - | - | - | null | Wrong FW version installed |
| 5 | 1.71 | R1.3.0B | R1.3.0B | 15 | X | - | - | null | Genesis flow is invalid |
| 6 | 1.71 | R1.3.0B | R1.3.0B | 15 | - | X | - | null | Genesis flow version modified |
| 7 | 1.71 | R1.3.0B | R1.3.0B | 15 | - | - | X | null | Genesis flow CRC modified |
When Execute the generic tests
Then Check the generic test results
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckFwAndApps'
And Name the object type holding the property 'StringReturn'
And Name the property to be checked for 'ProductionStatusFwVersion'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
# "StringReturn" "null" is the error return from the functions based on strings as return value!
| TestNo | Cordonel Core Revision | Cordonel FW Version | Requirement FW Version | Modify AppId | Erase App | Change App Version | Change App CRC | StringReturn | Comment |
| 1 | 1.71 | R1.3.0B | R1.3.0B | null | - | - | - | R1.3.0B | FW Version is identical |
| 2 | 1.71 | R2.0.06 | R2.0.06 | null | - | - | - | R2.0.06 | FW Version is identical |
| 3 | 1.60 | R1.3.0B | R1.3.0B | null | - | - | - | null | Core revision is incompatible |
| 4 | 1.71 | R1.3.0B | R1.2.47 | null | - | - | - | null | Wrong FW version installed |
| 5 | 1.71 | R1.3.0B | R1.3.0B | 15 | X | - | - | null | Genesis flow is invalid |
| 6 | 1.71 | R1.3.0B | R1.3.0B | 15 | - | X | - | null | Genesis flow version modified |
| 7 | 1.71 | R1.3.0B | R1.3.0B | 15 | - | - | X | null | Genesis flow CRC modified |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@CheckKitronRadioSignalLevels
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_009]_Check_Kitron_Radio_Signal_Levels
FUNCTION: Check if radio signal levels have been defined (contained in parameter list) FOR THIS cORDONEL SIZE AND LENGHT.
PRESETS: none
INPUTS: .
OUTPUT: "StatusReturn" with results "Okay" or "Failed"
COMMENT: NCrunch needs programming parameters in a specific folder
"[SolutionPath]\Hardware\WaterMeter\Genesis\MockGenesis\MockRawParameterExamples" as it copies all assemblies to a
special NCrunch working folder which is total separated from the project specific "\bin\Debug" folder!
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckKitronRadioSignalLevels'
And Name the object type holding the property 'StatusReturn'
# Name one production process to be checked in advance to the real test. This can be done more than once to fill a list with
# all required preceding production processes to check an entire sequence of processes.
And Define production process for sequencing before test 'ExecFinalParametrization'
And Define production process for sequencing before test 'CheckFinalParametrization'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Cordonel Meter Size | StatusReturn | Comment |
| 1 | DN50 | Okay | Valid Kitron radio calibration values |
| 2 | DN02 | Failed | Missing Kitron radio calibration values |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@CheckLifetimes
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_009]_Check_Remaining_Battery_Load
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_010]_Check_Remaining_Battery_Load
FUNCTION: Compare the remaining battery load from Cordonel and the requirement.
PRESETS: none
INPUTS: "Normal Current [uA]" multiplied with exceeded lifetime together with "Production Drained [%] for an alternative threshold,
@@ -266,177 +296,177 @@ INPUTS: "Normal Current [uA]" multiplied with exceeded lifetime together with
"Max Drained [%]" Threshold for allowed drainage at EOL in standard check. If alternative threshold is active then this is
the ABSOLUTE LIMIT.
OUTPUT: "EOL Status" with results "Okay" or "Failed"
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckRemainingBatteryLoad'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'ProductionStatusBatteryLoadChecked'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Normal Current [uA] | Production Supplement [%] | Actual Lifetime [days] | Actual Drained [%] | Max Drained [%] | EOL Status | Comment |
| 1 | 119.8 | 1.5 | 90 | 2.0 | 5.0 | Okay | Alternative threshold okay |
| 2 | 119.8 | 1.5 | 90 | 2.5 | 5.0 | Failed | Alternative threshold exceeded |
| 3 | 119.8 | 1.5 | 180 | 2.5 | 2.0 | Failed | Absolute max drained limit exceeded |
| 4 | null | null | 90 | 2.0 | 2.0 | Okay | Normal threshold okay |
| 5 | null | null | 90 | 2.5 | 2.0 | Failed | Normal threshold exceeded |
| 6 | null | null | 0 | 2.0 | 5.0 | Failed | Lifetime of 0 days error |
| 7 | null | null | 90 | 0.0 | 5.0 | Failed | Drained load of 0 % error |
| 8 | null | null | 90 | 2.0 | null | Failed | Max remaining battery load is null |
When Execute the generic tests
Then Check the generic test results
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckRemainingBatteryLoad'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'ProductionStatusBatteryLoadChecked'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Normal Current [uA] | Production Supplement [%] | Actual Lifetime [days] | Actual Drained [%] | Max Drained [%] | EOL Status | Comment |
| 1 | 119.8 | 1.5 | 90 | 2.0 | 5.0 | Okay | Alternative threshold okay |
| 2 | 119.8 | 1.5 | 90 | 2.5 | 5.0 | Failed | Alternative threshold exceeded |
| 3 | 119.8 | 1.5 | 180 | 2.5 | 2.0 | Failed | Absolute max drained limit exceeded |
| 4 | null | null | 90 | 2.0 | 2.0 | Okay | Normal threshold okay |
| 5 | null | null | 90 | 2.5 | 2.0 | Failed | Normal threshold exceeded |
| 6 | null | null | 0 | 2.0 | 5.0 | Failed | Lifetime of 0 days error |
| 7 | null | null | 90 | 0.0 | 5.0 | Failed | Drained load of 0 % error |
| 8 | null | null | 90 | 2.0 | null | Failed | Max remaining battery load is null |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@CheckLifetimes
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_010]_Check_Remaining_Lifetime
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_011]_Check_Remaining_Lifetime
FUNCTION: Compare the remaining life time reported by the Cordonel and the requirement.
PRESETS: none
INPUTS: "Actual Lifetime [days]" is the time in days the Cordonel after Kitron production,
"Actual Drained [%]" is used to calculate the drained load to forecast the remaining lifetime,
"Required Lifetime [years]" Threshold for remaining lifetime.
OUTPUT: "EOL Status" with results "Okay" or "Failed"
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckRemainingLifetime'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'ProductionStatusRemainingLifeTimeChecked'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Actual Lifetime [days] | Required Lifetime [years] | Actual Drained [%] | EOL Status | Comment |
| 1 | 90 | 20.0 | 1.0 | Okay | Remaining lifetime as required |
| 2 | 365 | 5.0 | 10.0 | Okay | Remaining lifetime as required |
| 3 | 90 | 20.0 | 2.0 | Failed | Remaining lifetime to short |
| 4 | 0 | 20.0 | 1.0 | Failed | Actual lifetime of 0 days error |
| 5 | 90 | 20.0 | 0.0 | Failed | Actual drained load of 0 % error |
| 6 | 90 | null | 1.0 | Failed | Required lifetime is null |
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckRemainingLifetime'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'ProductionStatusRemainingLifeTimeChecked'
When Execute the generic tests
Then Check the generic test results
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Actual Lifetime [days] | Required Lifetime [years] | Actual Drained [%] | EOL Status | Comment |
| 1 | 90 | 20.0 | 1.0 | Okay | Remaining lifetime as required |
| 2 | 365 | 5.0 | 10.0 | Okay | Remaining lifetime as required |
| 3 | 90 | 20.0 | 2.0 | Failed | Remaining lifetime to short |
| 4 | 0 | 20.0 | 1.0 | Failed | Actual lifetime of 0 days error |
| 5 | 90 | 20.0 | 0.0 | Failed | Actual drained load of 0 % error |
| 6 | 90 | null | 1.0 | Failed | Required lifetime is null |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@CheckLifetimes
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_011]_Check_Storage_Months
@CheckLifetimeS
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_012]_Check_Storage_Months
FUNCTION: Compare the production date reported by the Cordonel with the actual date and check the requirement.
PRESETS: none
INPUTS: "Assembly Months before Now" as zero or negative floating point number or invalid if set to "null".
"Max Storage Months" floating point number of months allowed until production has to be finalized.
OUTPUT: "StatusReturn" with results "Okay" or "Failed"
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckStorageMonths'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'MaxStorageMonthsChecked'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Assembly Months before Now | Max Storage Months | EOL Status | Comment |
| 1 | -3.0 | 3.0 | Okay | Storage months in range |
| 2 | -3.0 | 2.0 | Failed | Exceeded maximal allowed storage time |
| 3 | null | 2.0 | Failed | Error assembly months are null |
| 4 | -3.0 | null | Failed | Error max storage months are null |
| 5 | 3.0 | 3.0 | Failed | Error assembly time lies in the future |
| 6 | -3.0 | -3.0 | Failed | Error storage months is negative |
When Execute the generic tests
Then Check the generic test results
OUTPUT: "EOL Status" with results "Okay" or "Failed"
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckStorageMonths'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'MaxStorageMonthsChecked'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Assembly Months before Now | Max Storage Months | EOL Status | Comment |
| 1 | -3.0 | 3.0 | Okay | Storage months in range |
| 2 | -3.0 | 2.0 | Failed | Exceeded maximal allowed storage time |
| 3 | null | 2.0 | Failed | Error assembly months are null |
| 4 | -3.0 | null | Failed | Error max storage months are null |
| 5 | 3.0 | 3.0 | Failed | Error assembly time lies in the future |
| 6 | -3.0 | -3.0 | Failed | Error storage months is negative |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@CheckCalibrations
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_012]_Check_Preadjustment
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_013]_Check_Preadjustment
FUNCTION: Check the database content reporting a flow-test preadjustment.
PRESETS: none
INPUTS: "Test Bench Fields" the array of test bench fields
"Test Bench State[4]" the field containing a number if preadjustment successfully executed, null if not.
"Skip Calib" to skip all calibration related checks
OUTPUT: "EOL Status" with results "Okay" or "Failed"
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckPreadjustment'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'ProductionStatusZeroFlowChecked'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Test Bench Fields | Test Bench State[4] | Skip Calib | EOL Status | Comment |
| 1 | 5 | 21 | X | Skipped | Skipped calibration checks by requirement |
| 2 | 5 | 21 | - | Okay | Test bench preadjustment succeeded |
| 3 | 5 | 0 | - | Okay | Test bench preadjustment succeeded |
| 4 | 5 | 500 | - | Okay | Test bench preadjustment succeeded |
| 5 | 4 | 21 | - | Failed | Error test bench fields too little |
| 6 | 5 | null | - | Failed | Error test bench status[4] is null |
| 7 | null | 21 | - | Failed | Error test bench fields null |
When Execute the generic tests
Then Check the generic test results
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckPreadjustment'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'ProductionStatusZeroFlowChecked'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Test Bench Fields | Test Bench State[4] | Skip Calib | EOL Status | Comment |
| 1 | 5 | 21 | X | Skipped | Skipped calibration checks by requirement |
| 2 | 5 | 21 | - | Okay | Test bench preadjustment succeeded |
| 3 | 5 | 0 | - | Okay | Test bench preadjustment succeeded |
| 4 | 5 | 500 | - | Okay | Test bench preadjustment succeeded |
| 5 | 4 | 21 | - | Failed | Error test bench fields too little |
| 6 | 5 | null | - | Failed | Error test bench status[4] is null |
| 7 | null | 21 | - | Failed | Error test bench fields null |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@CheckCalibrations
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_013]_Check_Flow_Test_State
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_014]_Check_Flow_Test_State
FUNCTION: Check the database content reporting the flow-test state.
PRESETS: none
INPUTS: "Test Bench Fields" the array of test bench fields
"Test Bench State[5]" the field containing a number of 30 if calibration succeeded
"Skip Calib" to skip all calibration related checks if set to "X" else "-".
OUTPUT: "EOL Status" with results "Skipped", "Okay" or "Failed"
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckFlowTestState'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'ProductionStatusCalibrationChecked'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Test Bench Fields | Test Bench State[5] | Skip Calib | EOL Status | Comment |
| 1 | 6 | 30 | X | Skipped | Skipped calibration checks by requirement |
| 2 | 6 | 30 | - | Okay | Test bench calibration succeeded |
| 3 | 6 | 30 | - | Okay | Test bench calibration succeeded |
| 4 | 5 | 30 | - | Failed | Error test bench fields too little |
| 5 | 6 | 29 | - | Failed | Error test bench status[5] number to small |
| 6 | 6 | 31 | - | Failed | Error test bench status[5] number to large |
| 7 | 6 | null | - | Failed | Error test bench status[5] is null |
| 8 | null | 30 | - | Failed | Error test bench fields null |
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckFlowTestState'
And Name the object type holding the property 'EOLStatus'
And Name the property to be checked for 'ProductionStatusCalibrationChecked'
When Execute the generic tests
Then Check the generic test results
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
| TestNo | Test Bench Fields | Test Bench State[5] | Skip Calib | EOL Status | Comment |
| 1 | 6 | 30 | X | Skipped | Skipped calibration checks by requirement |
| 2 | 6 | 30 | - | Okay | Test bench calibration succeeded |
| 3 | 6 | 30 | - | Okay | Test bench calibration succeeded |
| 4 | 5 | 30 | - | Failed | Error test bench fields too little |
| 5 | 6 | 29 | - | Failed | Error test bench status[5] number to small |
| 6 | 6 | 31 | - | Failed | Error test bench status[5] number to large |
| 7 | 6 | null | - | Failed | Error test bench status[5] is null |
| 8 | null | 30 | - | Failed | Error test bench fields null |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@CheckCalibrations
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_014]_Check_Calib_Factors
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_015]_Check_Calib_Factors
FUNCTION: Compare the calibration values reported by the Cordonel with the flow-test calibration values reported by the database.
PRESETS: All calibration values not covered by this test in valid range.
INPUTS: "Meter Calib Fact 1/2/3" Meter calibration factors 1, 2 and 3 stored in and read out from the Cordonel,
"DB Calib Fact 1/2/3" Required calibration factors 1, 2 and 3 reported by the database.
"Skip Calib" to skip all calibration related checks if set to "X" else "-".
OUTPUT: "StatusReturn" with results "Skipped", "Okay" or "Failed"
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckCalibrationValues'
And Name the object type holding the property 'StatusReturn'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
# REMIND: The highest priority has the equality of the calibration factors between Meter and database. If those
# don't match, the check of valid range and set to default values doesn't come in focus!
| TestNo | Meter Calib Fact 1 | Meter Calib Fact 2 | Meter Calib Fact 3 | DB Calib Fact 1 | DB Calib Fact 2 | DB Calib Fact 3 | Skip Calib | StatusReturn | Comment |
| 1 | 10000 | 20000 | 30000 | 10000 | 20000 | 30000 | X | Skipped | Skipped calib checks per requirement |
| 2 | 10000 | 20000 | 30000 | 10000 | 20000 | 30000 | - | Okay | Valid calib factors |
| 3 | 15625 | 20000 | 30000 | 15625 | 20000 | 30000 | - | Okay | Valid calib factors (1 default) |
| 4 | 15625 | 15625 | 30000 | 15625 | 15625 | 30000 | - | Okay | Valid calib factors (2 defaults) |
| 5 | 15625 | 15625 | 15625 | 15625 | 15625 | 15625 | - | Warning | Invalid Meter calib factors (3 defaults) |
| 6 | 10000 | 20000 | 30000 | 10000 | 44444 | 30000 | - | Failed | Inconsistent calib factors DB to Meter |
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the private function to be checked for functionality 'CheckCalibrationValues'
And Name the object type holding the property 'StatusReturn'
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
# REMIND: The highest priority has the equality of the calibration factors between Meter and database. If those
# don't match, the check of valid range and set to default values doesn't come in focus!
| TestNo | Meter Calib Fact 1 | Meter Calib Fact 2 | Meter Calib Fact 3 | DB Calib Fact 1 | DB Calib Fact 2 | DB Calib Fact 3 | Skip Calib | StatusReturn | Comment |
| 1 | 10000 | 20000 | 30000 | 10000 | 20000 | 30000 | X | Skipped | Skipped calib checks per requirement |
| 2 | 10000 | 20000 | 30000 | 10000 | 20000 | 30000 | - | Okay | Valid calib factors |
| 3 | 15625 | 20000 | 30000 | 15625 | 20000 | 30000 | - | Okay | Valid calib factors (1 default) |
| 4 | 15625 | 15625 | 30000 | 15625 | 15625 | 30000 | - | Okay | Valid calib factors (2 defaults) |
| 5 | 15625 | 15625 | 15625 | 15625 | 15625 | 15625 | - | Warning | Invalid Meter calib factors (3 defaults) |
| 6 | 10000 | 20000 | 30000 | 10000 | 44444 | 30000 | - | Failed | Inconsistent calib factors DB to Meter |
When Execute the generic tests
Then Check the generic test results
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@CheckProductionStateProcess
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_015]_Check_Complete_Flow_Production_State
Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_016]_Check_Complete_Flow_Production_State
FUNCTION: Check the entire production process sequence except the database calls with all underlaying sub-processes.
PRESETS: Preset all values with valid parameters to pass the test as "Okay" needed to successfully pass all underlaying tests:
- EOL Id | EOL StartDate | Cordonel PcbId | EOL PcbId
@@ -458,100 +488,100 @@ INPUTS: "Kill x" forces the test to fail to check if all tests are executed. R
OUTPUT: "StatusReturn" with results "Okay" or "Failed",
additional check of complete EOL progress status. The expected EOL result will be set with the preset values and
modified with the "Kill x" from "Okay" to "Failed"
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the public function to be checked for functionality 'ExecuteProcess'
And Name the object type holding the property 'StatusReturn'
# Activate the entire equality EOL progress check between requirement and result
And Activate EOL progress check
# Name one production process to be checked in advance to the real test. This can be done more than once to fill a list with
# all required preceding production processes to check an entire sequence of processes.
And Define production process for sequencing before test 'ExecFinalParametrization'
And Define production process for sequencing before test 'CheckFinalParametrization'
# The input initializations don't have a "TestNo" nor a result (EOLStatus, StringReturn or StatusReturn) as those are commonly used for
# all tests specified in "Input matrix defining the test cases and results". All these inputs have a setup to pass the overall test with
# positive feedback (all are good).
And Input initializations for the test matrix and presets to pass the preceding tests
| EOL Id | EOL StartDate | Cordonel PcbId | EOL PcbId | Comment |
| 123 | UTC Now | 182100041 | 182100041 | EOL Progress successfully created |
And Input initializations for the test matrix and presets to pass the preceding tests
| Standard Id | Standard Version | Standard IsActive | Standard IsApproved | Special Id | Special Version | Comment |
| 10 | 5 | X | X | null | null | Standard Requirement is active and approved |
And Input initializations for the test matrix and presets to pass the preceding tests
| Cordonel ProdOrderNo | Requirement ProdOrderNo | Comment |
| 3118323 | 3118323 | Order number is identical |
And Input initializations for the test matrix and presets to pass the preceding tests
| Cordonel PcbId | EOL PcbId | Requirement PcbId | Comment |
| 182100041 | 182100041 | 182100041 | PcbId is identical |
And Input initializations for the test matrix and presets to pass the preceding tests
| Cordonel Region | Requirement Region | Comment |
| EMEA | EMEA | Region is identical |
And Input initializations for the test matrix and presets to pass the preceding tests
| Cordonel LUT CRC | Requirement LUT CRC | Comment |
| 0xEB7C | 0xEB7C | LUT CRC is identical |
And Input initializations for the test matrix and presets to pass the preceding tests
| Cordonel Meter Size | Requirement Meter Size | Comment |
| DN50 | DN50 | Meter size is identical |
And Input initializations for the test matrix and presets to pass the preceding tests
| Cordonel Core Revision | Cordonel FW Version | Requirement FW Version | Comment |
| 1.71 | R1.3.0B | R1.3.0B | FW Version is identical |
And Input initializations for the test matrix and presets to pass the preceding tests
| Max Drained [%] | Comment |
| 2.0 | Normal threshold okay |
#--------------------------------- Prepare Tests ----------------------------------------------------------------------------
Given Initialize new test scenario for production process 'CheckProductionState'
And Name the public function to be checked for functionality 'ExecuteProcess'
And Name the object type holding the property 'StatusReturn'
And Input initializations for the test matrix and presets to pass the preceding tests
| Actual Lifetime [days] | Required Lifetime [years] | Actual Drained [%] | Comment |
| 90 | 20.0 | 1.0 | Remaining lifetime as required |
And Input initializations for the test matrix and presets to pass the preceding tests
| Assembly Months before Now | Max Storage Months | Comment |
| -3.0 | 3.0 | Storage months in range |
And Input initializations for the test matrix and presets to pass the preceding tests
| Test Bench Fields | Test Bench State[4] | Comment |
| 5 | 21 | Test bench preadjustment succeeded |
And Input initializations for the test matrix and presets to pass the preceding tests
| Test Bench Fields | Test Bench State[5] | Comment |
| 6 | 30 | Test bench calibration succeeded |
And Input initializations for the test matrix and presets to pass the preceding tests
| Meter Calib Fact 1 | Meter Calib Fact 2 | Meter Calib Fact 3 | DB Calib Fact 1 | DB Calib Fact 2 | DB Calib Fact 3 | Comment |
| 10000 | 20000 | 30000 | 10000 | 20000 | 30000 | Valid calib factors |
# Activate the entire equality EOL progress check between requirement and result
And Activate EOL progress check
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
# "Kill x" forces the test to fail to check if all tests are executed. REMIND: Set only ONE to "X" and leave all others as "-"! Otherwise the test will FAIL!
| TestNo | Kill EOL | Kill Requ | Kill Order | Kill PcbId | Kill Region | Kill LUT | Kill Size | Kill FW | Kill Load | Kill LifeTime | Kill StoreTime | Kill PreAdj | Kill FlowTest | Kill Calib | Kill RadioParam | StatusReturn | Comment |
| 1 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | Okay | Test sequence complete |
| 2 | X | - | - | - | - | - | - | - | - | - | - | - | - | - | - | Failed | Detected kill EOL generation |
| 3 | - | X | - | - | - | - | - | - | - | - | - | - | - | - | - | Failed | Detected kill requirement |
| 4 | - | - | X | - | - | - | - | - | - | - | - | - | - | - | - | Failed | Detected kill production order check |
| 5 | - | - | - | X | - | - | - | - | - | - | - | - | - | - | - | Failed | Detected kill PcbId check |
| 6 | - | - | - | - | X | - | - | - | - | - | - | - | - | - | - | Failed | Detected kill region check |
| 7 | - | - | - | - | - | X | - | - | - | - | - | - | - | - | - | Failed | Detected kill LUT check |
| 8 | - | - | - | - | - | - | X | - | - | - | - | - | - | - | - | Failed | Detected kill meter size check |
| 9 | - | - | - | - | - | - | - | X | - | - | - | - | - | - | - | Failed | Detected kill FW check |
| 10 | - | - | - | - | - | - | - | - | X | - | - | - | - | - | - | Failed | Detected kill battery load check |
| 11 | - | - | - | - | - | - | - | - | - | X | - | - | - | - | - | Failed | Detected kill life time check |
| 12 | - | - | - | - | - | - | - | - | - | - | X | - | - | - | - | Failed | Detected kill storage time check |
| 13 | - | - | - | - | - | - | - | - | - | - | - | X | - | - | - | Failed | Detected kill preadjustment check |
| 14 | - | - | - | - | - | - | - | - | - | - | - | - | X | - | - | Failed | Detected kill flow test check |
| 15 | - | - | - | - | - | - | - | - | - | - | - | - | - | X | - | Failed | Detected kill calibrations check |
| 16 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | X | Failed | Detected kill radio parameter |
When Execute the generic tests
Then Check the generic test results
# Name one production process to be checked in advance to the real test. This can be done more than once to fill a list with
# all required preceding production processes to check an entire sequence of processes.
And Define production process for sequencing before test 'ExecFinalParametrization'
And Define production process for sequencing before test 'CheckFinalParametrization'
# The input initializations don't have a "TestNo" nor a result (EOLStatus, StringReturn or StatusReturn) as those are commonly used for
# all tests specified in "Input matrix defining the test cases and results". All these inputs have a setup to pass the overall test with
# positive feedback (all are good).
And Input initializations for the test matrix and presets to pass the preceding tests
| EOL Id | EOL StartDate | Cordonel PcbId | EOL PcbId | Comment |
| 123 | UTC Now | 182100041 | 182100041 | EOL Progress successfully created |
And Input initializations for the test matrix and presets to pass the preceding tests
| Standard Id | Standard Version | Standard IsActive | Standard IsApproved | Special Id | Special Version | Comment |
| 10 | 5 | X | X | null | null | Standard Requirement is active and approved |
And Input initializations for the test matrix and presets to pass the preceding tests
| Cordonel ProdOrderNo | Requirement ProdOrderNo | Comment |
| 3118323 | 3118323 | Order number is identical |
And Input initializations for the test matrix and presets to pass the preceding tests
| Cordonel PcbId | EOL PcbId | Requirement PcbId | Comment |
| 182100041 | 182100041 | 182100041 | PcbId is identical |
And Input initializations for the test matrix and presets to pass the preceding tests
| Cordonel Region | Requirement Region | Comment |
| EMEA | EMEA | Region is identical |
And Input initializations for the test matrix and presets to pass the preceding tests
| Cordonel LUT CRC | Requirement LUT CRC | Comment |
| 0xEB7C | 0xEB7C | LUT CRC is identical |
And Input initializations for the test matrix and presets to pass the preceding tests
| Cordonel Meter Size | Requirement Meter Size | Comment |
| DN50 | DN50 | Meter size is identical |
And Input initializations for the test matrix and presets to pass the preceding tests
| Cordonel Core Revision | Cordonel FW Version | Requirement FW Version | Comment |
| 1.71 | R1.3.0B | R1.3.0B | FW Version is identical |
And Input initializations for the test matrix and presets to pass the preceding tests
| Max Drained [%] | Comment |
| 2.0 | Normal threshold okay |
And Input initializations for the test matrix and presets to pass the preceding tests
| Actual Lifetime [days] | Required Lifetime [years] | Actual Drained [%] | Comment |
| 90 | 20.0 | 1.0 | Remaining lifetime as required |
And Input initializations for the test matrix and presets to pass the preceding tests
| Assembly Months before Now | Max Storage Months | Comment |
| -3.0 | 3.0 | Storage months in range |
And Input initializations for the test matrix and presets to pass the preceding tests
| Test Bench Fields | Test Bench State[4] | Comment |
| 5 | 21 | Test bench preadjustment succeeded |
And Input initializations for the test matrix and presets to pass the preceding tests
| Test Bench Fields | Test Bench State[5] | Comment |
| 6 | 30 | Test bench calibration succeeded |
And Input initializations for the test matrix and presets to pass the preceding tests
| Meter Calib Fact 1 | Meter Calib Fact 2 | Meter Calib Fact 3 | DB Calib Fact 1 | DB Calib Fact 2 | DB Calib Fact 3 | Comment |
| 10000 | 20000 | 30000 | 10000 | 20000 | 30000 | Valid calib factors |
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
And Input matrix defining the test cases and results
# "Kill x" forces the test to fail to check if all tests are executed. REMIND: Set only ONE to "X" and leave all others as "-"! Otherwise the test will FAIL!
| TestNo | Kill EOL | Kill Requ | Kill Order | Kill PcbId | Kill Region | Kill LUT | Kill Size | Kill FW | Kill Load | Kill LifeTime | Kill StoreTime | Kill PreAdj | Kill FlowTest | Kill Calib | Kill RadioParam | StatusReturn | Comment |
| 1 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | Okay | Test sequence complete |
| 2 | X | - | - | - | - | - | - | - | - | - | - | - | - | - | - | Failed | Detected kill EOL generation |
| 3 | - | X | - | - | - | - | - | - | - | - | - | - | - | - | - | Failed | Detected kill requirement |
| 4 | - | - | X | - | - | - | - | - | - | - | - | - | - | - | - | Failed | Detected kill production order check |
| 5 | - | - | - | X | - | - | - | - | - | - | - | - | - | - | - | Failed | Detected kill PcbId check |
| 6 | - | - | - | - | X | - | - | - | - | - | - | - | - | - | - | Failed | Detected kill region check |
| 7 | - | - | - | - | - | X | - | - | - | - | - | - | - | - | - | Failed | Detected kill LUT check |
| 8 | - | - | - | - | - | - | X | - | - | - | - | - | - | - | - | Failed | Detected kill meter size check |
| 9 | - | - | - | - | - | - | - | X | - | - | - | - | - | - | - | Failed | Detected kill FW check |
| 10 | - | - | - | - | - | - | - | - | X | - | - | - | - | - | - | Failed | Detected kill battery load check |
| 11 | - | - | - | - | - | - | - | - | - | X | - | - | - | - | - | Failed | Detected kill life time check |
| 12 | - | - | - | - | - | - | - | - | - | - | X | - | - | - | - | Failed | Detected kill storage time check |
| 13 | - | - | - | - | - | - | - | - | - | - | - | X | - | - | - | Failed | Detected kill preadjustment check |
| 14 | - | - | - | - | - | - | - | - | - | - | - | - | X | - | - | Failed | Detected kill flow test check |
| 15 | - | - | - | - | - | - | - | - | - | - | - | - | - | X | - | Failed | Detected kill calibrations check |
| 16 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | X | Failed | Detected kill radio parameter |
When Execute the generic tests
Then Check the generic test results
# ================================================================================================================================
@@ -18,21 +18,21 @@ namespace Xylem.Common.Production.ProductionUiCordonel
case "1":
var ProductionWindow = new ProductionWindow(
ProductionUiCordonel.Properties.Resources.StrEolSoftwareNameVersion,
"ProductionUiCordonel", new EolProcessStateDef());
"ProductionUiCordonel", new EolProcessStateDef(), false);
ProductionWindow.Show();
break;
case "2":
ProductionWindow = new ProductionWindow(
ProductionUiCordonel.Properties.Resources.StrPickingSoftwareNameVersion,
"PickingUiCordonel", new PickingProcessStateDef());
"PickingUiCordonel", new PickingProcessStateDef(), true);
ProductionWindow.Show();
break;
default:
ProductionWindow = new ProductionWindow(
ProductionUiCordonel.Properties.Resources.StrEolSoftwareNameVersion,
"ProductionUiCordonel", new EolProcessStateDef());
"ProductionUiCordonel", new EolProcessStateDef(), false);
ProductionWindow.Show();
break;
}
@@ -36,6 +36,15 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
productionProcessNo: null,
nextStateOnSuccess: ProcessState.Idle),
new ProcessStateStruct(
productionProcess: null,
processState: ProcessState.CheckNewMeter,
processInfo: Resources.StrProcessStateCheckNewMeter,
productionProcessNo: null,
nextStateOnSuccess: ProcessState.DetectCordonel,
errorExitState: ProcessState.ConnectCordonel,
startAlways: true),
new ProcessStateStruct(
productionProcess: new ErrorHandler(null),
processState: ProcessState.Error,
@@ -116,12 +125,20 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
select stateContainer.ProcessInfo).FirstOrDefault();
}
///<inheritdoc/>
public ProcessState GetStateOfFirstProcess()
{
return (from stateContainer in StateContainer
where stateContainer.ProductionProcessNo == 0
select stateContainer.ProcessState).FirstOrDefault();
}
///<inheritdoc/>
public ProcessState GetStateOfInfoText(String text)
{
return (from stateContainer in StateContainer
where stateContainer.ProcessInfo == text
select stateContainer.ProcessState).FirstOrDefault();
where stateContainer.ProcessInfo == text
select stateContainer.ProcessState).FirstOrDefault();
}
///<inheritdoc/>
@@ -158,10 +158,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
public CancellationToken CancellationToken { set; get; }
/// <inheritdoc/>
public event EventHandler<SingleProcessStateArgs> OnSingleProcessStateChanged;
public event EventHandler<SingleProcessStateArgs> OnProcessStateChanged;
///<inheritdoc/>
public event EventHandler<ProcessStateArgs> OnOverallProcessStateChanged;
public event EventHandler<ProcessStateArgs> OnForceStateMachineStateChange;
///<inheritdoc/>
public event EventHandler<ProcessLogArgs> OnProcessLogRequest;
@@ -191,7 +191,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
/// <summary>
/// Set overall process to 100 %
/// </summary>
protected void SetOverallProcessTo100Percent()
protected void SetProcessProgressTo100Percent()
{
OnProcessProgressChanged?.Invoke(this, new ProcessProgressArgs(Int32.MaxValue,
ProcessProgressArgs.ProcessProgressType.OverallProcessesSteps));
@@ -284,10 +284,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
/// <remarks date="2024-Nov-08" author="Thomas Wiedebusch">
/// - PreExecuteProcess.
/// </remarks>
private void SetSingleProcessStateAndFireEvent(Object sender, SingleProcessState state)
private void SetAndSignalProcessState(Object sender, SingleProcessState state)
{
SingleProcessState = state;
OnSingleProcessStateChanged?.Invoke(sender, new SingleProcessStateArgs(state));
OnProcessStateChanged?.Invoke(sender, new SingleProcessStateArgs(state));
}
/// <inheritdoc cref="IProductionProcess"/>
@@ -296,11 +296,11 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
{
if (Meter == null)
{
// first signal overall process state change because the single process state change uninstalls
// First signal to change the state machine because the single process state change uninstalls
// all events from process
OnOverallProcessStateChanged?.Invoke(this, new ProcessStateArgs(ProcessState.Error));
// set process state for this process and signal it to final controller
SetSingleProcessStateAndFireEvent(this, SingleProcessState.Error);
OnForceStateMachineStateChange?.Invoke(this, new ProcessStateArgs(ProcessState.Error));
// Set process state for this process and signal it to final controller
SetAndSignalProcessState(this, SingleProcessState.Error);
}
var userControl = (IUserControl)UserControl;
@@ -320,15 +320,15 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
/// <inheritdoc cref="IProductionProcess"/>
public virtual void InitProcess()
{
// set process state for this process and signal it to final controller
SetSingleProcessStateAndFireEvent(this, SingleProcessState.Waiting);
// Set process state for this process and signal it to final controller
SetAndSignalProcessState(this, SingleProcessState.Waiting);
}
/// <inheritdoc cref="IProductionProcess"/>
public virtual void IdleProcess()
{
// set process state for this process and signal it to final controller
SetSingleProcessStateAndFireEvent(this, SingleProcessState.Idle);
SetAndSignalProcessState(this, SingleProcessState.Idle);
}
/// <inheritdoc cref="IProductionProcess"/>
@@ -341,14 +341,14 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
public virtual void AbortProcess()
{
// set process state for this process and signal it to final controller
SetSingleProcessStateAndFireEvent(this, SingleProcessState.Abort);
SetAndSignalProcessState(this, SingleProcessState.Abort);
}
/// <inheritdoc cref="IProductionProcess"/>
public virtual void RetryProcess()
{
// set process state for this process and signal it to final controller
SetSingleProcessStateAndFireEvent(this, SingleProcessState.Retry);
SetAndSignalProcessState(this, SingleProcessState.Retry);
}
/// <inheritdoc cref="IProductionProcess"/>
@@ -380,7 +380,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
SingleProcessState != SingleProcessState.Idle)
{
// Signal state change to state machine
OnOverallProcessStateChanged?.Invoke(this, new ProcessStateArgs(successExitState));
OnForceStateMachineStateChange?.Invoke(this, new ProcessStateArgs(successExitState));
}
if (success == StatusReturn.Okay)
@@ -389,7 +389,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
SuccessMsgDispatcher($"{Resources.StrSuccessMsgProcess}: {ProcessName}");
// ATTENTION: This will uninstall all events for this process!
// set process state for this process and signal it to final controller
SetSingleProcessStateAndFireEvent(this, SingleProcessState.Succeeded);
SetAndSignalProcessState(this, SingleProcessState.Succeeded);
}
else if (success == StatusReturn.Skipped)
{
@@ -397,7 +397,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
SuccessMsgDispatcher($"{Resources.StrSkippedMsgProcess}: {ProcessName}");
// ATTENTION: This will uninstall all events for this process!
// set process state for this process and signal it to final controller
SetSingleProcessStateAndFireEvent(this, SingleProcessState.Skipped);
SetAndSignalProcessState(this, SingleProcessState.Skipped);
}
else
{
@@ -405,21 +405,21 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
WarningMsgDispatcher($"{Resources.StrWarningMsgProcess}: {ProcessName}");
// ATTENTION: This will uninstall all events for this process!
// set process state for this process and signal it to final controller
SetSingleProcessStateAndFireEvent(this, SingleProcessState.Warning);
SetAndSignalProcessState(this, SingleProcessState.Warning);
}
return;
}
// first signal overall process state change because the single process state change uninstalls
// all events from process, signal to process controller
OnOverallProcessStateChanged?.Invoke(this, new ProcessStateArgs(errorExitState));
// First signal to change the state machine because the single process state change uninstalls
// all events from process
OnForceStateMachineStateChange?.Invoke(this, new ProcessStateArgs(errorExitState));
// set message for error of process before uninstalling the events for this process
ErrorMsgDispatcher($"{Resources.StrErrorMsgProcess}: {ProcessName}");
// ATTENTION: This will uninstall all events for this process!
// set process state for this process and signal it to final controller
SetSingleProcessStateAndFireEvent(this, SingleProcessState.Error);
SetAndSignalProcessState(this, SingleProcessState.Error);
}
/// <summary>
@@ -491,7 +491,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
protected void SignalRunningState(Int32 maxActualProcessProgressSteps = 1)
{
// set process state for this process and signal it to final controller
SetSingleProcessStateAndFireEvent(this, SingleProcessState.Running);
SetAndSignalProcessState(this, SingleProcessState.Running);
// set the progress bar on GUI
MaxActualProcessProgress = maxActualProcessProgressSteps;
ActualProcessProgress = 0;
@@ -113,20 +113,6 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
productionProcessNo: 0,
nextStateOnSuccess: ProcessState.CheckNewMeter),
// Detection of Cordonel has to be completed before assigning next state. It has to be checked if
// the meter changed to clear all collected contents of previous run. To UPDATE ALL INFORMATION after
// new meter assignment the "DetectCordonel" has to be repeated to return here "Old Meter" and then
// enter the "ConnectCordonel"!
new ProcessStateStruct(
productionProcess: null,
processState: ProcessState.CheckNewMeter,
processInfo: Resources.StrProcessStateCheckNewMeter,
productionProcessNo: null,
// Repeat detect as a new meter has been connected
nextStateOnSuccess: ProcessState.DetectCordonel,
// Used to go ahead as new meter returns "false" meaning error state
errorExitState: ProcessState.ConnectCordonel),
// Precondition: - The detection process has to be completed as the PcbId is needed.
// AVOID to change the process state on completion as parallel process is active!
new ProcessStateStruct(
@@ -154,7 +154,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
ucDialog.SetDialogOptions(OptionList);
ActualProcessProgress = MaxActualProgressSteps;
SetOverallProcessTo100Percent();
SetProcessProgressTo100Percent();
while (_waitOnUserFeedback && SingleProcessState != SingleProcessState.Idle)
{
@@ -21,6 +21,16 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
/// </remarks>
ProcessStateStruct GetProcessStateStructOfState(ProcessState stateMachineState);
/// <summary>
/// Get the first production process state name to start the state machine with this.
/// It has to be a process labeled with ProductionProcessNo == 0.
/// </summary>
/// <returns>process attached to the state</returns>
/// <remarks date="2023-Feb-14" author="Thomas Wiedebusch">
/// - Initial
/// </remarks>
ProcessState GetStateOfFirstProcess();
/// <summary>
/// Get the process linked to state of state machine
/// </summary>
@@ -22,12 +22,12 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
/// <summary>
/// Event for process list change or state of single process step change from wait to execute to done or error
/// </summary>
event EventHandler<SingleProcessStateArgs> OnSingleProcessStateChanged;
event EventHandler<SingleProcessStateArgs> OnProcessStateChanged;
/// <summary>
/// Entire process changed status due to state change of process execution
/// </summary>
event EventHandler<ProcessStateArgs> OnOverallProcessStateChanged;
event EventHandler<ProcessStateArgs> OnForceStateMachineStateChange;
/// <summary>
/// Log event to log file and signal to GUI
@@ -110,42 +110,16 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
productionProcess: new DetectCordonel(Resources.StrStateDetectCordonel),
processState: ProcessState.DetectCordonel,
processInfo: Resources.StrStateDetectCordonel,
productionProcessNo: 0,
productionProcessNo: 1,
nextStateOnSuccess: ProcessState.CheckNewMeter),
// Detection of Cordonel has to be completed before assigning next state. It has to be checked if
// the meter changed to clear all collected contents of previous run. To UPDATE ALL INFORMATION after
// new meter assignment the "DetectCordonel" has to be repeated to return here "Old Meter" and then
// enter the "ConnectCordonel"!
new ProcessStateStruct(
productionProcess: null,
processState: ProcessState.CheckNewMeter,
processInfo: Resources.StrProcessStateCheckNewMeter,
productionProcessNo: null,
// Repeat detect as a new meter has been connected
nextStateOnSuccess: ProcessState.DetectCordonel,
// Used to go ahead as new meter returns "false" meaning error state
errorExitState: ProcessState.ConnectCordonel),
// Precondition: - The detection process has to be completed as the PcbId is needed.
// AVOID to change the process state on completion as parallel process is active!
new ProcessStateStruct(
productionProcess: new ConnectCordonel(Resources.StrStateConnectCordonel),
processState: ProcessState.ConnectCordonel,
processInfo: Resources.StrStateConnectCordonel,
productionProcessNo: 1,
// Avoid automatic change after completion as parallel process is active
nextStateOnSuccess: BaseProductionProcess.DoNotChangeStateAfterCompletion,
// Kick off parallel process execution
kickOffParallelState: ProcessState.GetSerialNumberAndRadioAddress),
// Precondition: - The detection process has to be completed as the PcbId is needed.
// AVOID to change the process state on completion as parallel process is active!
new ProcessStateStruct(
productionProcess: new GetSerialNumberAndRadioAddress(Resources.StrStateGetSerialAndRadioAddress),
processState: ProcessState.GetSerialNumberAndRadioAddress,
processInfo: Resources.StrStateGetSerialAndRadioAddress,
productionProcessNo: 2,
productionProcessNo: 2,
// Avoid automatic change after completion as parallel process is active
nextStateOnSuccess: BaseProductionProcess.DoNotChangeStateAfterCompletion,
// Kick off parallel process execution
@@ -159,8 +133,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
processState: ProcessState.GetProgrammingParameters,
processInfo: Resources.StrStateGetProgrammingParameters,
productionProcessNo: 3,
nextStateOnSuccess: ProcessState.CheckOrderNumber,
// Wait until this process has been successfully completed
nextStateOnSuccess: ProcessState.CheckProductionState,
// Wait before starting this process until this process has been successfully completed
waitForSingleProcess: ProcessState.ConnectCordonel),
#endregion -------------------------------- GENERIC-STATES --------------------------------------------
@@ -170,8 +144,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
productionProcess: new CheckOrderNumber(Resources.StrStateCheckOrderNumber),
processState: ProcessState.CheckOrderNumber,
processInfo: Resources.StrStateCheckOrderNumber,
productionProcessNo: 4,
nextStateOnSuccess: ProcessState.CheckProductionState),
productionProcessNo: 0,
nextStateOnSuccess: ProcessState.DetectCordonel),
// Precondition: - The connection process has to be completed as a readout of some register
// values from the Cordonel are needed to check the update capability:
@@ -180,8 +154,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
productionProcess: new CheckProductionState(Resources.StrStateCheckProductionState),
processState: ProcessState.CheckProductionState,
processInfo: Resources.StrStateCheckProductionState,
productionProcessNo: 5,
nextStateOnSuccess: ProcessState.Idle),
productionProcessNo: 4,
nextStateOnSuccess: ProcessState.Idle,
// Wait before starting this process until this process has been successfully completed
waitForSingleProcess: ProcessState.GetProgrammingParameters),
//TODO Roland: implement your states here
#endregion -------------------------------- PICKING-STATES --------------------------------------------
@@ -32,7 +32,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
// state of the state machine
private ProcessState _stateMachineState;
// locker to avoid repeated state execution
private ProcessState _lockedProcessState;
private ProcessState _lockedStateMachineState;
// sender of state change event to evaluate in e.g. error process
private IProductionProcess _stateChangeRequestProcess;
// List of production processes
@@ -65,7 +65,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
/// <summary>
/// Change the overview table of the GUI to the state of the individual process
/// </summary>
public event EventHandler<SingleProcessStateArgs> OnSingleProcessStateChanged;
public event EventHandler<SingleProcessStateArgs> OnProcessStateChanged;
/// <summary>
/// The overall process chain changed needed to signal to the GUI
@@ -73,7 +73,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
/// - Will be used via the OverallProcessStateChanged_Handler by the individual processes to return the next
/// required sate after break, error or completion to change the state of the state machine.
/// </summary>
public event EventHandler<ProcessStateArgs> OnOverallProcessStateChanged;
public event EventHandler<ProcessStateArgs> OnStateMachineStateChanged;
/// <summary>
/// Request for logging to GUI output and log-file
@@ -158,7 +158,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
_meterBatch = new MeterBatch();
_meterBatch.AddMeter(_genesisMeter);
// Set lock process to unreachable state delimiter to force initial entry of state machine
_lockedProcessState = ProcessState.StateListDelimiter;
_lockedStateMachineState = ProcessState.StateListDelimiter;
// Create a register restorer
_registerRestorer = new RegisterRestorer(_genesisMeter);
_radioEncryptionKey = new List<String>();
@@ -221,7 +221,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
/// <remarks date="2023-Jul-17" author="Thomas Wiedebusch">
/// - Remove process events if process is finished or skipped.
/// </remarks>
private void SingleProcessStateChanged_Handler(Object sender, SingleProcessStateArgs e)
private void ProcessStateChanged_Handler(Object sender, SingleProcessStateArgs e)
{
IProductionProcess pp = null;
if (sender is IProductionProcess process)
@@ -246,7 +246,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
break;
}
// signal state change to GUI
OnSingleProcessStateChanged?.Invoke(sender, e);
OnProcessStateChanged?.Invoke(sender, e);
}
private void ProcessProgress_Handler(Object sender, ProcessProgressArgs e)
@@ -266,7 +266,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
/// <remarks date="2023-Mar-03" author="Thomas Wiedebusch">
/// - Initial
/// </remarks>
private void OverallProcessStateChanged_Handler(Object sender, ProcessStateArgs e)
private void ForceStateMachineStateChange_Handler(Object sender, ProcessStateArgs e)
{
// remind caller of the state change request to act on e.g. error processing
_stateChangeRequestProcess = (IProductionProcess)sender;
@@ -308,7 +308,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
/// </remarks>
private void StateMachine()
{// avoid repeated execution of the state machine on unchanged state
if (_stateMachineState == _lockedProcessState)
if (_stateMachineState == _lockedStateMachineState)
{
Thread.Sleep(ProcessTimerCycleMs >> 1);
}
@@ -316,52 +316,58 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
{
try
{
// remind backup state to avoid repeated execution and side effects
_lockedProcessState = _stateMachineState;
// ATTENTION: Has to be the very first step here!
// Remind backup state to avoid repeated execution and side effects
_lockedStateMachineState = _stateMachineState;
// signal overall process progress to GUI based on ready processes
// Signal overall process progress to GUI based on ready processes
CalcAndPushOverAllProgress();
// signal state change to logger
OnOverallProcessStateChanged?.Invoke(this, new ProcessStateArgs(_stateMachineState));
// Signal state change to logger
OnStateMachineStateChanged?.Invoke(this, new ProcessStateArgs(_stateMachineState));
// get the processStateStruct of the actual set stateMachineSTate
// Check if state is the first in the list of production processes to reset cancellationToken
var startProcessState = _processStateDef.GetStateOfFirstProcess();
if (startProcessState == _stateMachineState)
{
// This state needs an external state change like user input to go ahead
// Remove cancellation token if idle reached for clean start
if (_cancellationToken.IsCancellationRequested)
{
// Reset the cancellation request
_cancellationTokenSource?.Dispose();
_cancellationTokenSource = new CancellationTokenSource();
_cancellationToken = _cancellationTokenSource.Token;
}
// Set up the counter for maximum overall process progress bar in GUI
CalcAndPushMaxOverAllProcessSteps();
}
// Get the processStateStruct of this new required stateMachineState
var processStateStruct = _processStateDef.GetProcessStateStructOfState(_stateMachineState);
switch (_stateMachineState)
switch (_stateMachineState)
{
case ProcessState.Idle:
// This state needs an external state change like user input to go ahead
break;
case ProcessState.DetectCordonel:
// Wait for cancellation
if (_cancellationToken.IsCancellationRequested)
{
Thread.Sleep(500);
// Reset the cancellation request
_cancellationTokenSource?.Dispose();
_cancellationTokenSource = new CancellationTokenSource();
_cancellationToken = _cancellationTokenSource.Token;
}
// Set up the counter for maximum overall process progress bar in GUI
CalcAndPushMaxOverAllProcessSteps();
// Detection of Cordonel has to be completed before assigning next state, so leave to automatic
// to change the state after successfully execution. The detection is the base for all others.
StartProcess(processStateStruct);
break;
break;
case ProcessState.CheckNewMeter:
// Detection of Cordonel has to be completed before assigning next state. It has to be checked if
// the meter changed to clear all collected contents of previous run. To UPDATE ALL INFORMATION after
// new meter assignment the "DetectCordonel" has to be repeated to return here "Old Meter" and then
// enter the "ConnectCordonel"!
_stateMachineState = CheckForNewMeter() ? ProcessState.DetectCordonel : ProcessState.ConnectCordonel;
if (processStateStruct.NextStateOnSuccess != null)
{
_stateMachineState = CheckForNewMeter() ? (ProcessState)processStateStruct.NextStateOnSuccess :
processStateStruct.ErrorExitState;
}
else
{
_stateMachineState = ProcessState.Error;
}
break;
case ProcessState.RepeatFailedTests:
_stateMachineState = RepeatFailedTests();
break;
@@ -388,7 +394,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
case ProcessState.StateListDelimiter:
_stateMachineState = ProcessState.Idle;
break;
default:
// This is the call to the processes for a specific test
StartProcess(processStateStruct);
@@ -397,7 +403,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
_stateMachineState = (ProcessState)processStateStruct.KickOffParallelState;
}
break;
}
}
}
catch (ThreadAbortException ex)
{
@@ -603,15 +609,15 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
if (Processes == null)
Processes = new List<IProductionProcess>();
// get all processes relevant for EOL from table which has to be sorted
// Get all processes relevant for EOL from table which has to be sorted
var processes = _processStateDef.GetAllProductionProcesses();
foreach (var process in processes)
{
// process is standby for execution after idle, this overrides the eventually abort state
// Process is standby for execution after idle, this overrides the eventually abort state
process.IdleProcess();
// add process to list to feed the process window in main screen
// Add process to list to feed the process window in main screen
if (Processes.All(pp => pp.ProcessName != process.ProcessName))
{
Processes.Add(process);
@@ -631,7 +637,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
/// - Starts process.
/// </summary>
/// <param name="processStateStruct"></param>
/// <returns>actual state</returns>
/// <returns>actual state</returns>
/// <remarks date="2023-Jan-31" author="Thomas Wiedebusch">
/// - Initial
/// </remarks>
@@ -658,9 +664,9 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
// deny access if uninitialized
if (Processes == null || processStateStruct.ProductionProcess == null)
return;
// do not start a new process if any error or abort request is signaled
if (AnyProcessRequiresAbortion() && !processStateStruct.StartAlways )
if (AnyProcessRequiresAbortion() && !processStateStruct.StartAlways)
{
return;
}
@@ -672,8 +678,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
if (processStateStruct.WaitForSingleProcess != null)
{
// each process will have its own timer until a timeout will change the state
while (Processes.Any(pp => !AnyProcessRequiresAbortion()
&& _processStateDef.GetStateOfProcess(pp) == processStateStruct.WaitForSingleProcess
while (Processes.Any(pp => !AnyProcessRequiresAbortion()
&& _processStateDef.GetStateOfProcess(pp) == processStateStruct.WaitForSingleProcess
&& WaitForProcess(pp)))
{
Thread.Sleep(50);
@@ -694,7 +700,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
}
// if any process exits meanwhile with an error or abort request avoid a start of this process
if (( !processStateStruct.StartAlways && AnyProcessRequiresAbortion())
if ((!processStateStruct.StartAlways && AnyProcessRequiresAbortion())
|| processStateStruct.ProductionProcess.SingleProcessState == SingleProcessState.Idle
|| processStateStruct.ProductionProcess.SingleProcessState == SingleProcessState.Abort)
{
@@ -713,7 +719,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
processStateStruct.ProductionProcess.CancellationToken = _cancellationToken;
// kick off process execution, the breakExitState will not be used
processStateStruct.ProductionProcess.StartProcess(processStateStruct.NextStateOnSuccess,
processStateStruct.ProductionProcess.StartProcess(processStateStruct.NextStateOnSuccess,
processStateStruct.ErrorExitState, processStateStruct.BreakExitState);
// connect process events to actual process
AddProcessEvents(processStateStruct.ProductionProcess);
@@ -753,8 +759,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
process.OnProcessProgressChanged += ProcessProgress_Handler;
process.OnProcessLogRequest += ProcessLog_Handler;
process.OnSingleProcessStateChanged += SingleProcessStateChanged_Handler;
process.OnOverallProcessStateChanged += OverallProcessStateChanged_Handler;
process.OnProcessStateChanged += ProcessStateChanged_Handler;
process.OnForceStateMachineStateChange += ForceStateMachineStateChange_Handler;
}
/// <summary>
@@ -768,8 +774,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
process.OnProcessProgressChanged -= ProcessProgress_Handler;
process.OnProcessLogRequest -= ProcessLog_Handler;
process.OnSingleProcessStateChanged -= SingleProcessStateChanged_Handler;
process.OnOverallProcessStateChanged -= OverallProcessStateChanged_Handler;
process.OnProcessStateChanged -= ProcessStateChanged_Handler;
process.OnForceStateMachineStateChange -= ForceStateMachineStateChange_Handler;
}
/// <summary>
@@ -779,7 +785,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
/// <remarks date="2023-Jan-17" author="Thomas Wiedebusch">
/// - Initial
/// </remarks>
private ProcessState GetProcessState()
public ProcessState GetProcessState()
{
return _stateMachineState;
}
@@ -802,6 +808,19 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
return false;
}
/// <summary>
/// Forces the state machine to start the first production process
/// </summary>
/// <returns>true, if process state is set</returns>
/// <remarks date="2025-Jun-30" author="Thomas Wiedebusch">
/// - Initial
/// </remarks>
public Boolean StartFirstProcess()
{
var newProcessState = _processStateDef.GetStateOfFirstProcess();
return SetProcessState(newProcessState);
}
/// <summary>
/// Remove all processes from the <see cref="Processes"/> list:
/// - Signal change to GUI,
@@ -443,6 +443,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Docu\ProductionUiCordonel.qea" />
<None Include="Docu\TBF_COM_ASMBLY_SRSe.docx" />
<None Include="Docu\TBF_COM_EOL.pptx" />
<None Include="Docu\TBF_COM_EOLd.pptx" />
<None Include="Docu\TBF_COM_EOLe.pptx" />
@@ -62,13 +62,34 @@ namespace Xylem.Common.Production.ProductionUiCordonel
private CordonelRequirements _productionRequirements;
private UserAccessWindow _userAccessWindow;
private readonly IProcessStateDef _processStateDef;
private readonly Boolean _autoStartFirstProductionProcess;
#endregion
public ProductionWindow(String softwareName, String projectName, IProcessStateDef processStateDef)
/// <summary>
/// Ctor
/// </summary>
/// <param name="softwareName"></param>
/// <param name="projectName">take the identical window for different software, this is name displayed
/// in the header</param>
/// <param name="processStateDef">table for state definitions for the specific program which feeds the
/// state machine</param>
/// <param name="autoStartFirstProductionProcess">starts the state machine with the first production process
/// defined in the processStateDef with productionProcessNo == 0</param>
/// <remarks date="????" author="Roland Drabesch">
/// - Initial
/// </remarks>
/// <remarks date="2024-Jul-15" author="Thomas Wiedebusch">
/// - Additional info of Cordonel.
/// </remarks>
/// <remarks date="2025-Jul-01" author="Thomas Wiedebusch">
/// - Auto start.
/// </remarks>
public ProductionWindow(String softwareName, String projectName, IProcessStateDef processStateDef,
Boolean autoStartFirstProductionProcess)
{
_logger = NLogHelper.CreateOrGetLogger(projectName);
_processStateDef = processStateDef;
_autoStartFirstProductionProcess = autoStartFirstProductionProcess;
String msg;
try
{
@@ -118,9 +139,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel
// buttons
UpdateContentControl(btnStart, Properties.Resources.StrBtnStart);
UpdateContentControl(btnStop, Properties.Resources.StrBtnStop);
InitializeFormState();
}
private ApplicationSettings Settings
@@ -193,10 +213,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel
}
//install the process changed event handler for single processes
_processCtrl.OnSingleProcessStateChanged += SingleProcessStateChanged_Handler;
_processCtrl.OnProcessStateChanged += ProcessStateChanged_Handler;
_processCtrl.OnProcessLogRequest += ProcessLog_Handler;
_processCtrl.OnProcessProgressChanged += ProcessProgress_Handler;
_processCtrl.OnOverallProcessStateChanged += ProcessStateChange_Handler;
_processCtrl.OnStateMachineStateChanged += StateMachineStateChanged_Handler;
_timer = new DispatcherTimer();
_timer.Tick += TmrProgressUpdate_Tick;
@@ -208,10 +228,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel
private void Window_Closing(Object sender, CancelEventArgs e)
{
_userAccessWindow?.Close();
_processCtrl.OnSingleProcessStateChanged -= SingleProcessStateChanged_Handler;
_processCtrl.OnProcessStateChanged -= ProcessStateChanged_Handler;
_processCtrl.OnProcessLogRequest -= ProcessLog_Handler;
_processCtrl.OnProcessProgressChanged -= ProcessProgress_Handler;
_processCtrl.OnOverallProcessStateChanged -= ProcessStateChange_Handler;
_processCtrl.OnStateMachineStateChanged -= StateMachineStateChanged_Handler;
_userAccessWindow = null;
_processCtrl.Dispose();
@@ -233,7 +253,19 @@ namespace Xylem.Common.Production.ProductionUiCordonel
cbxSlotBox.SelectedValue = Settings.Slot;
}
}
/// <summary>
/// Enable/disable the controls
/// </summary>
/// <remarks date="????" author="Roland Drabesch">
/// - Initial
/// </remarks>
/// <remarks date="2024-Jul-15" author="Thomas Wiedebusch">
/// - Additional info of Cordonel.
/// </remarks>
/// <remarks date="2025-Jul-01" author="Thomas Wiedebusch">
/// - Auto start.
/// </remarks>
private void InitializeFormState()
{
if (Software.IsRegistrationPending)
@@ -248,12 +280,19 @@ namespace Xylem.Common.Production.ProductionUiCordonel
UiElmEnable(optionsMenuChangePassword, Software.IsAutenticated);
UiElmEnable(optionsMenuLogout, Software.IsAutenticated);
UiElmEnable(optionsMenuLogin, !Software.IsAutenticated);
UiElmEnable(btnStart, Software.IsAutenticated);
// Hide the [Start] button if autostart enabled
UiElmEnable(btnStart, Software.IsAutenticated, !_autoStartFirstProductionProcess);
UiElmEnable(btnStop, false);
UpdateContentControl(lblOperator,
Software.IsAutenticated
UpdateContentControl(lblOperator, Software.IsAutenticated
? $"{Properties.Resources.StrLblOperatorNameText}: {Software.UserName}"
: $"{Properties.Resources.StrLblOperatorNameText}: ?");
// Start first production process if required, user is authenticated and state machine is idle
if (_autoStartFirstProductionProcess &&
Software.IsAutenticated &&
ProcessState.Idle == _processCtrl?.GetProcessState())
{
BtnStart_Click(this, null);
}
}
}
@@ -384,7 +423,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel
/// <remarks date="2025-Apr-10" author="Thomas Wiedebusch">
/// - Extended.
/// </remarks>
private void ProcessStateChange_Handler(Object sender, ProcessStateArgs e)
/// <remarks date="2025-Jun-30" author="Thomas Wiedebusch">
/// - Automatic start on idle if required.
/// </remarks>
private void StateMachineStateChanged_Handler(Object sender, ProcessStateArgs e)
{
_logger.Debug($"Slot:{Slot} - Final test state: {e.State}");
@@ -396,26 +438,32 @@ namespace Xylem.Common.Production.ProductionUiCordonel
ProcessProgressArgs.ProcessProgressType.OverallProcessesSteps));
ProcessProgress_Handler(this, new ProcessProgressArgs(0,
ProcessProgressArgs.ProcessProgressType.ActualProcessSteps));
// Start first production process if required and user is authenticated
if (_autoStartFirstProductionProcess && Software.IsAutenticated)
{
BtnStart_Click(this, null);
}
}
// Stop all procedures
if (e.State == ProcessState.Stop)
{
_timer?.Stop();
UiElmEnable(btnStart, true);
UiElmEnable(btnStart, true, !_autoStartFirstProductionProcess);
UiElmEnable(btnStop, false);
// update progress bars
ProcessProgress_Handler(this, new ProcessProgressArgs(0,
ProcessProgressArgs.ProcessProgressType.OverallProcessesSteps));
ProcessProgress_Handler(this, new ProcessProgressArgs(0,
ProcessProgressArgs.ProcessProgressType.ActualProcessSteps));
// remove user control
SetNewUserControl(null);
}
// Repeat failed tests
if (e.State == ProcessState.RepeatFailedTests)
{
UiElmEnable(btnStart, false);
UiElmEnable(btnStart, false, !_autoStartFirstProductionProcess);
UiElmEnable(btnStop, true);
ProcessProgress_Handler(this, new ProcessProgressArgs(0,
ProcessProgressArgs.ProcessProgressType.ActualProcessSteps));
_timer?.Start();
}
// Stop time for manual operation and visual inspection as this is not part of the configuration
@@ -427,7 +475,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel
if (e.State == ProcessState.PrepareShippingMode)
{
_timer?.Stop();
UiElmEnable(btnStart, false);
UiElmEnable(btnStart, false, !_autoStartFirstProductionProcess);
UiElmEnable(btnStop, false);
}
// Ready for shipping
@@ -454,6 +502,11 @@ namespace Xylem.Common.Production.ProductionUiCordonel
{
_lockGenesisInfo = false;
}
// Enable timer with first automatic process
if (e.State == ProcessState.DetectCordonel)
{
_timer?.Start();
}
}
/// <summary>
@@ -670,7 +723,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel
/// <remarks date="2024-08-28" author="Thomas Wiedebusch">
/// - Activate new user control on start of process.
/// </remarks>
private void SingleProcessStateChanged_Handler(Object sender, SingleProcessStateArgs e)
private void ProcessStateChanged_Handler(Object sender, SingleProcessStateArgs e)
{
if (sender is IProductionProcess productionProcess)
{
@@ -731,7 +784,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel
!string.IsNullOrEmpty(genesisMeter.MeterSize) ? genesisMeter.MeterSize : "?");
UpdateContentControl(lblMeterLengthValue,
!string.IsNullOrEmpty(genesisMeter.MeterLength) ? genesisMeter.MeterLength + " mm": "?");
(!string.IsNullOrEmpty(genesisMeter.MeterLength) && !genesisMeter.MeterLength.Equals("?")) ?
genesisMeter.MeterLength + " mm": "?");
UpdateContentControl(lblLutValue,
!string.IsNullOrEmpty(genesisMeter.LutCrc) ? genesisMeter.LutCrc : "?");
@@ -807,7 +861,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel
private void BtnStart_Click(Object sender, RoutedEventArgs e)
{
UiElmEnable(btnStart, false);
UiElmEnable(btnStart, false, !_autoStartFirstProductionProcess);
UiElmEnable(btnStop, true);
_startTime = DateTimeOffset.UtcNow;
@@ -815,9 +869,12 @@ namespace Xylem.Common.Production.ProductionUiCordonel
// Avoid display of genesis info before the detect new meter has been executed
_lockGenesisInfo = true;
// remove last userControl
dpSubProcess.Children.Clear();
rtbLog.Document.Blocks.Clear();
rtbLog.Dispatcher.Invoke(DispatcherPriority.Normal,
new Action(() =>
{
rtbLog.Document.Blocks.Clear();
}
));
// clear all visual fields as it may be a new pcbId
UpdateContentControl(lblOrderNumberValue, "?");
@@ -830,8 +887,9 @@ namespace Xylem.Common.Production.ProductionUiCordonel
UpdateContentControl(lblSerialNumberValue, "?");
UpdateContentControl(lblRegionValue, "?");
UpdateUi(lblPcbIdValue, "?");
UpdateUi(lblApprovalText, "", Brushes.Black);
_processCtrl?.SetProcessState(ProcessState.DetectCordonel);
_processCtrl?.StartFirstProcess();
}
private void PrintErrorNote()
@@ -1627,7 +1627,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties {
}
/// <summary>
/// Looks up a localized string similar to Check production state.
/// Looks up a localized string similar to Check production rules.
/// </summary>
internal static string StrStateCheckProductionState {
get {
@@ -236,7 +236,7 @@
<value>Deckelseriennummer einscannen</value>
</data>
<data name="StrStateCheckProductionState" xml:space="preserve">
<value>Versandvorbedingungen überprüfen</value>
<value>Produktionsbedingungen überprüfen</value>
</data>
<data name="StrStateConnectCordonel" xml:space="preserve">
<value>Cordonel verbinden</value>
@@ -236,7 +236,7 @@
<value>Scan and check housing serial number</value>
</data>
<data name="StrStateCheckProductionState" xml:space="preserve">
<value>Check production state</value>
<value>Check production rules</value>
</data>
<data name="StrStateConnectCordonel" xml:space="preserve">
<value>Connect Cordonel</value>