Lockheed Martin's (NYSE:LMT) F-35 flew its final developmental flight test on April 11, ending 11 years of tests that included 9,200 sorties and 17,000 flight hours through a range of conditions. It's a major milestone for the most expensive weapons platform in history, but challenges remain before the fighter can be declared the success that Lockheed investors hope it will be.

Safe and eventually successful tests

Program officials were understandably cheery in announcing the completion of the last test flight in what is known as the system development and demonstration (SDD) phase of the F-35's life cycle, in which more than 65,000 test points were evaluated. Despite the F-35's bleeding-edge technologies and requirements for vertical landings and other innovations, there have been no injuries or deaths and no aircraft lost during the more than 11 years since the prototype first flew in December 2006.

F-35 landing

An F-35 lands at Naval Air Station Patuxent River in Maryland after a test flight. Image source: Lockheed Martin.

Greg Ulmer, a Lockheed Martin vice president and general manager of the F-35 program, said in a statement: "The F-35 flight test program represents the most comprehensive, rigorous, and the safest developmental flight test program in aviation history. The joint government and industry team demonstrated exceptional collaboration and expertise, and the results have given the men and women who fly the F-35 great confidence in its transformational capability."

With the development testing now complete, F-35 testing will move to a stage where Lockheed will be updating and improving specific components of the aircraft and testing as they go. While the SDD flights are complete, the development phase will continue with an operational test and evaluation followed by a Pentagon decision on whether to go into full-rate aircraft production.

Issues remain

While the F-35 development wins high marks for safety, there has been plenty of drama along the way. Program costs, including bottlenecks in the supply chain, spiraled far beyond initial expectations, so much so that the Pentagon was forced to reassess whether to continue development in 2010.

More recently, F-35 shipments were halted last year due to corrosion around fastener holes. Lockheed and the Pentagon quickly figured out how to resolve the issue, but the Department of Defense (DoD) this month has again stopped accepting new plane deliveries because of a dispute with Lockheed Martin over who will pay for the fix. An annual report from the DoD's testing unit called efforts to improve the reliability of the fighter "stagnant," saying the jet's availability for missions when needed stands at about 50%.

Costs continue to be an issue. Pentagon officials in March expressed frustration over the pace of negotiations over the next batch of F-35s to be ordered, and the government warned it could be forced to cut its total F-35 order by as much as one-third, or about 590 jets, due to the high costs of operating and maintaining the aircraft.

Lockheed is in a tough situation when it comes to pricing. With each batch of jets expected to be priced at a discount to the previous order, the company must be careful not to give up too much too soon and jeopardize total program profitability. But with President Donald Trump leading a chorus of critics of F-35 costs and praising lower-cost alternatives from Boeing, the company is in a tough negotiating position.

A success, but how much of a success?

Lockheed shareholders can raise a toast along with company officials in celebration of the milestone, knowing the F-35 is a lethal war machine and that there are no worries that the F-35 could simply be a dud. But while it seems certain that the F-35 will command skies all over the globe for decades to come, unfortunately the overall profitability of the plane for Lockheed during that time period is much less clear.

Lockheed Martin knew it was taking on a challenge when it beat out Boeing to produce the most sophisticated warplane ever built, a program expected to generate more than $1 trillion in revenue for suppliers over the course of this century. With challenges come setbacks, and unexpected expenses.

Failure of the F-35, however remote the possibility, would have been a catastrophe for Lockheed. Fortunately, that outcome is now off the table. But until the company finds a way to work out the cost issues and demonstrate it can sustain margins on the F-35 despite Pentagon pushback, F-35 milestones are no reason to buy Lockheed shares.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.