A proposal to require Virginia public school students to pass a test before being promoted from one grade to the next and before receiving a high school diploma was attacked yesterday by teacher and parent representatives during a public hearing here.

The proposed high school competency test requirement mirrors an existing regulation adopted by the State Board of Education over a year ago, but would give the requirement the force of law as opposed to a regulation, that is easily changeable. Adoption of high school competency tests is a trend in many areas, a response to what has become known as "rubber diplomas" and test results showing that many high school graduates cannot rad or do simple mathematics.

Neither the Board of Education's regulation nor the proposed law would take effect until 1981.

The test is one of several proposed changes in the state's "standards of quality" law that states educational policy and objectives. Changing the "standards of quality" is a nearly annual event during the General Assembly.

Among other proposed changes are:

Increasing the number of teachers from 48 for every 1,000 children to 54 per 1,000. School board representatives complained that would cost localities between $3.5 million to $45 million.

Requiring each school district to conduct "an assessment" of student conduct and attendance by 1979, and a conduct code by 1980.

Requiring teachers to have certificates renewed every five years, and that teachers have "a period of extensive supervised classroom experience" before being hired.

Those who object to the proposed test requirements said they could eliminate students who are capable of doing adequate school work but unable to pass tests.

Mary Hatwood-Futrell, president of the Virginia Education Association, said the tests "could create some dangerous pitfalls." She urged that the requirement not be adopted unless remedial alternatives are made a part of the law.

J. A. Simones of the Virginia Association of School Administrators said the requirement to take a test before being promoted to the next grade would result in segregation; "segregation on the basis of an elitist philosophy which at best protends to group the intellectually advantaged apart from the intellectually and functionaly disadvantaged."

In another development, the House General Laws Committee narrowly reported out a bill sponsored by its chairman, Thomas W. Moss (D-Norfolk), that would void ordinances in Fairfax and Loudoun counties that require deposits on soft drink containers. The bill also would prohibit all Virginia localities from enacting such laws.

Although the bill was sent to the House, its opponents were gratified by the close 8-to-6 vote. "We picked up some votes I didn't expect," said Sen. Charles L. Waddell (D-Loudoun), one of the leaders in the container-deposit drive.

Moss said the local soft drink ordinances are "oppressive to one industry which has been singled out."

The ordinances were limited to soft drinks because Loudoun Circuit Court Judge Carleton Penn ruled in 1976 that localities do not have authority to put deposits on beer containers. Such power, he said, belongs to the Alcoholic Beverage Control Commission.

Waddell, heading a list of speakers against the Moss bill, said: "This bill is among the worst I've seen this year or any year. (It) serves only to further dilute the prerogatives of local government."

During the hearing, Moss and Del. Warren E. Barry (R-Fairfax) attacked the effectiveness of the Fairfax and Loudoun ordinances, quoting maintenance officials of the Virginia Department of Highways and Transportation as saying that roads had as much litters as they ever had. Barry also said that because of reduced soft-drink sales, Fairfax could lose up to $1 million in sales tax revenues returned to the county.

Supporters of the local ordinances said it was too early to tell if the controls were reducing litter.

The Senate is considering two bills that would put statewide deposits on both soft drink and beer containers, and Waddell has a bill that would permit localities to put deposits on eer containers.