Foreman graduated from Annapolis in May 1979 and was commissioned as an Ensign in the United States Navy. He went on to pilot training in Pensacola, Florida and Corpus Christi, Texas and was designated a Naval Aviator in January 1981. After initial training in the P-3 Orion aircraft in Jacksonville, Florida, he was assigned to Patrol Squadron Twenty-Three at NAS Brunswick, Maine. He made deployments to Rota, Spain; Keflavik, Iceland; Lajes, Azores; Sigonella, Sicily; Bermuda and Panama. Following this tour he attended the U.S. Naval Postgraduate School in Monterey, California where he earned a Master of Science degree in Aeronautical Engineering in 1986. As a graduate student, Foreman conducted his thesis research at the NASA Ames Research Center in Mountainview, California. Following graduation he was assigned as the Assistant Air Operations Officer in USS CORAL SEA (CV-43) homeported in Norfolk, Virginia. In addition to his Air Operations duties, he flew as an E-2 pilot with VAW-120 and VAW-127. Upon selection to the U.S. Naval Test Pilot School (USNTPS) in 1989 he moved to NAS Patuxent River, Maryland. He graduated from USNTPS in June 1990 and was then assigned to the Force Warfare Aircraft Test Directorate at Patuxent River as the P-7 Project Officer. In 1991 he was reassigned as a flight instructor and the Operations Officer at USNTPS. During his tenure there he instructed in the F-18, P-3, T-2, T-38, U-21, U-6 and X-26 glider. In 1993, Foreman was assigned to the Naval Air Systems Command in Crystal City, Virginia, first as the deputy, and then as the Class Desk Officer for the T-45 Goshawk aircraft program. Following that tour he was again assigned to NAS Patuxent River, this time as the Military Director for the Research and Engineering Group of the Naval Air Warfare Center Aircraft Division. In addition to his duties at Patuxent River, he was assigned as the Navy liaison to the Advanced Orbiter Cockpit Project at the Johnson Space Center.
Foreman was working as the technical lead for the Advanced Orbiter Cockpit Project team when he was selected for the astronaut program.
He has logged over 3,000 hours in more than 50 different aircraft.