Smart capacitor test method