The new F35 fighter has been nine years in development. Aviation Week estimates that they have 6 more years of testing to go. So far 600 test flights have been accomplished. Over the next 6 years 7800 more test flights will be flown. That's a helova lotta test flights. My old Air Force fighter squadron (20 aircraft) only flew 3000 sorties a year.
A lot of this test flying is for the airplane's software. F35 has 8 million lines of code integrated and flying, and another 4 million lines to go. Software is released in blocks. Block 0.35 is flying and only provides basic "aviate and navigate" functions. Block 1 (which requires a hardware upgrade) does "sensor fusion" what ever that might be. Block 2 integrates weapons and datalinks, Block 3 is the final release. Sounds like we don't have a real fighter until block 2. Not much use to a fighter that can't launch weapons.
You have to wonder how much of this software is really necessary. For instance the Air Force was happy with the quality of the synthetic aperture radar maps returned from test flights. Mapping is not a core mission of fighters, we have recon aircraft and satellites to do that. Expensive fighters ought to be used go gain air superiority (shoot down enemy fighters).
By the time all the testing is finished and the F35 can go into mass production and squadron service the damn thing will be obsolete.