The Scot was handed Massa’s seat at Williams after the 11-time Grand Prix winner suffered a recurrence of the symptoms he’d first experienced in FP2 during Saturday morning’s final practice session.
But despite having not driven an F1 car in anger since 2013, Di Resta didn’t put a foot wrong as he qualified 19th – something he says was by no means a given.
“I’m not going to lie, I was scared, nervous, anxious,” he revealed. “I've not driven one of these cars for three and a half years, apart from ten laps I did in a 2014 car and then you get thrown into qualifying which is the deepest of the deep I think - it's like being thrown off a cliff and seeing how you can fight for survival.”
Despite having to adapt to a car optimised to Massa’s liking, Di Resta, who has been Williams’ reserve since 2016 but spends the majority of his time driving for Mercedes in the German DTM touring car series, said he was pleased with how quickly he got up to speed.
“Honestly I felt quite comfortable quite quickly,” he said. “When I let go of the pit limiter out there I just built myself up slowly and was improving by half a second a lap, so there's lots of potential there.
“Ultimately the team prepared me as best they could in an hour and a half. I was very safe in the high speed [corners], safe in the exits and I didn't really use the rear tyres as you should.
“I got into a reasonable rhythm, but I was a bit too early on the brakes, equally the car was rotating a bit too quick for me in certain corners so I wasn't quite taking enough out of it. Even the throttle stroke is so much longer than I'm used to [in DTM] so it was a case of how much can you push the throttle without spinning the rears up with all the power.
“It's kind of just getting your bearings again.”
Back in June Di Resta was victorious as the DTM visited the Hungaroring, but he’s under no illusions that things will go as smoothly in Sunday’s race.
“The race is a very different story [to qualifying], the tyres… I don't know where they are, I’ve never driven the car on high fuel, so that will be another shock into Turn 1. Even doing a pit stop, I stopped in the box at the end of the session and they said ‘yes, you stopped on your marks’ but there's going to be about 16 people there tomorrow to try to get your way around.
"Of course you want to go forward, want to do what you can but I've got a rate of development and also got to see how my fitness is over the course of 70 laps in the heat...
"I've got to get my head around the steering wheel - that's the main thing. Get my head around the formation lap because obviously the team can't speak to me and run me through that. It's a list the length of my two arms...
“It's a whole different ball game when you're sitting on the grid and the lights go out because you mind goes blank, so it is just about running through the process, trying to do the fewest mistakes possible as that's what will make the difference between if I enjoy it or not.”
Sunday will be Di Resta’s 59th Grand Prix start. His best finish in Hungary came in 2011 when he finished seventh for Force India from 11th on the grid.