While Dr. Herman Tarnower was still clinging to life, his housekeeper told police that his longtime companion, Jean S. Harris, had shot the famous Scarsdale diet author, the first officer to arrive at the scene of the March 10 slaying testified today.

The testimony in the Westchester County Courthouse here came during pretrial hearings to determine the admissibility of incriminating statements allegedly made by Harris on the night the doctor lay dying from four gunshot wounds on the second floor of his $500,000 home in Harrison, N.Y.

The hearings also are to decide whether the alleged murder weapon, a .32 cal. pistol recovered from the front seat of Harris' car, can be used as evidence at her second-degree murder trial, scheduled to begin Oct. 27. Harris, free on $40,000 bond, has pleaded not guilty.

During more than two hours on the stand today, patrolman Brian McKenna, 34, told how he, with Harris "somewhere alongside me," encountered the housekeeper, Suzanne Vandervreken, in the foyer of the Tarnower home shortly after the shooting. "The housekeeper was now telling me to hurry, hurry up," McKenna testified. "Help the doctor. He's been shot."

The officer said he then asked Vandervreken who had done the shooting. "His girlfriend," McKenna said she replied.

"She looked at Mrs. Harris," he added.

McKenna said he then rushed up to Tarnower's bedroom to try to revive the doctor with oxygen equipment. "I was very busy at this time trying to get the doctor to start breathing," he said.

The 57-year-old defendant, former headmistress of the Madeira School for Girls in McLean, Va., appeared calm throughout today's proceedings. Her composure was in marked contrast to her behavior Thursday, when she pounded the defense table and accused Assistant District Attorney George Bolen of lying. Today, smartly dressed in a tweed suit with a fur collar, Harris sat quietly, taking notes on a yellow legal pad.

Thursday's outburst came while Bolen was defending the legality of a police search of her McLean home the day after the slaying. "I want to know who the liar was," she demanded of the prosecutor. "Why is he permitted to lie?" she asked later, during a recess.

Harrison police detective Arthur Siciliano, another early arrival on the scene, swore Thursday that Harris admitted the shooting that night. Siciliano testified to the following conversation between him and Harris.

"The doctor's been shot."

"Where is he?"

"Upstairs."

"Who did it?"

"I did it."

According to Siciliano's testimony, Harris told the 30-year police veteran that she had driven from Virginia "with the hope of having Dr. Tarnower kill her." During a struggle, he quoted her as saying, "I asked him to kill me, but he said, 'Get out of here, you're crazy'. . . . I remember holding a gun and shooting him the hand. He wanted to live. I wanted to die. I've been through so much hell with him. He slept with every woman he could. I'd had it."

McKenna's testimony came under cross-examination by defense attorney Joel Aurnou, who apparently was trying to establish that his client was already a suspect soon after police arrived on the scene. McKenna said he was on patrol in a radio car shortly before 11 p.m., when he received a transmission that there was a "burglary in process" at the Tarnower residence.

He testified that, while on his way to the location, he spotted an auto with Virginia license plates making a U-turn in his path and that he followed the car into the Tarnower driveway. Harris got of the car, McKenna said, and approached him.

"Someone's been shot, he's been shot, he's been shot, hurry up," McKenna quoted Harris as saying.

Then they both entered the Tarnower vestibule, where they encountered the housekeeper, he said.

The hearings, before Judge Russell R. Leggett, are scheduled to continue Tuesday.