The Occupational Safety and Health Administration is heading toward what could be the most serious test in Congress in its controversial 10-year history.

A Senate bill to curtail OSHA's powers to conduct routine workplace safety inspections has sent shivers through the agency and rekindled the business community's hopes of finally taming one of its least favorite bureaucracies.

Organized labor has mounted a ferocious lobbying campaign against the measure, which one union went so far as to label a "license to maim and kill."

Exaggerated as that may be, the proposal would alter OSHA's basic charter for the first time by exempting from routine safety inspections all employers whose workplaces have good safety records, as measured by workers' compensation cases.

It would free roughly 90 percent of all job sites from regular inspections, according to Sen. Richard S. Schweiker (R-Pa.), chief sponsor of the measure, and thereby target OSHA enforcement efforts more directly on the most hazardous workplaces.

Critics, however, charge that it would relax pressure for voluntary compliance with OSHA's safety standards. They also say the bill might acquire more-crippling amendments as it goes through Congress.

Reasons for OSHA's anxiety over the proposal include the general anti-regulation climate in Congress, OSHA's early history of regulatory pettiness, and the fact that the bill has been co-sponsored by some liberals, including Sen. Harrison A. Williams (D-N.J.).

Williams was a chief sponsor of the 1970 legislation to create OSHA as the government's workplace watchdog agency. Now he is chairman of the Senate Labor and Human Resources Committee, which has headed off most past anti-OSHA moves.

Williams signed onto this year's bill in part to head off more extreme proposals, according to aides. "He saw the bill as retargeting OSHA without cutting the heart out of it," said an aide.

For a time, the Senate measure also had two other liberal Democratic co-sponsors, Majority Whip Alan Cranston (Calif.) and Gaylord Nelson (Wis.), both of whom are up for reelection this year. But Nelson backed off, and Cranston has said he opposes action on it until a better system is developed for measuring workplace safety.

The outcry from organized labor is credited not only with cooling Nelson's and Cranston's enthusiasm, but also with keeping other liberals from climbing aboard this particular curb-the-regulators bandwagon.

Labor's lobbying has been so intense that Schweiker was moved in a speech to business representatives to complain that "initial knee-jerk paranoia" has given way to a "concentrated holy war." He cited a United Electrical Workers union claim that the bill would "turn OSHA into a coroner's office" and a United Steelworkers of America appeal to "kill the Schweiker bill before it kills you."

Moreover, complained Schweiker, United Auto Workers locals in Pennsylvania circulated FBI-style "wanted" posters with his picture and address. This resulted in 120 people showing at his house when he was gone and "picketing" my 85-year-old father."

He also cried foul at a union allegation that he introduced the bill because of a recent OSHA citation against a tile company founded by his father. He said the citation came long after he began to work on the bill, and was directed at health problems, which are not covered by the measure.

All sides in the dispute, including OSHA and the unions, agree that the agency should concentrate on the most hazardous workplaces. OSHA points out that it is doing this already on its own, but says it needs the flexibility and deterrent effect of broad inspection authority -- "like an IRS audit or motor vehicle inspections," said Basil Whiting, deputy chief of OSHA. But Schweiker argues that OSHA isn't targeting enough on the most dangerous jobs, in effect suqandering two-thirds of its enforcement capability.

Last year, Schweiker and others succeeded in attaching a rider to an appropriations bill that exempts businesses with 10 or fewer employes from routine safety inspections for the 1980 fiscal year. But it did not affect OSHA's permanent legislation or impede inspections of larger workplaces. Health inspections and inspections prompted by injuries would not be curtailed by the proposed legislation, although a complaint of unsafe conditions could not be investigated before an employer was given a chance to correct the problem.