The trial is being run by Stagecoach, one of the UK's largest transport firms. It involves the self-driving bus manoeuvring around the bus depot while being guided by sensors, optical cameras and ultrasound.
The autonomous bus navigates a prescribed route by using the technology to detect and avoid objects. Under existing laws, the trial must be conducted with a driver sitting at the wheel although the regulations are currently being updated.
Stagecoach hopes that the pilot scheme will result in the development of new technology fitted to buses, which is capable of detecting cyclists or pedestrians that may be in a driver's blind spot.
The pilot also has a more ambitious purpose, with the software forming the basis of a passenger-carrying autonomous bus, set to be trialled in 2020. A fleet of five buses carrying up to 42 passengers each will use the technology in trials between Fife and Edinburgh across the Forth Road Bridge Corridor.
The buses will require a driver as back up for passenger safety and will travel 14 miles across the Forth Bridge to Edinburgh Park train and tram interchange. The government is providing £4.5m in funding for the project.
Stagecoach chief executive Martin Griffiths said: "Our employees are the beating heart of our business and I believe that will remain the case, but the world is changing fast, particularly where new technology is involved, and it's our job to lead the way in looking at ways to continually progress and improve our operations for the good of the many people who use our bus services every day."
The technology is being developed in a partnership, which involves Stagecoach, the bus manufacturer Alexander Dennis and technology company Fusion Processing.