automated testing api for mods

Things that we aren't going to implement
Post Reply
NightHawk
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun Dec 07, 2014 1:39 pm
Contact:

automated testing api for mods

Post by NightHawk »

I believe mod creators would greatly benefit from capability to test the mods (and their interactions).
Since you guys (devs) mentioned, you're already running automated tests for Factorio, I hope to see it soon.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13235
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: automated testing api for mods

Post by Rseding91 »

You can already make a test in your mod that tests it? Simply add in functions that do the relevant testing of your mod to your mod.

I'm not sure what you're requesting.
If you want to get ahold of me I'm almost always on Discord.

NightHawk
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun Dec 07, 2014 1:39 pm
Contact:

Re: automated testing api for mods

Post by NightHawk »

The dev mentioned, they're doing automated tests. How I understand it, they have some scenarios defined for each particular function they want to test. These scenarios are then run and you get feedback on which scenarios passed and which falied. The feedback needs to be presented in such a way, you can process it from outside the game - printing it to console won't do the job.

The modding API is inadequate for testing purposes (e.g. for testing events). We have no way to fake user input - we can't test GUI (without resorting to unreliable hacks). Also do we have access to the CRC value? One of the simplest ways to auto test interaction of different features would be to create a specific map, let it go for a while a compare a CRC at specified tick with precomputed (doesn't tell you what the problem was, thou).

To protect the players, those calls (especially the ones for fake user input) could only be available in "developer" release / mode.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: automated testing api for mods

Post by DaveMcW »

NightHawk wrote:The feedback needs to be presented in such a way, you can process it from outside the game - printing it to console won't do the job.
factorioforums.com/wiki/index.php?title=Lua/Game#makefile

Post Reply

Return to “Won't implement”