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

**URL:** <https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013>\
**Category:** ChoiceScript Help\
**Created:** [November 24, 2014, 6:12am UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013 "2014-11-24T06:12:45Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zanity](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zanity/32/2727_2.png) [@Zanity](https://forum.choiceofgames.com/u/Zanity)\
**Post date:** [November 24, 2014, 6:12am UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/1 "2014-11-24T06:12:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fantom](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fantom/32/8537_2.png) [@fantom](https://forum.choiceofgames.com/u/fantom)\
**Post date:** [November 24, 2014, 6:34am UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/2 "2014-11-24T06:34:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Zanity](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zanity/32/2727_2.png) [@Zanity](https://forum.choiceofgames.com/u/Zanity)\
**Post date:** [November 24, 2014, 7:39am UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/3 "2014-11-24T07:39:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![andymwhy](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/andymwhy/32/34396_2.png) [@andymwhy](https://forum.choiceofgames.com/u/andymwhy)\
**Post date:** [November 24, 2014, 3:44pm UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/4 "2014-11-24T15:44:23Z")

</div>

This old thread might help you…

> [@Using Bug Checks](https://forum.choiceofgames.com/t/using-bug-checks/256):
>
> Could someone write an idiots guide to using the bug check tests here? I’m getting nowhere trying to use them!

---

<div class="post-metadata">

**Author:** ![Eric\_Moser](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/eric_moser/32/259257_2.png) [@Eric\_Moser](https://forum.choiceofgames.com/u/Eric_Moser)\
**Post date:** [November 24, 2014, 4:24pm UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/5 "2014-11-24T16:24:05Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Eric\_Moser](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/eric_moser/32/259257_2.png) [@Eric\_Moser](https://forum.choiceofgames.com/u/Eric_Moser)\
**Post date:** [November 24, 2014, 5:14pm UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/6 "2014-11-24T17:14:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JimD](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/jimd/32/21672_2.png) [@JimD](https://forum.choiceofgames.com/u/JimD)\
**Post date:** [November 24, 2014, 6:24pm UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/7 "2014-11-24T18:24:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Eric\_Moser](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/eric_moser/32/259257_2.png) [@Eric\_Moser](https://forum.choiceofgames.com/u/Eric_Moser)\
**Post date:** [November 24, 2014, 6:53pm UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/8 "2014-11-24T18:53:40Z")

</div>

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

Should quicktest be approached similarly?

---

<div class="post-metadata">

**Author:** ![Zanity](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zanity/32/2727_2.png) [@Zanity](https://forum.choiceofgames.com/u/Zanity)\
**Post date:** [November 24, 2014, 6:59pm UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/9 "2014-11-24T18:59:21Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![JimD](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/jimd/32/21672_2.png) [@JimD](https://forum.choiceofgames.com/u/JimD)\
**Post date:** [November 24, 2014, 11:04pm UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/10 "2014-11-24T23:04:13Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Zanity](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zanity/32/2727_2.png) [@Zanity](https://forum.choiceofgames.com/u/Zanity)\
**Post date:** [November 24, 2014, 11:06pm UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/11 "2014-11-24T23:06:40Z")

</div>

@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 ?

---

<div class="post-metadata">

**Author:** ![JimD](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/jimd/32/21672_2.png) [@JimD](https://forum.choiceofgames.com/u/JimD)\
**Post date:** [November 24, 2014, 11:11pm UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/12 "2014-11-24T23:11:44Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Lordirish](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirish/32/238051_2.png) [@Lordirish](https://forum.choiceofgames.com/u/Lordirish)\
**Post date:** [November 25, 2014, 1:49am UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/13 "2014-11-25T01:49:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Zanity](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zanity/32/2727_2.png) [@Zanity](https://forum.choiceofgames.com/u/Zanity)\
**Post date:** [December 31, 2014, 9:10am UTC](https://forum.choiceofgames.com/t/need-help-with-quicktest-and-randomtest-its-not-working/6013/14 "2014-12-31T09:10:29Z")

</div>

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 =)
