As a first step, you need to have integration certificate for B1 level. The foreigners office will accept DTZ or Goethe-Zertifikat B1 as proof of language ability. Then Test "Leben in Deutschland". More information regarding this can be found at vhs-stuttgart

Then one can register for citizenship test. More information regarding this can be found at vhs-stuttgart