The physical act of comparing two objects or testing one object against another would typically involve some physical contact or proximity, so even in the case of testing some code on something, it is natural in English to by analogy use the word "against." But I think you are right in this case that "against" has significant adversarial meaning in the act of testing something: often, one introduces stress scenarios or edge cases that could cause some software to fail. Tests are in large part adversarial to the object under test.
No comments yet.