The Pakistan Cricket Board (PCB) announced on Tuesday Babar Azam will replace the under-pressure Azhar Ali as Test captain in the two-match series in New Zealand starting next month.
Azhar was criticised following Pakistan's three-wicket defeat in England in August this year, losing the three-match series 1-0.
The PCB said Azam will now be the three-format skipper after assuming the Twenty20 role last year and one-day captaincy in May this year.
"Azam has been appointed as Pakistan Test captain, which now makes him the captain across all three formats. His first assignment will be to captain Pakistan on New Zealand tour," said a PCB release.
Azam becomes the third Pakistan Test captain in 13 months after Sarfaraz Ahmed was sacked in October last year.
Pakistan will play three Twenty20 internationals and two Tests against the Black Caps, a squad for which is expected to be announced on Wednesday.
Azam, who led Pakistan to a 3-0 whitewash of Zimbabwe in the Twenty20 international series on Tuesday, said he was ready to take charge.
"I feel truly honoured to have been appointed Test captain," Azam said in the PCB's statement. "I am ready and prepared to take up the additional responsibility."
Azhar led Pakistan in nine Tests, winning two, losing four and drawing the other three.
Pakistan's three Twenty20 internationals in New Zealand are scheduled for Auckland on December 18, Hamilton two days later and a third at Napier on December 22.
The first Test is at Mount Maunganui from December 26-30 and the second at Christchurch from January 3-7.