If taking the driving test and the route does not include a railroad crossing, you:

If your on-road driving test route does not include a railroad crossing, you may be asked to explain and demonstrate the proper railroad crossing procedures to the examiner at a simulated location.
DMV Writen Test