It was a better day for struggling McLaren-Honda, who ran problem-free.

Fernando Alonso set the sixth-fastest time despite a cobbled-together fix for an engine problem that had ended team-mate Jenson Button's efforts on Thursday after just 21 laps.

Alonso completed more than 50 laps - by far the team's biggest single-day mileage of the winter - and set relatively competitive lap times, despite the engine being down on power and carrying a known problem.

Honda had warned on Thursday that the temporary fix they had put in place on the energy recovery system could well fail again on Friday. A permanent redesign of the faulty part will be ready for Saturday, when Button is back in the car.

McLaren racing director Eric Boullier said: "It is good to finally put some laps and get the programme running. We did more than expected today and caught up on the programme."

Ferrari's Kimi Raikkonen set the second fastest time just 0.01secs behind Ricciardo

He added that the team were going through data-analysis programmes, including checking how the car behaved and reacting to set-up changes, and it was "so far so good".

Ricciardo's pace-setting time was the fastest of the winter at this track, beating that set by Lotus's Pastor Maldonado on Thursday by nearly half a second.

The Australian was 0.01s quicker than Raikkonen, with Massa a further 0.088s adrift. All were running on the 'soft' tyre at the time, as was Alonso on his best lap.

Hamilton completed a race simulation run in the afternoon at the same time as Ricciardo and set his fastest lap - only 0.349s off the Red Bull - on the medium tyre, which is said to be about 1.2 seconds a lap slower than the soft.

Both times were set on similar-length short runs, which suggests the Mercedes continues to have a significant advantage over the rest of the field - as most F1 insiders believed already to be the case.

Rosberg's best time - 0.982s behind Ricciardo - was also set on the medium tyre.

The German stopped running at lunch time to rest a neck injury and handed over to Hamilton, who had only partially recovered from a fever that curtailed his running on Thursday.

All the teams confirmed as participants in this year's championship are at the test, where Britain's Jolyon Palmer was getting his first taste of the new Lotus.

The GP2 champion, the team's reserve driver, was seventh fastest.

Pre-season testing times are unreliable indicators of true competitiveness as the teams do not publish the fuel loads they are using, which have a dramatic effect on lap time.

FASTEST TIMES, SECOND PRE-SEASON TEST, DAY TWO, CIRCUIT DE BARCELONA-CATALUNYA