The falcon 9 succeed on it's first launch, it was not a test flight heavy program.
The falcon 1, SpaceX's only orbital rocket prior to the falcon 9, did fail on it's first three flights, however it was never intended to and that nearly bankrupt the company. They destroyed third party payloads on flights 1 and 3, because these were intended to work, not be test flights.
Long after it was in production the falcon 9 did begin a "test-flight" heavy program, but that was for developing the ability to recover boosters after they had successfully delivered a customer payload in an operational flight, not for developing the rocket itself.