Yes, of course the lens + sensor scores require optics, but the OP mentioned DxO Sensor Mark measurements, which I was under the impression was performed without optics.
My understanding is also (like ErikKaffehr and deejjjaaaa) that sensor noise measurements are done by imaging back-lit neutral density filters using lenses (
DxOMark-testing-protocols). All you want to do is illuminate a large part of the sensor with the same intensity. That won't work by pointing a bare camera body at a wall: you will get more vignetting via the mount and mirror box than you would with a lens. So you either put a lens on the camera or make your own collimating optics.
But DxOMark Sensor requires a different set of tests than used for Sensor-and-Lens ("DxOMark Score") testing. But all require optics. But the lens sharpness has negligible impact: you could arguably defocus the lens slightly and get the same results as long as you stay clear of the edges of the test patches. A pinhole would also (kind of) work ;-)
Engineers and scientists will point out that numerous questions remain about test details for any precision measurement: e.g. light source homogeneity, light source stability, finite test patch size, vignetting, dust on the source, dust on the optics. I can assure you (I worked for years in labs) that precisions measurements are a major headache. Some of these issues are nowadays covered by international standards where the experts jointly develop measurement protocols. DxOMark is active in some of these committees (source: LinkedIn and private communications). And DxO says that outside engineers regularly get to see the setup and discuss the procedures used. This is normal in engineering: if you challenge my measurement results, I either need to exhaustively document measurement details and you review them, and/or you send in experts to see if you can find a flaw in the measurments. You can bet that a major manufacturer will contact DxOMark whenever their products get lower scores than hoped for.
[fixed typo on 11-2-11, a historic day for other reasons]