The boy said Justine Nelson, 33, had oral sex with him dozens of times after locking her door.
“She was the cool teacher that everyone liked,” he said in court.
“If you had a bad day you could talk to her.”
But Nelson left Tenaya Middle School, Fresno, California, after the lad allegedly put nude snaps of her on social media.
The boy said his two-month relationship with Nelson, whose husband also worked there as a PE teacher, started with texts.
“She texted I was cute and wanted me to kiss her,” he said.
“I was shocked; I didn’t know what to do.”
He and Nelson first became intimate when he was 13, he said.
“Between second and third period we had oral sex,” the teen, now 16, told the hearing.
“We started kissing and she pulled my pants down.”
He said Nelson would often buy him lunch and even gave him money for an out-of-town trip.
The pair would spend their lunch together in her classroom with the door locked “during lunch or whatever I would go to her classroom and she would tell other kids to not come in so we could be alone”, he told Fresno County Superior Court.
She even covered for him when he was late for lessons after they had sex, he added.
“I was late to class so she wrote me a pass,” the youngster said.
Nelson’s pet names for him included “boo, honey and babe,” according to a bundle of texts between the two on Instagram.
And she repeatedly reminded him: “Oh god, don’t tell anyone we talk,” said prosecutor Liz Owen.
“We started kissing and she pulled my pants down”
Boy in court
A probe was launched after detectives said the raunchy pictures of Nelson appeared on social media – reportedly posted by the pupil in the summer of 2016.
He initially told police Nelson gave him oral sex once before his 14th birthday and then at least twice after that.
But in an interview with a District Attorney’s office investigator he said it was significantly higher, the hearing heard.
Nelson’s lawyer Roger Nuttall claimed the student could not be trusted.
Mr Nuttall had counted more than 40 times the pupil claimed the sex acts took place “and most of that happened in a two month period”, he said.
Fellow teacher Grant Pullen said he complained to school bosses about Nelson’s lack of professionalism and not setting boundaries between herself and students.
They would be late to his class because they were hanging out in Nelson’s during her free period.
He was so concerned he also spoke to her husband.
Nelson is charged with lewd or lascivious acts with a minor and oral copulation.
The trial continues next week.