A 30-year-old male with a 10-year history of recurrent epigastric pain presents with 3 days of melena, dizziness, fatigue, and palpitations. Emergency gastroscopy reveals a postbulbar duodenal ulcer with active bleeding. Laboratory tests: RBC 2.8×10¹²/L, Hb 63g/L, WBC 12×10⁹/L, PLT 110×10⁹/L, reticulocytes 0.02 (2%). Which of the following tests is most reliable for determining the etiology of anemia?