In which countries have you been studying? It probably won’t make any difference. Also, you do realize that there is no way to apply to be a test pilot ar entry into the military. You would have to serve as a pilot first before getting the opportunity to be a test pilot.
It is very possible for you to become a military test pilot. Follow these steps. Move back to the US. Get into a university. Join AFROTC. Graduate from both. Pass the FBI background check. Join the military. Become an officer or warrant officer (for helicopters). Become a military pilot. Serve and gain experience as a military pilot. Apply for test pilot school. By the time you apply to test pilot school, it won’t make any difference that you spent 10 years living abroad.
You may still be able to become a military test pilot without moving back to the states or graduating ROTC before your background check. It just makes the process more difficult. Unless, of course, you were overseas because your parents were serving a diplomatic or military mission. Living in an allied country or a community of American expats would help the process of the FBI background check as well. Read about Andy Thomas, an astronaut from Australia that did not even become a US citizen until he was 30.