Yes, there should be the option and I'm glad it's there and very clear where I am because body autonomy and consent to medical procedures is a really important and, for some, a hard fought for right that too many still experience getting rode over.
At my DDs' secondary school they've been very clear that first parents/carers give consent and then, for those with parental consent, the children will be asked for their consent and either can be withdrawn at any time. Personally, I had mixed feelings on the parental consent being so emphasised about a medical test for children old enough to consent themselves, but as the information came out that after three weeks of doing it at school, we have to monitor them doing it at home, it made more sense - we're essentially saying we're going to do that.
Testing or not doesn't change when they go back or anything much and they'd still self isolate with close contacts and so on so it kinda feels like a cheap bandaid used because there are little resources for anything else - I'm not against it, but I don't see it as vital or game changing.
I've been very clear to mine that while I've given consent, I'm absolutely fine with the test, but I'm not and cannot give their consent for a medical test - that is their choice and I will 100% support them (which is a bit funny for them as I'm usually the 'I'm not arguing with the school or anyone over behaviour or dress code, suck it up buttercup' type). Their reason doesn't really matter to me.
Having had medical tests against my will, even ones viewed as "harmless" and being held down for an "internal" to "teach [me] a lesson" (never did get that test result back), the idea of them being compulsory for children not adults for a job they chose but children in school baffles me. For those who want this to be compulsory, what are you advocating for if a child doesn't consent?