According to the no-hair conjecture, a Kerr black hole (BH) is completely described by its mass and spin. In particular, the spin-induced quadrupole moment of a Kerr BH with mass $m$ and dimensionless spin $chi$ can be written as $Q=-kappa,m^3chi^2$, where $kappa_{rm BH}=1$. Thus by measuring the spin-induced quadrupole parameter $kappa$, we can test the binary black hole nature of compact binaries and distinguish them from binaries comprised of other exotic compact objects, as proposed in [N. V. Krishnendu et al., PRL 119, 091101 (2017)]. Here, we present a Bayesian framework to carry out this test where we measure the symmetric combination of individual spin-induced quadrupole moment parameters fixing the anti-symmetric combination to be zero. The analysis is restricted to the inspiral part of the signal as the spin-induced deformations are not modeled in the post-inspiral regime. We perform detailed simulations to investigate the applicability of this method for compact binaries of different masses and spins and also explore various degeneracies in the parameter space which can affect this test. We then apply this method to the gravitational wave events, GW151226 and GW170608 detected during the first and second observing runs of Advanced LIGO and Advanced Virgo detectors. We find the two events to be consistent with binary black hole mergers in general relativity. By combining information from several more of such events in future, this method can be used to set constraints on the black hole nature of the population of compact binaries that are detected by the Advanced LIGO and Advanced Virgo detectors.