Action Unit in details

Documentation

Details

Action Unit is an action which performs a change when the test is running. There are seven types of predefined actions. All Action Units can be configured individually, and they all have a general config section. The general config includes Name and Description text fields and Enable switch. The rest of the config is unique per Action Unit.

Action Units run one at the time except Heartbeat. Heartbeat action is set once and run entire test or during defined number of seconds.

Name - keep it simple and short. It will appear in the test results.

Description - (optional) describe the test action. It hidden by default. Click more button in the name field to display it. The description won't appear in the test results.

Execution options - additional options on the action units.

Enabled/Disabled switch - if disabled the action will not be executed during the test. However it will appear in the test result as a disabled unit.

Criticality option lets setting an action on failure of the action unit. There are three options: non critical, set critical, and project critical. If Action Unit failed with non critical option (default option) then it continues the execution the following action units as normal. An Action Unit failure with set critical option interrupts execution of current Action Set and continues with the following one. A failure with project critical option terminates the test project execution completely. A corresponding message is being logged in the results and in Output Log.

Set Values

1 [plus icon] - add more tags to config to set.

2 [bin icon] - remove tags from the config.

3 [SINT, INT, DINT or BIT N] - for SINT, INT or DINT datatypes values can be set by its bits.

Set Values action is designed to set values in tested PLC program.

Execution process:

  1. Check the action config is set correctly
  2. Write Set to value into PLC, or
  3. If value set by its bit, then it reads from PLC, sets the bit and write back to PLC
  • The unit FAILs if even one tag cannot be written to PLC

Check Values

1 [plus icon] - add more tags to config to set.

2 [bin icon] - remove tags from the config.

3 [SINT, INT, DINT or BIT N] - for SINT, INT or DINT datatypes values can be set by its bits.

Check Values action is designed to check values in tested PLC program.

Execution process:

  1. Check the action config is set correctly
  2. Read the value from PLC
  3. Compare the values agains To be checked to
  • The unit FAILs if even only one of the tag values not equal to value from To be checked to field

Reset Value

1 [plus icon] - add more tags to config to set.

2 [bin icon] - remove tags from the config.

3 [SINT, INT, DINT or BIT N] - for SINT, INT or DINT datatypes values can be set by its bits.

Hold for, sec - determines how long before Toggle To value will be reset to the initial value.

Reset Values action is designed to set tag values in tested PLC program to defined value and reset them to previous values after defined time.

Used to emulate humans interaction, e.g. pressing buttons.

Execution process:

  1. Check the action config is set correctly
  2. Read and remember the value from PLC
  3. Write PLC value to Toggle To value
  4. Wait for number of seconds defined by Hold for, sec
  5. Write previous PLC value before changes to Toggle To value
  • The unit FAILs if even one tag cannot be written to PLC

Heartbeat

1 [plus icon] - add more tags to config to set.

2 [bin icon] - remove tags from the config.

Tag name datatype can be any datatype.

Each, sec - determines how long before To Value will be changed From value and vice versa.

Heartbeat action is designed to generate a pulsing tag in tested PLC program. The pulsing tag can be terminated after set number of seconds (Duration, s) or could be pulsing entire test if set to 0.

Execution process:

  1. Check the action config is set correctly
  2. Write PLC value to To value
  3. Wait for number of seconds defined by Each, sec
  4. Write PLC value to From value
  5. Wait for number of seconds defined by Each, sec
  6. Repeats steps 2 to 5 for defined number of seconds or for the entire test
  • The unit FAILs if even one tag cannot be written to PLC

Unit test

1 [plus icon] - add more tags to config to set.

2 [bin icon] - remove tags from the config.

Post execution parameters and Toggle Reset(s) are optional.

Unit Test action is designed to set values in selected tags and wait for expected result.

Execution process:

  1. Start listening for change in tags defined in Expected output change:
    • Set tag values as per Define input actions
    • Monitor unexpected changes from list of tags defined in Monitor for no change
    • Compare tag value from PLC with Expected to be after period defined in After, sec
  2. Wait till all Expected output change conditions PASS (or any of them FAIL).
  3. Reset Define input actions values to values prior the Unit Test.
  4. (optional) If all PASSed then Toggle Reset(s) bits and values.

Test unit FAILs if:

  • Expected output change changed earlier than set in After, sec (no tolerance)
  • Expected output change changed later than set in After, sec with tolerance in 100ms.
  • During the unit test a change detected in tags from Monitor for no change
  • Cannot write or read even one of the tags in the unit test config

Power Nap

Power Nap action is designed to pause the testing process for defined number of seconds.

Runner Log

Runner Log action is designed to log a message to test result output log during execution of Test Runner.