The controversial admission test for eight elite public high schools will be offered at more than 50 middle schools this fall after efforts by Mayor de Blasio to scrap it failed, The Post has learned.

The Specialized High School Admission Test (SHSAT) will be given to eighth-graders at 55 locations across the city on Wednesday, Oct. 30, during the school day, a principal told parents in a letter.

In the past, the test for entrance to the eight specialized schools, including Stuyvesant, Bronx HS of Science and Brooklyn Tech, was administered on weekends at only a handful of sites.

In 2016, the Department of Education started the “SHSAT School Day” pilot program to give the test during school hours at seven sites. The sites grew to 15 in 2017 and 50 last year.

“Having the test in more locations and available to more students is good for everybody,” said Wai Wah Chin, president of the Chinese American Citizens Council of Greater New York, which has fought against elimination of the exam.

“The question is,” she asked, “How do you roll it out properly?”

Chin said that logistics should be worked out weeks in advance if the DOE plans to administer the free test during the week.

“They have to make sure that the tests don’t disrupt students if they are held during the school day,” she said. “When it comes to logistics, the DOE doesn’t always get it right.”

The test will also be given on Oct. 26 and Oct. 27, a Saturday and Sunday, respectively, at several sites to be announced.

A commercial test-prep maven hailed the testing push.

“This is amazing news,” said Frances Kweller, a lawyer and educator who runs Kweller Prep, a tutoring company that prepares students for academic entrance exams, including the SHSAT.

“Students previously had to travel to central testing sites and wait on long lines just to enter the school they were assigned to,” Kweller said. “Now, 55 public schools will allow students to test in a familiar setting and on a weekday. Many students can benefit from this change.”

Over the last few months, Mayor de Blasio and schools Chancellor Richard Carranza led unsuccessful efforts to end the single-test entrance system to the elite schools. They want to replace it with a plan to admit the top students from every middle school.

That would sharply increase the number of black and Hispanic students in the schools and slash the number of Asian-American and white kids.

A bill to eliminate the SHSAT at Stuyvesant, Bronx Science and Brooklyn Tech died in Albany earlier this year. Current law does not prevent the mayor or chancellor from changing admission rules at the five other specialized schools, but so far they have refrained from doing so.