Feature/add awaiting assertion capability#179
Feature/add awaiting assertion capability#179Navid-Mashayekh wants to merge 9 commits intotcunit:masterfrom
Conversation
|
Hi, Great PR, but have you considered using CASE OF constructs in these type of scenario's? With Kind regards Haico |
Hey @HAHermsen Could you please be more clear about using CASE OF, I did understand your scenario! I added this feature to be able to halt for a desired time until my FB generates the correct output. Imagine the scenario where you have FB to control a reservoir and you generate an Alarm by a HH floater, but normally due to water ripples you may put a TON of 2 or 3 seconds before generating the alarm. so to test this FB now all you need to do is put AWAITING_ASSERTIONS ( T#4S ) before your assertions in test method. |
As you know in PLC world it is very common that we have function blocks which react to some inputs after some delay.
To be able to test these FBs usually we need to use another TON in the test suite, pass the reference of it to the test method and pend the assertions and finish to this timer. Most PLC programs are full of TONs and TOFs and doing this procedure for every test
is quite time consuming!
In this update a function called "AWAIT_ASSERTIONS( AwaitTime : TIME ) is added to be used before writing assertions in test methods.