Test button will work only for nodes (not templates) - because test is done by sending script to server and running it in context of specific node.
For testing scripts where $node variable is not used you could also use nxscript command line tool. If using nxscript, first command line argument will be passed to script as $1, second as $2, and so on.
Best regards,
Victor