The correct answer is have been.
Полный ответ: I have been writing a test for half an hour. (Я пишу тест уже полчаса.)