It is not possible to directly measure aerodynamic drag of the bike and rider combination.  Instead, we measure the power input from the rider, subtract measured kinetic power (power required to accelerate), gravitational power (power required to go uphill) and make an assumption for frictional losses (which are all relatively small), which leaves aero power.  From this we can easily calculate CdA.