FTA: Sometimes, for the most general tests, the only invariant you can assert is that the program doesn't crash. One of the most valuable tests we ever wrote at Row Zero is the one that just takes the top-level spreadsheet interface, and takes completely random actions on it<p>That strategy was also part of testing the original Mac. See <a href="https://www.folklore.org/Monkey_Lives.html" rel="nofollow">https://www.folklore.org/Monkey_Lives.html</a>.<p>As that article hunts at (“usually it didn't run for more than 20 minutes, even if it didn't crash, because the Monkey would invariably select the quit command”), there’s a black art in determining what “completely random” means.<p>You probably want the ability to change that depending on your testing needs. For example, if you’ve been working on the code for array formulas, the randomizer better create and edit them fairly frequently.