Since the Soviet invasion of Afghanistan, the Italian Communist Party has been moving out of the Soviet orbit at such breakneck speed that its membership and the professional analysts have been having trouble keeping up.

A major test of whether party leader Enrico Berlinguer can maintain his rapid pace of evolution into the Western camp comes Sunday and Monday in Italian regional and municipal elections.

If the Communist Party manages to hold 30 percent of the electorate, Berlinguer can afford to continue on his present foreign policy course. If not, he will be open to challenge from the party's powerful pro-Soviet elements who make little secret that they are waiting for him to stumble.

Berlinguer has been devoting much effort to establishing the party as an acceptable working partner for the socialist and social democratic parties of Western Europe. The Italian Communists call this approach the "Euroleft" to set it apart from "Eurocommunism," a policy the Italian party concedes has been robbed of much meaning by the French Communist Party's return to the Soviet fold.

This stress on the Euroleft, symbolized by heavily publicized meetings between Berlinguer, West German Socialist statesman Willy Brandt and French Socialist leader Francois Mitterrand, is the Italian leader's answer to the blocking of the "historic compromise" that was supposed to bring the Italian Communists to power in partnership with the dominant Christian Democrats.

After Afghanistan, a Christian Democratic congress surprised most observers by voting by an overwhelming 58 percent against continuation of the "historic compromise" policy. The top Christian Democratic leaders have indicated, however, that they are prepared to resume cooperation with the Communists when conditions are again ripe.

Meanwhile, a highly respected member of Parliament who belongs to neither of Italy's top two parties, said: "The Communists think that at the end of this priod of internatonal crisis, they'll be ready to join the government, having demonstrated their independence from Moscow. They are trying to enter the Italian government through the European gate since that one is closed for now."

This translates into big moves, such as voting for the European Parliament resolution condemning the Soviet action in Afghanistan as "imperialism" -- a word that used to be reserved in the Italian Communist vocabulary for American actions. It also means intensive Italian Communist participation in the committee work of the European Parliament, in sharp contrast to the absence of French Communist representatives.

The Italian Communists also are working hard to make themselves as acceptable to the United States, an effort which the U.S. Embassy in Rome does not want to recognize.

With President Carter scheduled to make a state visit to Italy in two weeks, the perennial question of Washington's attitude toward the Italian Communists seems bound to come under discussion. The Communists concede privately that they can not expect the Carter administration to lift its disapproval of Communist participation in the Italian Cabinet during a U.S. presidential campaign. But they would like more recognition for their revolution.

The process of the Italian party's legal separation from Moscow has been fitfully going on for years. As long as Berlinguer remains in control of the West's largest Communist party, with 1.7 million members, the distancing seems likely to continue.

U.S. Embassy officials accuse the Italian Communists of favoring a third way between East and West that amounts to detaching Western Europe from the United States -- a development that they see as only serving Soviet interests.

As if to answer that objection, one of the party's top foreign policy spokesmen recently told the Italian Parliament that his group regards Washington as an ally, although it reserves the right to criticize the United States.

The Italian Communists will openly say that they are trying to model their positions on those of West German Chancellor Helmut Schmidt.

On the key issue in Europe today -- the stationing of U.S. missiles on the continent, the Italian Communists have come around to the Schmidt position, which is acceptable to Washington. This position is to use the three years before the missiles are ready for deployment to negotiate a reduction in the alredy existing Soviet missiles.

An Italian Communist foreign policy spokesman recently told a correspondent that the party opposes any unilateral reduction in the U.S. military presence in Italy because that would have a destabilizing effect on the international power balance. The party used to advocate drastic cuts in the size and number of U.S. bases in Italy.

"One would have to be blind to deny that some important changes have recently taken place," a U.S. official conceded.

"No doubt they are trying to liberate themselves in a tortured way from their traditional links with the Soviet Union. That is a necessary but not a sufficient condition for the United States to reconsider its policy against them. But if they are evolving toward a "third force" position that means the Finlandization of Europe and its detachment from the United States, that could be worse. After all, Italy today is a strong member of NATO, and we need our bases here more than ever," he said.

The Communits want neutralism inside NATO. We want more than nominal Italian membership. We want support for major NATO modernization programs. I don't care what the Italian Communist call themselves. We judge them by what they do, not what they say, and that's bad," the official added.

Embassy staffers admit that they do not try to analyze such political realities so much as keeping track of traditional party anti-American rhetoric in a frequently updated "Blue Book" that is periodically distributed to U.S. congressmen and officials.

This approach ignores the extent to which Berlinguer has been braving internal opposition from elements attached to Moscow. Armando Cossuta, the leading pro-Soviet voice in the party leadership recently laid the groundwork for a challenge to Berlinguer.

Cossuta wrote an article in a party publication with a string of quotations by aged party president Luigi Longo warning that a break with the Soviets would be like a break with oneself and that the party's need for autonomy must not lead to anti-Sovietism.