The Supreme Court, ruling in a Virginia discrimination dispute, unanimously upheld yesterday the right of fair housing investigators to sue real estate operators for alleged racial bias.

The decision, viewed as a victory by national civil rights organizations, is expected to make it easier for fair housing groups to take action against landlords and real estate dealers whom they suspect of discriminatory practices.

The court's ruling focused on a controversial technique, the use of "testers." Frequently fair housing groups send testers, investigators who pose as prospective renters or home buyers, to check a real estate dealer's racial policies. If a dealer offers a home to a white tester but denies one to a black tester, a fair housing group may cite this as evidence of illegal discrimination.

In yesterday's ruling, written by Justice William Brennan, the court held that a tester has the right to sue a real estate firm for alleged bias even if the tester had no intention of buying or renting a home and did not live in the community where the allegedly discriminatory practices occurred. A tester has legal "standing," the right to sue, solely if the real estate operator gave false information, the court ruled.

"Congress has . . . conferred on all 'persons' a legal right to truthful information about available housing," Brennan wrote.

"A tester who has been the object of a misrepresentation . . . has suffered injury in precisely the form the statute was intended to guard against, and therefore has standing to maintain a claim for damages under the 1968 Fair Housing Act's provisions.

"That the tester may have approached the real estate agent fully expecting that he would receive false information, and without any intention of buying or renting a home, does not negate the simple fact of injury within the meaning of the law ."

Civil rights lawyers described this aspect of the court's complex ruling as a key decision.

"It's the first time that the Supreme Court has recognized that," said Norman J. Chachkin, deputy director of the Lawyer's Committee for Civil Rights Under Law. "That's very good news for all the fair housing groups around the country that use testing."

Bruce S. Gelber, assistant general counsel for the National Committee Against Discrimination in Housing, said the court's decision to grant testers the right to sue may benefit fair housing groups in several ways.

Often, he said, prospective home buyers or renters do not realize that they are dealing with a discriminatory real estate firm. Sometimes they are too frightened to sue, he added, or they may be too busy searching for housing elsewhere to engage in a legal battle.

In such instances, Gelber said, the court ruling makes it easier for fair housing groups to begin legal action to try to curb discrimination.

The decision stemmed from a novel ruling by the 4th Circuit U.S. Court of Appeals in Richmond, which the Supreme Court only partly upheld. The appellate court's broad ruling alarmed the real estate industry. The 600,000-member National Association of Realtors charged that it had created an "instrument of legal harassment" that might be used to coerce real estate firms into accepting unwarranted settlements to resolve bias claims.

Yesterday, William D. North, senior vice president and general counsel for the Chicago-based realtors' group, described much of the Supreme Court decision as "not helpful" to the industry, but he added that he saw "a hopeful sign" in one part of the ruling.

The court held it was "implausible" to argue that alleged discrimination by one moderate-sized real estate firm could damage residents throughout a community as large as the entire metropolitan Richmond area, where the lawsuit arose.

The dispute stemmed from a series of incidents in 1978 in which a suburban Richmond apartment owner was accused of illegally "steering" prospective renters by referring blacks to a predominantly black building and whites to a mainly white one. The firm, Havens Realty Corp., was found guilty of race bias in a parallel lawsuit and ordered to create a $13,500 fund to compensate victims of its discriminatory practices.