Your question was flawed.
Performance always changes with distance.
So you can test a lens' performance at any distance you like, and the test will then reveal how the lens performs at that particular distance.
So what do you want to know?
If it is how the lens performs at a given distance, test it at that distance.
If you want to know at what distance the lens performs best, you have to go through a series of tests to find out.
If you want to compare two lenses, again, only a series of tests will provide an answer (one lens may be better close up, the other at infinity, or vice versa, or ... etcetera)