A senior Iranian military commander confirmed that Tehran recently carried out a ballistic missile test to the anger of the United States, the Fars news agency said on Tuesday.