-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add awaiting assertion capability #179
base: master
Are you sure you want to change the base?
Feature/add awaiting assertion capability #179
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.