Skip to content

Any automatic testing tools for weidu mods?

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?

Comments

  • AquadrizztAquadrizzt Member Posts: 1,069
    What are the kind of things for which you would be testing? Mod conflicts? Stability? Game-breaking issues?
  • For starters, I'd like to see that it actually installs in all configuration without problems and applies the intended changes ;) Mod conflicts would be tricky - possible only to test against selected few and next to useless without some kind of automatic version updates. I don't think there is any IE sandbox which would allow testing the actual content by scripting all party decisions and verifying other actors' actions either, so actual in-game performance is probably also out of question.
  • ALIENALIEN Member Posts: 1,271
    edited November 2018

    For starters, I'd like to see that it actually installs in all configuration without problems and applies the intended changes ;)

    @polymorphedsquirrel have also wondering about such 'testing framework', indeed one important piece of the puzzle is an ability to test if the mods+components actually install at all. After each git commit. At least for English language. There is no point of further testing without ensuring that the mod is in fact installing without ERRORS/WARNING's. Mod conflicts could be tested in terms of 'I've installed one mod, now the other wont install".

    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?

    I don't think there is any IE sandbox which would allow testing the actual content by scripting all party decisions and verifying other actors' actions either, so actual in-game performance is probably also out of question.

    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.
    Post edited by ALIEN on
  • Yes, something to that effect. I was considering dedicating 'sandbox' game installations for testing and writing a couple of scripts which would take your mod, weidu test cases verifying the consistency of individual components and and run it together for all supported installations and component choices.

    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 ;)
  • ALIENALIEN Member Posts: 1,271
    edited November 2018
    @polymorphedsquirrel Yep, pretty much what I had in mind since years ago when I notice READLN problem, especially about dedicating 'sandbox' game installations. Docker/Containers would be ideal for such rapid, multiple installations. Overall idea would be to:
    -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.
Sign In or Register to comment.