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.
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.
Source : Link , Question Author : Graduate , Answer Author : StoneyB on hiatus