Cheltenham Town's preparations for the new season came to a close with a narrow defeat in Cardiff.
Alfie May's fine goal 13 minutes after the interval had squared the match after Leandro Bacuna's first half opener, but defender Aden Flint added the decisive goal in the closing stages.
It was another tough test for Michael Duff's side, who begin the campaign this coming Saturday with a trip to League One Peterborough United in the first round of the Carabao Cup.
"I was happy with today. I thought it was a good game of football," said Duff.
"We've been beaten by a worldie from almost 25 yards and a set play.
"There's no fans but it's a nice stadium and it brings more of a football feel to it.
"Bearing in mind they were in the Championship play-offs last year, I thought we did well.
"There was a lot of quality in the game and everyone seems to have come through it okay."
Neil Harris' side enjoyed a lot of possession during first half and almost took the lead in the opening exchanges when Josh Murphy attempted an audacious effort from half-way line which dropped a foot over the bar.
But Bacuna handed the hosts the advantage at the interval with a fine strike, volleying home from 20 yards after Josh Griffiths had punched clear a free-kick by former Robin Marlon Pack.
Alfie May pulled the Robins level 13 minutes after the restart, running onto a ball by Liam Sercombe and curling one into the top right-hand corner from an angle down the left.
Aden Flint handed his side the win with 20 minutes remaining, heading home another Pack free-kick from the right.
There was a late chance for substitute Andy Williams to square the match but he dragged his shot wide from a promising position.
CARDIFF CITY: Smithies (Etheridge 61), Osei-Tutu (Sang 46), Nelson (Cunningham 61), Bamba, Morrison (Flint 61), Bennett (Bagan 61), Pack (D’Almeida 80), Bacuna (Bowen 80), Hoilett (Evans 61), Murphy (Margetson 67), Glatzel.
CHELTENHAM TOWN: Griffiths; Raglan, Tozer (c), Freestone (Skurek 84); Thomas, Sercombe (Chamberlain 82), Azaz (Williams 76), Clements, Hussey (Horton 62); May (Addai 76), Reid (Lloyd 76).