How concerned should I be with Randomtest?

How concerned should I be if randomtest says a line isn’t being reached? Manually, there is no problem getting there, but for some reason, randomtest shows it’s almost impossible or impossible to get there. Should I be concerned?

Yes and no. It depends on the line.

Is there anything on that line that is supposed to be reachable in game? Then be worried and figure out why it can’t be reached. Usually, it is an intention issue or a stat thing.

If it’s just empty lines, or redundant code (I occasionally have emergency *gotos to make sure people end up in the right place after complicated code) then don’t worry.

2 Likes

Then the line is truly unreachable, This could be due to a logic error in your code. For example, the line might be after a *goto command, making it impossible to reach.

Or The line might be part of a branch that’s difficult to access due to the conditions required.

Since Randomtest makes decisions randomly, it might not hit all possible paths, especially if they’re contingent on specific, rare conditions.

And finally it might just be randomtest

1 Like

If I can reach it manually but randomtest cannot. Any idea what could cause it?

If you can reach it manually, it’s probably not a huge deal - it’s not too uncommon for there to be outcomes that are rare enough that Randomtest just doesn’t get there, even with a large number of seeds, due to the particular way that Randomtest plays. The main things you’d want to look out for is if there are code problems that make it actually impossible to get there, or if there are stat tests that are actually too difficult to pass, and if you’re getting there manually, it sounds like neither of those is the case. (If a stat test is involved, it may still be difficult enough that you’d want to make it a little easier for people who aren’t as familiar with exactly how to raise the stat that high.)

7 Likes

If you can get there when playing, you could try running a larger number of seeds of RandomTest as it might just be obscure to get to randomly.

1 Like

It would be easier to debug this issue if you share the code and the lines that randomtest says are unreachable.

Huh, I have a lot of really rare paths, but I have never had randomtest fail to find them. I usually do randomtests with no text or stats, in batches of 100 with a random starting seed (just typing in numbers).

2 Likes

I would, but the whole thing is almost 3000 lines altogether :grimacing:

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.