Need help with Quicktest and Randomtest, it's not working

Hi guys, when I goto cmd prompt, go into the choicescript directory and type quicktest, the follow shows up:

C:\ChoiceScript Program>quicktest startup

C:\ChoiceScript Program>java -jar js.jar -w -opt -1 -debug autotest.js mygame startup
‘java’ is not reconized as an internal or external command, operable program or batch file.

the same error message comes up for randomtest, am i missing java or is this another problem ?

Thanks

Try using the html files in the main game folder. Some googling suggests that this error occurs from the improper installation of Java, so if running the html file directly from the main folder doesn’t work, try uninstalling and re-installing Java.

Thanks, I feel silly, yes the html file works, but I can’t seem to finish 1 randomtest.html, even when I set the Iteration to 1. I use FireFox to run it, and it always crashes eventually after about 15 minutes, never completes. Any ideas for this?

Also, is quicktest randomized everytime I run it? Or does it always choose the same thing everytime so there’s no point to run it a few times?

This old thread might help you…

@Zanity, I run into the EXACT same problem with randomtest. It never finishes. It will catch errors for a while, and as I fix said errors, it will obviously run longer and longer uninterrupted each time, but it never finishes …it just slows down and them seems to just stop working.

So per @JimD, we might want to run only 5 instances in randomtest? Is this still current advice? That seems like a low number because I thought that if I were to keep running it 5 at a time that I would just be getting duplicate results?

I think I’ve been trying to run 10,000.

I would never run it from cmd now that we have html files included in CS. Navigate to your CS folder and run randomtest.html.

Run it in blocks of 500.

So, set Iterations to 500
Run it and fix errors. If it works, set Seed to 500 and run it, rinse and repeat until you check 10,000 iterations, which is a reasonable number.

1 Like

Thanks @JimD. You’re a real asset to the community.

Should quicktest be approached similarly?

not sure if you guys read my post but i been trying to run at 1 iteration and it still crash after 15 to 20 mins, it just gets so long my FireFox freeze up and shutdown… quicktest pass tho but it says a lot of lines are untested… the only thing I guess I can try is to delete the sections that randomtest crash at, and see if i can skip those in the test…

@Zanity do you have a loop in your game or use random numbers? It sounds like your game is stuck in a loop.

@HornHeadFan thanks. Quicktest has to run correctly with no untested portions. It only has 1 iteration as far as I know.

@JimD yes, I used *rand extensively at all the password keypad entries as well as randomize the AI attack/defense at all the mini games… you are right, i scroll down on the random test and it’s miles of *rand =( so i guess in order to test it, i need to disable them ?

@Zanity based on what I know about *rand, I don’t think it plays well with Randomtest. I would *comment them to run randomtest and uncomment them when finished. I don’t like using rand since it makes testing so hard.

Sorry I missed your 2nd post about 1 iteration.

I use a fair bit if *rand and have no problems with random testing, unless I end up with a loop. Looping will be a big problem when random testing and can be major problem to track down.

All the big bugs have been fixed and my game has been published. Thanks you guys for all the help. I’ll get started on my second title after new years.

Happy holidays =)