I've seen the following sentences in grammars:
I've taught at this university for 10 years
I've driven for over 15 years
Assumuing they are good English, is it possible to ask
How long have you taught?
How long have you driven?
My grammar insists on 'have you been teaching" and doesn't give any alternative answers.