Correction Appended

For more than eight years, black police officers in New York City have fought a series of legal battles challenging the sergeant's test, saying it discriminated against blacks.

Now black transit police officers are fighting to keep the most recent test from being thrown out, after city investigators claim to have found evidence that a handful of black officers cheated by obtaining test questions in advance.

This reversal has come about because after years of below-average performances, black transit police officers did relatively well on the latest exam, which was given last February.

The allegations of cheating and the cancellation of the test results have left many minority officers frustrated and angry that their hopes of promotion have been quashed by a secret Department of Investigation inquiry that they know nothing about. 'Studied and Studied'

"The test has been thrown out, but no one has proved there were improprieties," said Sgt. Lloyd Finley, president of the Transit Police Guardians, a fraternal group of black officers. "This time our officers sat down and studied and studied and studied."

Soon after the test was given in February allegations surfaced that a handful of black transit police supervisors -- two lieutenants and a sergeant --obtained copies of some test questions and circulated them among members of the Transit Police Guardians, city officials said. Many of the allegations came from white officers who took the test.

The transit police internal affairs division and the city's Department of Investigation began an inquiry, calling at least seven black test-takers in for interviews, officials said.

City officials familiar with the inquiry said the city investigators found evidence that the test had been compromised because at least three ranking officers had leaked test questions to a small study group of minority officers. The Investigation Department turned the case over to the Manhattan District Attorney's office, which is still looking into the matter.

But no one has been arrested on criminal charges or suspended. A senior law-enforcement official said the main target of the investigation is Lieut. Michael Gordon, a black commander assigned to District 1, at Columbus Circle, along with several other officers. Impression of Bias

Still the city's Personnel Commissioner, Douglas H. White, a former State Commissioner of Human Rights, decided to nullify the test results on Sept. 13, in light of the Investigation Department's initial findings.

The lack of information that has been released about the inquiry has left black officers with the impression that their members were selected for investigation because of their race, several officers said yesterday at a protest outside City Hall.

More than 1,850 transit officers took the test on Feb. 2. Of them, 434 white, 247 black and 46 Hispanic officers passed. At present, 31 of the 354 sergeants in the subway system are black. A new test will be offered on Feb. 1, 1992.