De Villiers, 31, replaced Hashim Amla, who resigned after last week's drawn second Test with England in Cape Town.
"My focus is on international cricket and I want to play for as long as possible," said De Villiers.
"I'm still very committed. To the job? I'm not sure. The two Test matches for now is all I'm focusing on."
The third Test in Johannesburg begins on Thursday, with England leading 1-0 in the four-match series.
De Villiers, South Africa's one-day captain since 2012, has played 104 Tests and 195 one-day internationals since making his debut in 2004.
It was reported in December that De Villiers would quit Tests at the end of the series to focus on limited-overs cricket.
He said on Wednesday: "There have been a few rumours floating around and in most rumours there is always a little bit of truth.
"I've found myself on the pitch in the past few years, every now and then, not enjoying myself as much as I should be."
After the England series, South Africa do not play Test cricket again until New Zealand's tour begins in August.
De Villiers added: "Lots of things can happen before then and I don't want to commit myself to too much."
New South Africa Test captain AB de Villiers says he is "not sure" if he wants to remain in charge beyond the Test series against England.