Hamilton had to cut short his session on the first day as he complained of a fever and his reappearance for the afternoon runs at the Circuit de Catalunya came as something of a surprise to the fans and media following proceedings.
He duly completed 89 laps and ominously for Mercedes' rivals for the upcoming season set the fifth fastest time, despite running on slower medium compound tires.
The 30-year-old Briton was just over a third of a second slower than the one minute 24.574 seconds posted by Ricciardo, who set the time on a soft tire, generally reckoned to be about one second faster per lap than the medium.
Hamilton's teammate Nico Rosberg had taken the wheel for the morning session and completed 66 laps -- eventually finishing sixth on the time sheets, with his best lap also set on the medium tire.
Rosberg, troubled by a neck injury Thursday, had double reason to celebrate his promising showing as he announced on social media that his wife Vivian was expecting their first child.
While Mercedes appears set to continue its 2014 dominance into the new season, it was undoubtedly an improvement for Ricciardo and Red Bull, as the Australian attempted to simulate race conditions and totaled 143 laps over the two sessions, the most by a single driver on the second day.
Ferrari -- so off the pace in Fernando Alonso's final season with the famous marquee in 2014 -- has also found encouragement from the two pre-season tests to date and Kimi Raikkonen was second fastest behind Ricciardo.
Third best was the Williams of Felipe Massa, with less than a tenth of a second separating the top three. Sergio Perez was fourth fastest in the year-old Force India VJM07.
With the first race of the season less than a month away from March 13-15 in Australia, time is running out for team's struggling with their 2015 cars, not least CNN-sponsored McLaren-Honda, with former world champions Alonso and Jenson Button in its driver lineup.
Alonso, who has switched from Ferrari, was finally able to get some meaningful action under his belt with a total of 59 laps and the seventh fastest time.
McLaren's MP4-30 is using cutting edge technology combined with a new Honda engine, but there have been extensive teething problems.
Two sons of illustrious motorsport fathers were also in action Friday. Jolyon Palmer, whose father Jonathan raced in F1, was eighth best for Lotus in his first test at this level.
Carlos Sainz Jr, the offspring of the former world rally champion, drove for Toro Rosso and racked up 100 laps although triggering a red flag when he went off and into the gravel on Turn 9 at the Spanish circuit.
Testing continues for the next two days at the same venue and the teams return from next Thursday for a final four days to iron out problems before the season starts for real.