Sammy will continue to be T20 captain meaning West Indies have separate skippers for all three formats.
"Denesh Ramdin, the Wicket-keeper/Batsman, has been named new Test Match Captain of the West Indies Team. Congrats to him on the appointment," the West Indies Cricket Board wrote on its twitter handle.
"The WICB also thanks Darren Sammy for his time at the helm as Test Match Captain from November 2010. He will remain as T20 Captain," the board added.
Sammy, who was appointed captain in 2010, was relieved of his one-day duties in 2013 and was replaced by all-rounder Dwayne Bravo.
Sammy's tenure as Test captain began in November 2010 when West Indies drew a three-match series against the hosts Sri Lanka. He led West Indies to series victories twice over Bangladesh, Zimbabwe and New Zealand.
But disastrous results on the Test tours of India and New Zealand last year raised doubts over his leadership abilities and his individual failure as an all-rounder has also not helped his case.