Portugal's young democracy is now undergoing its first major test after the fall this morning of Premier Mario Soares minority government.

Beaten on a confidence vote just before the sun came up, the Socialist leader is expected to continue in office until a successor is found. The end product of a tortuous negotiations between the parties could ultimately result in the return of Soares himself.

Teh central figure in the search for a new premier is a taciturn 42-year-old army general, Antonio Ramalho Eanes. A political figure in his own right, the quiet Eanes is Portugal's first elected president. Under the country's untried constitution, he invited leaders of the four major parties for separate talks at Belem Palace today. From these and future discussions, Eanes hopes to form a government that will last long enough to enact the harsh austerity measures needed to cure the nation's inflationary fever.

There is general agreement here that Eanes behaved with remarkable restraint throughout the weeks of political crisis that brought Soares down. The president sternly resisted efforts by two parties on the Socialists'right the Social Democrats and teh Christian Democrats, who wanted Eanes to press Soares to bring them into a coalition. Eanes insisted it wa sup to the elected politicians to solve their problem, that he would step in only if they failed.

Eanes shrinks from taking power the thinks the constitution does not provide. Characteristically, he told his countrymen today that there was no need for alarm that the fall of a government was a normal occurrence in a parliamentary system.

To underline this relaxed view, he kep his scheduled appointments with foreign reporters, including some from West Germany. Eanes is scheduled to make a four-day visit there on Monday and has given no sign that he will cancel it.

Perhaps the most striking feature of the crisis here is the absence of any rumbling from the army. Portugal's democracy is so fragile that the politicial Democrats, the second party after generals are almost as absorbing a topic as the byplay between parties. A coup of captains and majors overthrew the dictatorship in 1974.

The constitution recognizes their importance by requiring the president to consult with the Council of Revolution, a military watchdog group, before naming a government. But there are no signs yet that the army is upset over Soares's fall or has any intention of getting mixed up openly in the choice of a successor.

Experts here think Eanes now has three principal options as he tries to put together a government lasting perhaps one year before new elections are held. He must first go through the ritual of inviting the leader of the Social Democrats, the secondary after the socialists, to try to form a government. None of the other parties, from the Communists to the Christian Democrats, are likely to give this any support.

A more plausible scenario would involve Eanes calling back Soares and asking him to broaden his Cabinet with some figures to his right. Whether the more right-wing parties, which had been demanding a genuine coalition, would buy this is a big question.

An even bigger question may be the Socialists themselves. In power, they have been squeezing the workers and losing ground in the trade unions to the Communists. Soares might welcome a spell outside government to recapture his strength before the next legislative elections. His agriculture minister, Antonio Barreto, said in an interview, "We are doing more damage to ourselves by sticking in power than we would by getting out."

A second option calls for Eanes to win agreement from the parties on a non-political premier and a Cabinet of people drawn from but not representing the parties. A third possibility to an agreement among the parties on a Eanes-selected Cabinet of nonpolitical experts or technocrats.

Agreement of the parties is essential since any new government must win approval in the National Assembly. There the Socialists have 102 seats, the Social Democrats 73,the Christian Democrats 41 and the Communists 40.

If all the various options fail, weary citizens will go to the polls again to choose a new assembly in an election nobody wants.

It is unwanted largely because the next government must enact harsh measures to win the $800 million that the International Monetary Fund and 14 Western nations are offering to cover Portugal's mounting bills abroad. Just as important as winning agreement among the parties on the names of the next set of Cabinet players, Eanes must also gain approval for the austerity program.

The financial medicine must be tough. This small country of 9 million has rolled up a huge balance of payments deficit of $1.2 billion this year. Inflation is running about 30 per cent and unemployment about 20 per cent. Both are the highest in Western Europe.

Much of the plight here reflects the euphoric excesses that followed the 1974 coup. In the south, Communists inspired farm laborers to seize huge and under-producing estates. The new collectives drove output down even further. Elsewhere, workers grabbed factories and much of their production has fallen too. Soares had been trying to untangle some of the most extreme cases, but this has been another political land mine for him.

All the wheeling and dealing between Eanes and the parties is expected to take several weeks. At best, the hope is that a new government will be install ed by the end of the year.