New York City’s teachers union has filed their first public complaint under a new contract, officials said Wednesday, focusing on a handful of schools that have long exceeded class size limits.

The dispute centers on five high schools that have had chronically overcrowded classrooms for at least four of the past six years. Under the contract, most high school classrooms should be capped at 34 students.

Union officials said class sizes at the five schools had reached 38 students in some cases, but did not provide breakdowns for each school. The five schools include: Benjamin N. Cardozo High School, Francis Lewis High School, and Academy of American Studies, all in Queens, and Leon M. Goldstein High School and Secondary School for Journalism, in Brooklyn.

Class size complaints are common among teachers nationally, and the United Federation of Teachers, which represents roughly 79,000 classroom teachers, files hundreds of them every year. But union officials see the latest round of class size complaints as a test case for new contract provisions that are supposed to speed up a process that can often take months before an arbitrator hears the case.

“The schools on this list have a history of ignoring [class size] limits, and under our new contract we can now begin a faster process of getting all class size complaints resolved,” union president Michael Mulgrew said in a statement.

Under the old system, class size complaints could languish for many months before being heard by an arbitrator, officials said, whereas the new system is meant to spur an agreement before that stage. Union officials, who spoke on condition that they not be named, said they hope the latest complaint could be resolved in a matter of weeks without an arbitrator weighing in. (Officials said a bigger test will come in September, when the lion’s share of class size complaints are typically raised.)

Whether the new process has a big impact on class sizes at individual schools or moves the needle systemwide remains to be seen. Cardozo High School, for instance, has been the subject of previous class size complaints.

Arthur Goldstein, a teacher at Francis Lewis high school, said class size issues have been pervasive since he became the union chapter leader a decade ago.

“We’ve done grievances twice a year every year,” he said, adding that the “action plans” created to resolve complaints under the old contract often did not result in class size reductions. “To allow more than 34 kids in a classroom is unconscionable.” He said he’s hopeful the new process will put more pressure on administrators to act quickly.

Education department officials acknowledged that class size limits may have been exceeded by “one or two additional students” in some cases at the schools referenced in the complaint. Francis Lewis and Academy of American Studies are adding hundreds of students worth of capacity through building additions, the official said.

“We’re working with these five schools to review and reduce class sizes as needed at the beginning of the new semester,” education department spokeswoman Danielle Filson wrote in an email. She noted the city has committed to creating 57,000 new school seats through its capital plan over five years.

Still, Leonie Haimson, executive director of the advocacy group Class Size Matters, said city data shows hundreds of classrooms have exceeded the cap, and that the administration has not taken an aggressive stance on the issue.

“The class size caps are too large and haven’t been lowered,” she wrote in an email.