Is the hba1c the test for diabetics?

Yes. It is one of the test, it is used for diagnosis an also for follow up on how a person is doing with their medicine.