A shakedown or trial run was the testing period undergone by a vessel, or the technology designed to operate such a vehicle, before being declared fully operational. The trial journey, known in nautical terms as the shakedown cruise, was the operation conducted by a new starship and her crew so as to test its systems. It was usually a routine or even a brief ceremonial "maiden voyage", but could also extend to at least one year. A shakedown could reveal flaws inherent in the vessel's construction, especially in prototypes or new technologies.
Examples of shakedowns
After resolving the incident with V'ger in the mid-2270s, Captain Kirk asked Commander Scott if they should give the refitted USS Enterprise a proper shakedown. "I would say it's time for that, sir. Aye," Scott replied. (Star Trek: The Motion Picture)
The USS Excelsior was called to duty before completion of her transwarp drive. Sabotage rendered the entire mission a failure, and sent the Excelsior back to the shipyard for 2 more years. (Star Trek III: The Search for Spock; Star Trek IV: The Voyage Home)
The USS Enterprise-A spent the better part of a year in space on her shakedown voyage (from 2286 to early 2287), but returned to Earth Spacedock after being struck by a series of near-crippling systems malfunctions, and also in order to undergo bridge-refitting and certain other modifications. (Star Trek V: The Final Frontier)
The USS Enterprise-B was damaged, and one of her guests, legendary Captain James T. Kirk, was lost to the Nexus during the starship's shakedown cruise in the Sol system. Kirk was presumed dead for 78 years until the USS Enterprise-D encountered the Nexus. Captain Jean-Luc Picard discovered that Kirk was still alive inside the Nexus. (Star Trek Generations)
The USS Enterprise-E underwent a one-year shakedown after it was launched. (Star Trek: First Contact)