Are test pilots certified to fly all aircraft types?
Since you didn’t specify a jurisdiction, I’ll answer for the FAA. Others should be similar.
Pilots must be rated for the category, class and (if applicable) type of aircraft. Category is pretty broad, such as “Airplane”. Class is a bit more specific, such as “Multi-Engine Land”. Type is even more specific, such as “Boeing 737”.
A type rating is required for any type that:

has a Maximum Takeoff Weight (MTOW) of 12,500 pounds or greater, or
has one or more turbojet engines, or
has been designated by the FAA.

There is no limit to the number of ratings a pilot can have, aside from the time, money and skill required to pass a checkride for each one. However, type ratings are only available for certified aircraft.
For experimental (non-certified) aircraft, since no type ratings exist, the FAA can issue a Letter Of Authorization (LOA), which waives the type rating requirement for specific pilots in a specific plane for specific purposes, such as flight testing, training or demonstration.