A Twyman-Green phase-shifting interferometer with a laser diode (LD) source was constructed for testing an optical element. An automated interferometric system was developed in which the laser current is continuously changed to synchronize intensity data acquisition with vertical drive pulses of a charge-coupled device (CCD). The intensity of interference pattern is integrated with a CCD detector for intervals of one-quarter period of one fringe. A microcomputer calculates the phase to be measured. To avoid the mode instability of LD, a feedback interferometer with extra TTL electronics is made to stabilize the phase shift using the frequency tuning of LD. The experimental result is shown to measure the profile of a diamond-turned Al surfa-ce.