At a scorching test site along a runway in the Sonora Desert, a team of 500 McDonnell Douglas Corp. employees is racing to obtain government certification of the new MD-11 jetliner before their company runs out of time and money.

The mostly young engineers, technicians and pilots at the desert site outside Yuma, Ariz., are working around the clock in two 12-hour shifts, flight-testing four of the jumbo aircraft. It is one of the fastest-paced certification programs in industry history. And the future of the MD-11 program -- perhaps even the health of the St. Louis-based corporation -- is tied to its success.

So far, the MD-11 flight test program is ahead of schedule in demonstrating the aircraft's flying capabilities but somewhat behind schedule in testing the tricky avionics system in the highly computerized cockpit, McDonnell Douglas officials said in a series of recent interviews.

The MD-11 is a big airplane with a price tag of more than $100 million. But it has sold well. Douglas has various types of customer commitments for 371 of the big airliners, including firm orders for 144 of them. The company hopes to earn a profit on production -- something it never did on the DC-10 program. The MD-11 is a derivative of the veteran DC-10, a three-engine jumbo jet.

The company has set a goal of certifying the aircraft by Oct. 31 and delivering five of the planes this year, which would capture $350 million in cash and abate the ferocious growth in McDonnell Douglas's debt.

"We will obtain certification by then," said Joe Ornelas, the MD-11 flight test manager in Yuma. "The question is whether we will have some loose ends. That is a possibility."

By "loose ends," Ornelas did not mean parts of the airplane but capabilities that do not require immediate certification and will not prevent deliveries to airlines. At St. Louis headquarters, however, executives are exercising somewhat greater caution.

A recently negotiated bank loan has enough flexibility so that the company will not face a liquidity crisis under even "the most Draconian scenario," said Herbert J. Lanese, senior vice president and chief financial officer. By Lanese's handicapping, the company has a 50 percent chance of getting the MD-11 certified by Oct. 31.

"It is important, but not critical," Lanese said in a telephone interview. Without MD-11 certification by late this year or early next year, the company's debt would grow by another $1.2 billion over the current $2.6 billion; but with certification on Oct. 31, the debt would increase by only about $450 million, he said.

The new credit agreement with McDonnell Douglas's lending consortium allows the company to increase its debt to a 1992 ceiling of 1.15 times the sum of its shareholder equity, preferred stock and subordinated debt. Current equity is $3.3 billion; the company has no preferred stock or subordinated debt but is likely to issue some in the future.

"If you look at what I'd consider to be a Draconian scenario, {in which} you wouldn't get certification until March ... that could require an increase of $1.2 billion in our debt," Lanese said.

"We not only can survive the worst-case scenario, we've provided financial flexibility over and above the worst case for us," Lanese said. He added that it would have to be "a very severe problem that would force us into a certification that late."

The company's Douglas Aircraft unit in Long Beach, Calif., has no shortage of severe problems. It posted a pretax loss of $222 million on revenue of $4.7 billion last year and sustained a further loss of $84 million on sales of $1.1 billion in the first quarter of this year.

A massive management reorganization last year, in which all of more than 5,000 executives were forced to reapply for their jobs, has deeply wounded morale. Moreover, the company has had a sharp work force cutback.

Douglas is laying off 4,000 workers and eliminating 3,000 jobs that were assigned to temporary "contract" workers. Those cutbacks have further raised the anxiety of the work force.

"What does it tell you about the company if they suddenly discover that they have 7,000 too many workers?" one aeronautics expert said. "Usually, companies have layoffs when they have a declining workload, but Douglas is having cutbacks when they are facing an increasing workload."

Aerospace analyst Paul Nisbet of Prudential-Bache Securities Inc., who considers himself an optimist on McDonnell Douglas, estimates the company will lose $94 million on sales of $5.3 billion in all of 1990. Paine Webber Inc. aerospace analyst Phil Friedman has projected a $125 million loss at Douglas this year.

The company is behind schedule on all of its major aircraft development programs -- the MD-11, the C-17 Air Force cargo jet and the Navy's T-45 jet trainer, a huge workload that is straining its management resources. Possible cutbacks in Air Force funding for the C-17 pose another threat.

The MD-80, an aircraft that has been produced in its current and earlier forms for several decades, should be a cash cow for the company. But instead, it is another headache.

Last year, McDonnell Douglas forfeited $20 million to commercial customers due to late delivery penalties, internal sources said. About 24 percent of MD-80 deliveries were late.

The extent of its problems often leads to speculation among workers and outside observers that McDonnell Douglas is one step away from writing off the commercial aircraft business and shutting down Douglas, which employs about 35,000 workers in Southern California. One Douglas scientist said recently in an interview that he is involved in an effort to develop a contingency plan for such a shutdown, an allegation that the company denies.

A catastrophic shutdown of Douglas, while not impossible if McDonnell were to face an extreme financial crisis, is clearly not what the St. Louis-based parent of Douglas has been preparing for in recent years.

In each of the last three years, McDonnell Douglas's biggest investments in property, plant and equipment have been in its transport aircraft sector -- Douglas. Last year, it invested $213 million at Douglas.

Senior executives have said recently that the future of McDonnell is Douglas because it provides the balance that will carry the military side of company through the future declines in the Pentagon budget.

But its position in commercial aircraft "has been, for many years, the weaker side of our business," said McDonnell Chairman John McDonnell's letter to shareholders in the company's recent annual report.

In 1989, Douglas's world market share for large commercial jets slipped below 20 percent, putting it for the first time behind Airbus Industrie, the European consortium (measured in terms of the number of seats delivered). Boeing is No. 1 with about 60 percent of the market.

Thus, on one side Douglas faces the Boeing juggernaut, offering a full line of aircraft, a reputation for excellence and a cash hoard of $1.2 billion. On the other side is the Airbus consortium, subsidized by the governments of France, Britain and West Germany and intent on developing its own full line of aircraft.

The company, in short, could sorely use a little luck.