A 42-year-old Shoalwater man appeared Rockingham Magistrates Court accused of spitting at passengers on a Transperth train on March 17.
Clinton James Warra pleaded not guilty to two counts of assault.
Police claim he walked past the two victims – aged 58 and 71 years old – and made a guttural noise before spitting at them.
They were travelling on the Mandurah line at the time.
He will reappear on December 12 for a trial allocation date.