To stop a test from inside a test, raise an exception--any exception that you do not catch yourself. The exception is caught by the Test framework and terminates the test, causing your test to fail because all tests that terminate by exceptions are defined to fail.
To stop a test from outside a test, you must terminate the task running the test.