What is the most robust way to assert for a validation error? I want to test the validation function in my custom module, and so I've written a simpletest that inputs an illegal value in a field and then attempts to save the node. Currently I'm using assertText() to find the string contained in the validation failure message on the page, but if someone changes the wording of the failure message in the future, this could break. Is there a more robust way to check that a field, or even a node save generally, failed validation?
Since you are talking of custom validation, if the code is using form_set_error() or form_error(), then there should not be any problem, if the test code and the form validation handler use the same string (which is passed / not passed to t() in both the cases).

Keep in mind that the modules enabled during a test execution are Drupal core modules enabled from the profile used for the tests, or modules explicitly enabled from the test class. The error message output from your form validation handler is not altered, if the modules enabled from the test class don't alter it.

An alternative method of checking if a validation handler returned an error would be setting a global variable, for example; that is something Drupal does, but only from a module that is used only for testing, not a module that is normally executed. For example, entity_crud_hook_test_comment_delete() (the implementation of hook_comment_delete() done from the Entity CRUD Hooks Test module) uses a session variable that is set when the hook is invoked.
Notice that this is what Drupal normally does to verify a hook is effectively invoked when it should. When you need to verify if a form validation handler returned an error, I would rather use the method you are using, since:


It doesn't require the form validation handler to know if it is being executed during test, or not
It doesn't require the use of a test module


There are some cases where a module needs to be created with the only purpose of testing something, but that is not generally the case of verifying a form validation handler effectively returns an error when it should.