The examples in the tutorial show how to build up a suite definition using the python api.However the suite definition describes the static structure, its not until the definition is loaded in the server, that we see its dynamic behaviour.
The With ecflow python api allows , the simulation of the dynamic behaviour of the suite can be simulated, ( i.e. in the same manner as the server).
...
The simulation relies on you adding simple verification attributes. (This is similar to c/c++/python asserts). These can be added on a task, family and suite nodes.(see below for an example)
There are however restrictions. If the definition has large loops due to, crons or Repeat date attributes, which run indefinitely, then in this case the simulation will never complete, and will timeout after a years worth of run time.
...
Code Block | ||||
---|---|---|---|---|
| ||||
suite year # use real clock otherwise the date wont change clock real 1.1.2017 # define a start date for deterministic simulation endclock 1.1.2018 # When to finish. A endclock is *ONLY* for use with the simulator. family cronFamily task t cron -d 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 -m 1,2,3,4,5,6,7,8,9,10,11,12 10:00 # run every day at 10am for a year verify complete:365 # verify that this task completes 365 times endfamily endsuite suite leap_year # use real clock otherwise the date wont change clock real 1.1.2016 # define a start date for deterministic simulation endclock 1.1.2017 # When to finish. A endclock is *ONLY* for use with the simulator. family cronFamily task t cron -d 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 -m 1,2,3,4,5,6,7,8,9,10,11,12 10:00 # run every day at 10am for a year verify complete:366 # verify that this task completes 366 times in a leap year endfamily endsuite |
...