AB de Villiers is expected to play in a three-day match for the South African Invitation XI against the touring Zimbabweans next month, in a bid to make a Test comeback. South Africa take on their neighbours in the inaugural four-day day-night Test starting Boxing Day, and to prepare for the fixture, Zimbabwe will play a three-day practice match in Paarl from December 20 to 22 where de Villiers may play.

"We'd like to get him back in whites as soon as possible and we have some plans in place. There's the practice match which will be good for him," Linda Zondi, South Africa's convener of selectors told ESPNcricinfo.

Zondi has kept an eye on de Villiers' performances in the Ram Slam T20 matches - he has scored 130 runs with a half-century in three innings - and is satisfied that de Villiers has sufficient match fitness. "The manner in which he has played has shown that he is ready. It was never a case of him being rusty but just about getting him match fitness," Zondi said.

De Villiers has not played a Test since January last year because injuries kept him out of series against New Zealand and Australia in 2016 and a self-imposed sabbatical from the longest format has seen him sidelined throughout 2017. As a result, it was widely speculated de Villiers would retire from the format, something even former captain Graeme Smith confirmed he had heard, but in August de Villiers stepped down as ODI captain and committed to play across all formats. This week, he explained to reporters in Centurion that the long break had done him good.

"I've had time at home to get fresh, time to work on my body, and time to work on skills I've not worked on in many years.," de Villiers said. "I've sort of rediscovered that love of the game. I've not had an off-season where I've gone to nets to work on my skills and technique for ages. Last year, in the peak of the season, I was less ready for Test cricket than I am now."

Though de Villiers has played international cricket this year - he was part of the ODIs in New Zealand and the limited-overs matches in England - he has had most of the year, especially the winter, off. On comeback this summer, he struck 176 in an ODI against Bangladesh in Paarl and has since been back to his aggressive best. Since his last Test, de Villiers has only played one first-class game, for Titans, but still feels he is ready for a longer stint and the warm-up match will help.

"It will be nice to go out there and spend some time on my legs. Form-wise I feel ready, but it's important to stand in the field for a while and hopefully get a long knock," he said.

The only question that remains is how (not if - because coach Ottis Gibson made it clear de Villiers and Dale Steyn would play as soon as they were available) de Villiers will slot back into the Test XI. Not even Zondi has a proper answer yet. "For us as selectors, it's about getting him into the squad and then it will be worked out from there. It's a nice problem to have," Zondi said.

South Africa's Test team composition has shifted from seven batsmen, three seamers and a spinner to six batsmen, two allrounders, two frontline quicks and a spinner in recent months which has complicated the case for de Villiers' return. The six incumbents are Dean Elgar, Aiden Markram, Hashim Amla, Temba Bavuma, Faf du Plessis and Quinton de Kock, and of those, only Bavuma did not score a century against Bangladesh. Bavuma also occupies the No. 4 position that used to belong to de Villiers, so it would seem he is the likeliest to go. But Bavuma had only recently been promoted to the position and dug South Africa out of several holes and is seen as someone to invest in for the future, leaving South Africa with a conundrum.

A possible solution could present itself if du Plessis is not declared fit for the start of the Test summer. Du Plessis suffered a lower-back injury during the third ODI against Bangladesh in late October and was ruled out of action for six weeks, which puts his comeback sometime in December. He has since also had surgery on a troublesome shoulder and is not expected to participate in the Ram Slam at all. Though Zondi is hopeful du Plessis will be available to lead the Test team against Zimbabwe, some of South Africa's de Villiers puzzle may be solved if he is not. And then it remains to be seen how South Africa will line-up for the three Tests against India in January.