Unless other gear like e.g. harnesses which are designed to take a certain load over and over again, climbing ropes get kind of "used up" with every fall they have to take. According to UIAA and other norms they have to take a certain number of falls with certain conditions (weight, fall factor etc.) to get those norm signs. Every fall weakens the rope a bit, but with normal climbing falls with low fall factors this weakening is so little that a rope will be unusable due to handling reasons (stiffness, thickening) before it will be significantly unsafe (cf. Pit Schubert: About Ageing of Climbing Ropes, UIAA 3/2000; pp. 12.). As stated there, modern climbing ropes will only break when loaded over a sharp edge.
But as every fall weakens the rope, also every (realistic) test for its strength will weaken it. Therefore one can only tell for sure how much force it would have taken by loading it until it breaks, so this test has to be destructive. If you would not load it until failure, you could tell how much load it took at your test but not, if at all and how hard a fall it will hold without failure in case of another fall. So a non-destructive test would not only give no information about the strength for future falls but it would even increase the risk of failure for such a future case. As the author in the article cited above states:
When loaded over a rock edge a very often used rope holds less than a less often used rope, and such a rope holds less than an almost unused rope, and
this less than a new rope (all for the same model of rope). So if you always want to have optimum chance of survival with respect to rope breaking caused by a sharp rock edge, you have to use a new rope for every mountaineering or climbing tour. But even a millionaire will not afford this.
Above that, test facilities for such rope tests are very expensive and rare –I think to remember that there exist less than ten such test benches in whole Europe. Therefore performing such a test with a used rope would surely be more expensive than just buying a new one when in doubt.