I can say:
By that time, I will have taken ten tests.
I want to know, can I in Present Perfect substitute will with be going to?
By that time, I am going to have taken ten tests.
English Language Learners Stack Exchange is a question and answer site for speakers of other languages learning English. It only takes a minute to sign up.Sign up to join this community
There is nothing to prohibit this construction, and if you use it it will neither raise eyebrows nor be misunderstood. Here are a couple of examples:
A lot of people graduating with an MPH are going to have taken the same classes, so you'll have an advantage if you can show that you have been responsible for data analysis. — Beth Seltzer, 101 Careers in Public Health, 2010
And if, like Nick, you were in the front line and not merely a blanket stacker stuck back at base, then of course it's going to have taken its toll. —Jan Evans, A Maid of Kent: A Novel Set Against the Backdrop of the Falklands War, 2011
But this is a very rare usage. Outside of formal texts on linguistics, those are the only two instances of "going to have taken" actually reported by Google Books.
If you run across it, you will know what it means; but there is no need to incorporate it in your working vocabulary.
When you use the future perfect tense, you use 'will' only, and not 'be going to'. That is a grammatical rule, so no further explanation is necessary.