Expanding the set of bmi-tester properties

Last term I started taking a look at the bmi-tester, which is really neat. I really like the idea of being able to go further than the syntactic interface of a BMI model and probe its semantics; essentially bmi-tester implements a behaviour specification for BMI-implementing models.

Given that BMI models are potentially stateful, via input and output variables, I thought that it would make sense to extend the behaviour specification with testing of the ‘get’/‘set’ behaviour. i.e., that if you ‘set’ then you can ‘get’ the same value back, and if you ‘set’ a value twice you get the same behaviour as just setting it once, i.e., there is not ‘extra side effects’ going on with setting a variable. I codified this idea in a PR here: Extending testing of set_value and get_value by dorchard · Pull Request #46 · csdms/bmi-tester · GitHub I would be interested to hear if people agree that this should hold for all models.

This could be extended to work over get-value-at-indices and set-value-at-indices too if the overall idea makes sense.

I also made some other PRs around the way time works. Following a discussion on the GitHub, pre this forum, I made a couple of PRs:

There are a few other potential properties I can think of as well. Is there appetite for extending the bmi-tester in general?

2 Likes

I use the bmi-tester all the time, so anything we can do to enhance or extend it would be useful to me.

1 Like

Great! Do you think checking the get-set properties then would be something useful to add (along the lines of my PR)?