Both are useful, but they show different things.
A cable speed test gives the clearest view of the broadband speed coming into your home. A Wi-Fi speed test shows the speed your phone, laptop or tablet is getting in that room.
For example, if your cable speed test is good but your bedroom Wi-Fi speed is slow, the issue may be Wi-Fi coverage inside the home, not the broadband connection itself.