French voters today dealt the 10-month-old coalition government a mild setback in local elections marked by a conservative comeback and further serious decline in the strength of the Communist Party.

The first major popular test of strength since the Socialist landslide victory last year was seen as a rebuke for the government, which critics have accused of inconsistency, floundering and indecisiveness since taking power.

The Communists' and Socialists' poor overall showing in the cantonal, or local, administrative elections does not directly affect the coalition's ability to govern. The Socialists hold an absolute majority in the National Assembly, which is not up for election for another four years. President Francois Mitterrand's term expires in 1988.

With results still far from complete, computer projections credited the left with 47.5 percent of the vote and the conservatives with 51.5. The remaining votes were scattered among splinter party candidates.

Former president Valery Giscard d'Estaing, a centrist, was elected with a record 72 percent of the vote to a seat in the cantonal council representing his home town of Chamalieres in south-central France.

Nicholas Wahl, a prominent American specialist in French politics who teaches at New York University, noted that the results "may be the best thing for the Socialists. It is very important that they get a bit of a scare and realize that the mandate of heaven can be withheld."

Neo-Gaullist leader Jacques Chirac, the mayor of Paris, hailed the voting as a "stinging failure" for the ruling coalition. Socialist and Communist leaders admitted their inability to mobilize voters.

Last year the Socialists won 37.5 percent of the vote in the first-round legislative elections as many conservatives crossed over and voted for them to ensure that Mitterrand would control the National Assembly without being dependent on a coalition including the Communists.

Helping the conservative showing today was a vigorous campaign and the decision by the two major conservative parties to run single candidates in three-quarters of the 2,029 voting districts with contests.

Despite the overall conservative victory the Socialists did better than ever before in cantonal elections, capturing about 30.5 percent of the vote, according to the computer estimates.

But if the Socialists confirmed their position as the biggest party in France, their Communist partners continued a now three-year-old electoral decline.

Computer projections showed the Communists had dropped from more than 22 percent to 16 percent of the total vote between the last cantonal elections in 1979 and today.

The Communist decline was all the more marked since traditionally they have done better in such local elections than in legislative races and this time they fielded candidates in every voting district.

The turnout today was a record, with abstentions down to 29 percent of eligible voters. That reflected both the opposition's hard-hitting campaign and the voters' knowledge that the Socialists' new decentralization reforms will give local councillors real political and financial powers for the first time in French history.

Although public attention focused on the raw percentage swing in favor of the conservative opposition, the political stakes will not become clear until next Sunday. Then runoff elections will be held in those districts where no candidate won an outright majority today.

At stake is the leadership in the councils in each department, or county, which will assume much of the power the central government has exercised through its appointed prefets over the past two centuries.

The Communists' decline, if confirmed in next year's more important municipal elections, or in the legislative contests in 1986, could shake the basis that allowed the Socialists under Mitterrand to put together a viable left in France.

Mitterrand took a moribund anticommunist left, entered into alliance with the Communists as minority partners and in a string of elections gradually outdistanced the Communists and thus ousted the right, which had ruled France for 23 years.

But changes in French society--and the Soviet Union's foreign policy, especially in Poland--have eaten away at Communist strength in France.

Communist leader Georges Marchais won only 15.34 percent in the presidential race against Mitterrand and conservative candidates in 1981. Communist candidates could do no better than 16.12 percent in last June's legislative elections, less than half the Socialists' exceptional 37.77 percent showing.