Jump to content

Best way to test scripts


Recommended Posts

Posted

Hey guys

I've been writing some scripts and I was wondering what the best way to test them is. I just got a one day ban and was thinking its probably because I'm just testing each part of my script over and over to get it perfect. Like such as banking and equipping gear.

How do you guys test your scripts? Do you just try it once then do something else for half an hour then test again?

Cheers

Posted

You can test run the script as a whole when it is ready, but it's also good to soak-test different parts of the script.

For example, create a new script (or modify your current one) to repeat a certain action perhaps 100 times (e.g withdraw required items from the bank, deposit all, repeat). This is a good way to test the rigidity of parts of the functionality of your script in a short time frame (thus hopefully reducing the likelihood of a ban).

Also, it's important to test exceptional flows / edge cases. For example, what happens if you start your script in castle wars, or if you die while the script is running, or if your bank is full and you need to deposit something, or if the script misclicks on a ladder and ends up upstairs in a building, or ... (the list goes on). Naturally it is not possible to cover all cases as the possibilities for anomalies are pretty much endless with any script, but you can weigh the possibility of an edge case happening and decide to implement a solution accordingly.

Apa

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...