@DeepPars (Deepansh Bhatia) posted a new topic, subject "Average Word Count problems". It read:

   Hey there! I tried to run random test on a project I am working on to get the average word count, but the random test stopped working, and crashed itself. My guess would be that since there is somewhat heavy branching, random test broke down.
    
    So my question is, does this happen with you guys too? Does heavy branching and/or large word count break random test? If yes, then what other way there is to know the average playthrough length?
    
    For the record, I'm using CSIDE as my IDE and its built-in random test functionality.
    
    Also, if it matters, I was running ten iterations, had checked “show complete text”, “show choices selected”, and “automatically scroll to the bottom”.
    
    My PC should be able to handle it just fine, since it is a far cry from a toaster.

Then @Carlos.R (Carlos Romero) said

    How many times did you try to run randomtest?  
    I don't mean 10 times, you said you set it to 10 times, I mean… once it crashed did you try and restart?  
    If so, how many times?
    
    Also, will it complete if you set it to one iteration?

After which, @Fiogan (Mouse) added

    Usually when Randomtest has frozen on me, I find I've created an infinite loop.
    
    Since you're using CSIDE, not only can you follow the exact sequence of choices up to the crash, you can also use the ‘step through' function (a button up above where the running version of the game) to go through your code in the region of the crash one line at a time, allowing you to see exactly where your code is crashing. I found a nasty loop bug that way once that I'd spent ages trying to work out myself and really struggled to find.
    
    Otherwise, @CJW would be the one to ask about Randomtest crashing in CSIDE, but I don't think I've ever heard of it happening outside of running thousands of iterations - particularly not, as you say, on a non-toaster computer.

So @Eiwynn (Writer ) replied

    I found that un-clicking (de-clicking) or no longer clicking the button “show choices selected” will speed up the process of running the test nut what @Fiogan says matches my experiences as well
    
    Fiogan:
    
    > Usually when Randomtest has frozen on me, I find I've created an infinite loop.
    
    The infinite loop can also be found, if after running Quick-Test you have some lines “uncovered”. This means they are not being accessed during ytorres@example.com.
    
    My record is 2,000 lines not covered due to an infinty-loop.

So @DeepPars (Deepansh Bhatia) replied

    Turns out, it was an infinite loop, after all. Silly me, not trying Randomtest without the full-text option. Already found the bug and corrected it. Works like a charm.
    
    Thanks a lot people, this community rocks! Cheers!

To which @Szaal (Fava) replied

    Just wanted to put this thing here 
    
    You can make a conditional check based on this randomtest.
    
    The basic syntax is:  
    `*if choice_randomtest`
    
    CMIIW


{'source': 'discourse', 'url': 'https://forum.choiceofgames.com/t/average-word-count-problems/32671', 'title': 'Average Word Count problems', 'views': 1415, 'has_accepted_answer': True, 'word_count': 503, 'like_count': 17, 'reply_count': 1, 'participant_count': 5, 'posts': 6, 'tags': '', 'author': '@DeepPars (Deepansh Bhatia)', 'participants': '@DeepPars (Deepansh Bhatia), @Carlos.R (Carlos Romero), @Fiogan (Mouse), @Eiwynn (Writer ), @Szaal (Fava)', 'image_url': [None], 'created_at': '2017-11-26T04:17:48.636Z', 'last_posted_at': '2017-11-26T05:58:18.795Z'}