By how to test scripts, I meant debugging. I’d like to run the scripts while looking at the console or some sort log file for errors to find where I went wrong.
Yes of course you need to follow an experimental process of expected versus actual output results based on example data inputs.
To exercise and validate that your scripts are correct, first formulate your test suites of trial data.
Traceback errors in the client browser or server logs should be obvious. But test failures, where actual results are not the same as your expecteds, are not so obvious - for example numeric value asserts mismatch.
Custom scripts used in production must already have been validated, correct?
To write these tests in code often make perfect sense depending on your business case.
Speaking of example input and test data, does bench have method of instantiating test sites or is the most sane way is to take the SQL of production and instantiate a new ERPN with the said copy and then run tests on it? Manually inputting sample customer, supplier and item data doesn’t make sense and wouldn’e be good trial data to work with.
Browser consoles for JS scripts are obvious enough, but is logs/bench.log the only place to look into them?