Any automatic testing tools for weidu mods?
polymorphedsquirrel
Member Posts: 114
I probably risk ridicule, but is there some sort of simple framework which I could point to test installations
of IE games as well as some tp2 scripts containing test cases which test created mod's functions?
of IE games as well as some tp2 scripts containing test cases which test created mod's functions?
1
Comments
The typical test case after tested mod receive update of any kind (well, maybe except README changes):
1. Copy mod files into desired game (or all supported games)
2. Install all components
3. Report errors/warring's
4. Uninstall mod/restore game from full backup in order to be sure that we are dealing with clean, unmodified game
Is that which you are aiming for? There are none, indeed. But it's an open field to explore: there are some programs which let you send inputs to button and mouse so you can write 'input data' which for eg: move Player1, open the door, enter area and initiate talk.
This wouldn't do much for dynamic content such as NPC romances, AI etc., but for mods tinkering with various game data and parameters (various tables, new kits etc.) it would be quite easy to simply check that the modifications where applied correctly and, especially in cases where the mod allows the user large customization possiblities, would be quite a boon. Of course, weidu doesn't support any kind of meta-language or reflection which would make a non-invasive framework possible, but if the code conformed to a predefined format/contained meta annotations on components, it should be possible to generate a series of 'test suite mods': extract each component into a macro generating a tph lib file for the original tp2, then for every allowed combination of components generate a new tp2 applying the corresponding macros followed by matched external verification functions, run them all in a batch through weidu and generate reports.
It seems fairly straightforward, but there are quite a few details requiring addressing like hooks allowing injection of user input to READLN, API for generating configuration files, API for parsing logs, API for wireing test cases to components and combinations of components... And probably a way to inject some civilized scripting language directly into tp2 files because performing even the simplest standard programming tasks in weidu can pose a bizzare puzzle. All in all a bit to much work needed to make it work to do it 'on a side' of an individual mod development, but should more than amortize itself for active modders or modder groups, especially for 'tweak' collections
A good student project, a pity I don't teach at a uni
-select mod for testing , backend will copy it to game dir
-backend fire standard test, gather results, restore game to clean state/remove container
-present test results
Unfortunately, I have no time to deal with such project right now. But if someone is interested, I can provide feedback based on what I learn from BWS and Project Infinity.