Pakistan, who went down to Sri Lanka in the final of a one day tri-series on Saturday, meet their South Asian rivals in the first of two Tests in Faisalabad from October 20.
"We have recalled opener Farhat for he has a good Test record and a hundred against India in the last home series, and Kamal and Kaneria are Test specialists," chief selector Wasim Bari told AFP.
Dropped from the one-day squad are opener Salman Butt, allrounder Shahid Afridi, pacer Rao Iftikhar and batsmen Misbahul Haq and Bazid Khan, the Pakistan Cricket Board announced.
Regular Test opener Taufiq Umer was also not considered for Test selection after missing the season due to injury.
"The team has done well but now needs to lift themselves for the Test series which is very different from one-day cricket," said Bari, also a former captain.
Farhat had been axed from the one-day squad after he failed to put up consistent performance while Kamal and Kaneria were not considered.
The 15-man squad also include two uncapped players in rookie allrounder Riaz Afridi and wicketkeeper Zulqarnain Haider.
Riaz and Haider were members of Pakistan's Under-19 team which won the Junior World Cup in Bangladesh in January this year.
Riaz, a 19-year old from northwest Peshawar city, is considered to be a future prospect.
"Both the youngsters have been knocking at the doors of international cricket and we need a back up wicketkeeper for Moin Khan so that he is groomed for the future," said Bari.
Bari denied there was any pressure for Moin to be axed as he has not performed up to the mark.
Sri Lanka has also made five changes for the Test series with Jehan Mubarak, Ian Daniel, Lasith Malinga, Thilan Samaraweera and wicket-keeper Romesh Kaluwitharana to join the squad for Tests.
Dropped after the one-day series are Tillakaratne Dilshan, Nuwan Zoysa, Avishka Gunawardene, Saman Jayantha and Kaushal Lokuarachchi.
The second test will start in the southern port city of Karachi from October 28.
Pakistan Test squad: Inzamam-ul Haq (captain), Yousuf Youhana (vice captain), Yasir Hameed, Imran Farhat, Asim Kamal, Shoaib Malik, Abdul Razzaq, Moin Khan, Mohammad Sami, Danish Kaneria, Shoaib Akhtar, Younis Khan, Zulqarnain Haider, Riaz Afridi and Rana Naveedul Hassan.