Hi all,
Hopefully, I categorized this correctly. I have been using for some time adv3lite/tads3 for making simple games for the family. (And thanks to Eric Eve for his hard work on getting that done plus making it easy to pick it up by THOROUGHLY documenting it.) But I have one small beef: writing tests (using the class Test), while a good idea, do not work well or work at all when you daisy-chain them. Rather than discuss all of the limitations, the purpose of this new class is to test that a sequences of operations in your game code result in the expected outcomes by programmatically testing those outcomes are correct (including displayed text). As your game evolves, you can check you did not break something else automatically.
- Builds off of Test that allowed one to purloin objects and gonear the room to start each test, followed by a list of commands.
- Each test can now be independent of each other with flags for resetting the game state back to when the test started or even restarting the game before the test executes; especially useful with Tests spread across multiple files.
- Offers a number of assertions (in the list of commands) that must pass or the assert fails and then the test fails with a message, including a variation that allows you to confirm that a given phrase appeared on the console after the previous command(s) was/were executed.
- Run all tests with the ability to stop on first failing test or run through all of them and give a summary of results (# of tests, # of assertions, # of assertions that failed).
If anyone thinks this would be helpful, I just need to know where to upload this small tads file along with its short doc.