Before the state math tests began this week, the Success Academy charter school network had left nothing up to chance.

School leaders had provided teachers with color-coded agendas with precise instructions for every few minutes of test days, along with boxes of supplies that might come in handy — from pencils and tissues to extra clothes for students and deodorizing powder to sop up vomit.

Teachers had been taught the proper way to hand out tissues during the test (pass the student a new sheet first, then use a second sheet to grab the used tissue). They knew to set their classroom temperatures to between 66 and 70 degrees, and to call each student’s family every evening before a test to remind them of the next morning’s exam.

On test days, some teachers would take Success-funded cabs to pick up chronically late students (“Taxi Scholars,” as the agendas refer to them). Outside auditors, who had already observed the network’s practice tests, would monitor the real exams to safeguard against charges of test-rigging.

But students were perhaps the most prepared of all. They had spent weeks taking practice tests modeled off the actual state exams. They starred in test “dress rehearsals,” where exact testing conditions were simulated. Some had even practiced tearing perforated reference sheets out of mock test booklets.

If history is any guide, the preparation will pay off. Last year, Success students’ pass rates on the new and much harder state exams beat those of every other city charter school network and far surpassed the city and state averages.

Success says test prep is a minor factor in its students’ remarkable scores. More important, it insists, are the network’s curriculum, teacher training, and longer school days.

“No amount of test preparation will enable a child to do well on these challenging tests without extremely high-quality instruction,” Success CEO Eva Moskowitz said in a statement.

Success is the city’s largest and most polarizing charter school network, and its high test scores have been the subject of passionate debate. Critics have said the network has boosted its scores by “counseling out” hard-to-teach students (a charge Success denies) and by not replacing many students who leave.

What’s less debatable is that outstanding test scores are crucial for Success Academy. They have enabled the network to attract an army of well-heeled, results-oriented donors. And recently they bolstered the network’s case when it appealed to lawmakers for support after the city blocked some Success schools from moving into public buildings.

To ensure it achieves those results, Success invests an extraordinary amount of time and resources into preparing students for the state exams, according to interviews and conversations with current teachers, parents, and students from several Success schools, as well as a review of internal Success documents.

Many of those interviewed said the work leading up to the test was rigorous and conceptual, a far cry from rote “drill-and-kill” prep, and a valuable use of school time considering the high stakes attached to the exams.

“I’m all for it,” said Maria Torres, who drives her daughter from Staten Island to a Success school in Harlem each day. “The more instruction they get, the more prepared and confident they are.”

But others said the intensive test preparation distorts students’ view of the purpose of education and detracts from learning not directly related to the exams.

“I think it’s important that if they’re going to be tested on something, they feel prepared to do it,” said one teacher who, like others, spoke on the condition of anonymity. “But I don’t think it needs to come at the expense of authentic learning, which is what’s happening.”

At Success, students encounter tasks modeled off those on state tests as early as the fall, when they are given network-produced packets with reading passages and questions during sessions called “Close Reading Mastery.” Around winter break, they take full practice tests. By March, students answer test-inspired questions every morning, and teachers report their daily scores to the network.

In the weeks leading up to the exams, test preparation dominates the school day.

Before the English tests, that means eight reading passages with questions every day at one school. In the lead-up to the math tests, another school’s schedule showed students taking a two-hour practice test in the morning and another two-hour practice test in the afternoon, with some students scheduled to spend recess going over wrong answers.

Teachers said they lose their own prep periods during these weeks and students miss out on academics — from reading about current events to studying history — that are not assessed by the state exams. To pack in more test prep, the network holds Saturday sessions and put off spring break until after the math exams. In the afternoons after the tests this week, students will solve practice problems modeled after the next day’s exams.

Some teachers and parents said all this preparation builds up students’ work ethic and tenacity, but others worried that it skews their sense of what it means to be successful.

“Their self worth is all tied to their performance on this test,” a teacher said.

The network goes to great lengths to keep students happy as they are chipping away at all this work.

Teachers receive boxes of prizes — basketballs, bracelets, magnets, puzzles, socks — to reward students based on their effort and scores on the daily practice tests. Other students earned Popeyes chicken, pizza, or trips to the park. One school paid a street vendor to pass out ice cream to students after last Saturday’s “Slam the Exam” prep session.

Students receive daily reports with their practice-test results. Those who achieve top scores have their headshots posted on a hallway bulletin board, called the “3s and 4s Club,” in one school. But low-scoring students also see their results posted in school hallways. Those students, along with ones who made careless mistakes or were not invested in the practice tests, miss recess to attend extra work sessions, called “Effort Academy” or “Revision Academy.”

“If there’s noticeable areas for improvement, then we work on it,” said one teacher. “Not as a punishment, but as an opportunity to improve.”

Success also finds ways to keep teachers invested.

The network pays for catered lunches for staff during the weeks of test preparation and issued every teacher new Converse sneakers. (The shoes come in handy on test days, since Success teachers are required to wear soft-soled shoes to reduce noise.)

More galvanizing are the daily, network-wide emails that rank teachers by name based on the percentage of their students who passed that morning’s practice tests. Multiple teachers said they were motivated by the rankings — “You want to have your name on the top of that list,” said one — and noted that top-ranked teachers share tips and materials.

Those rankings may carry consequences: A bottom-ranked teacher was told she is being demoted from a lead to an assistant teacher, according to two teachers who learned of the move. They find the ranking system demoralizing.

“I constantly feel criticized and under pressure,” one said.

Kevin Heffel, Success Academy’s instructional chief, said in a statement that the network believes educators should be held accountable for “preparing our scholars to succeed,” and that it provides teachers “extensive professional development and support to help them meet this goal.”

Heffel added that Success considers test preparation a matter of equity.

“Minority children have historically been denied educational opportunities because they haven’t been adequately prepared for standardized testing,” he said. “We owe it to our kids to make sure they’re ready.”

Wake up to a comprehensive round-up of New York City education news by signing up for our Rise & Shine newsletter here.