The thermodynamic dislocation theory (TDT) is based on two highly unconventional assumptions: first, that driven systems containing large numbers of dislocations are subject to the second law of thermodynamics and second, that the controlling inverse timescale for these systems is the thermally activated rate at which entangled pairs of dislocations become unpinned from each other. Here, we show that these two assumptions predict a scaling relation for steady-state stress as a function of strain rate and that this relation is accurately obeyed over a wide range of experimental data for aluminum and copper. This scaling relation poses a stringent test for the validity of the TDT. The fact that the TDT passes this test means that a wide range of problems in solid mechanics, previously thought to be fundamentally intractable, can now be addressed with confidence.