Other than reading the data sheet, the only way to know for sure is to test them, which will be destructive. Apply increasingly more power, until either the value falls outside of the tolerance band or the component starts to physically deteriorate i.e: smoke, discolour or melt.
And this is where the trouble starts.
How are you gonna test them?
DC current, AC current, pulsed, if so, what kind of pulse?
If DC current for how long?
I have seen 500mW resistors that can easily do 2-3W pulsed under de right conditions.
Yet, they were being rated as 1W resistors.
I have also seen 5W resistors that will burn down at 5.5W in a couple of seconds.
I have also seen 5W resistors easily dissipating around 8W for half an hour.