More than 7,000 people, including most of Maryland's campaigning politicians and many wealthy members of its business community, attended a testimonial here tonight for Mayor William Donald Schaefer.

The event, coupled with a smaller gathering earlier tonight, is expected to break the record of $917,000 raised at a 1973 fund-raiser for then-Gov. Marvin Mandel and other candidates. Robert S. Hillman, organizer of tonight's festivities, said 8,000 $100 tickets to the gala at the Convention Center were sold in addition to 500 tickets at $500 apiece for the earlier reception.

Billed as a salute to Schaefer's 30 years in public office, the fund-raiser was widely viewed as forming the basis for his expected candidacy for the Democratic gubernatorial nomination in 1986.

"I'd love to see him be governor," said developer James W. Rouse, introducing Schaefer at an early evening reception at the Omni International Hotel.

"I subscribe to everything that you said," Schaefer said in response. That was the nearest he was to come all night to a public announcement of his intentions.

In his Convention Center remarks, which he delivered standing beneath a gigantic screen that flashed colored slides of himself and of the city he has led as mayor for 14 years, Schaefer praised his political supporters, called for state unity and even remarked on the aproaching hurricane that his organizers said kept some Eastern Shore supporters away.

Among those on hand tonight were Sen. Paul Sarbanes, Reps. Michael Barnes, Steny Hoyer and Barbara Mikulski, and Bullets basketball player Tom McMillan and state Del. Robert Neall (R-Anne Arundel), who are both hoping to succeed retiring Republican Rep. Marjorie Holt.

Also attending were such old Schaefer friends as former governor Marvin Mandel and master fund-raiser Irvin Kovens, who along with Mandel was convicted on corruption charges in 1977.

Baltimore City Council President Clarence H. (Du) Burns was one of the few campaigning politicians who made no bones about one of the reasons he was there.

"In order for me to run for mayor," Burns offered, "I've got to make sure this guy is the governor."

Others, such as state Senate President Melvin A. Steinberg, also said they were there to cover all possible bases.

"You never know who's going to be governor," he reasoned. "You have to be familiar with all of the job candidates."

The scene in the cavernous convention hall featured three bands, bunches of balloons and large black-and-white portraits and a bronze bust of the mayor.

There were some who were less than enthusiastic about Schaefer. University of Maryland law professor Larry Gibson, who is an outspoken supporter of Democratic gubernatorial candidate Stephen H. Sachs, refused to say why he was there, but watched the scene closely.

And Annie Chambers, an East Baltimore welfare rights activist, said that she did not pay $100 for her ticket because "I wouldn't give him $100. This is a disgrace with people starving in this city." She said she was given the ticket.

The largely business crowd that ate hors d'oeuvres and shook Schaefer's hand at the hotel reception included Montgomery County builder Nathan Landow and Crown Petroleum head Henry Rosenberg.