SA-MP Forums Archive
How do you test your script? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Discussion (https://sampforum.blast.hk/forumdisplay.php?fid=84)
+---- Thread: How do you test your script? (/showthread.php?tid=461166)



How do you test your script? - Rapgangsta - 31.08.2013

Yes, call a friend would be a good idea, but he will be certainly annoyed as you go AFK every 3 minutes for fix or improve the script you're testing.
What do you do in this case?


Re: How do you test your script? - Cypress - 31.08.2013

I guess you can also test your script by connecting NPC's and when you send them client messages, just send them to playerid so you see that they are passing thru. There are loads of ways and it depends on what kind of things you are testing. However, I believe that you can test most of the things yourself, just need to think on how.


Re: How do you test your script? - newbienoob - 01.09.2013

I have 2 laptops. Both have samp installed.


Re: How do you test your script? - Misiur - 01.09.2013

Virtual machine with gta running, but I'm trying to switch to Y_Less's unit tests


Re: How do you test your script? - admantis - 02.09.2013

I usually have a "dummy" NPC that is connected only if constant "TESTING == 1" and is assigned an ID to a variable, similar to Cypress' method.

The good way to test your code is not ONLY testing if they work, but to try to NOT make it work! Try messing with your code, put yourself in the shoes of a malicious person trying to find an exploit. Break your own script first, and nobody will break it again later.


Re: How do you test your script? - Misiur - 02.09.2013

@Y_Less: I meant your y_testing - unit tests are awesome in every field (github integration with travis telling if specific commit will not break anything is really superb). I've wondered if we could build something similar for pawn over git to allow unintrusive collaboration.


Re: How do you test your script? - Luis- - 02.09.2013

I use my beta team or I do it myself.


Re: How do you test your script? - iZN - 02.09.2013

well my friends always help me testing and even the staff members.


Re: How do you test your script? - random123 - 03.09.2013

http://sandboxie.com/

You can run two instances of gta with this program, depending on what you're testing that can come in handy in most situations.


Re: How do you test your script? - lean1337 - 03.09.2013

I used to have a laptop which had samp installed by my side but not anymore, I just get some friend to connect to my server. Im gonna try sandbox that random123 recommended.