THE New Scientist has some good news for couples who are trying - and failing - to have children. A team of Belgian and American doctors has devised a do-it-yourself sperm test which works in much the same way as a home pregnancy kit. The man deposits his sperm in a vial which also contains a purple dye. If the man is fertile, the dye turns pale pink. If he is not - which is when the semen contains fewer than 10 million mobile sperm per millilitre - it stays stubbornly purple.

The chief blessing of such a device is that it quickly and easily ascertains which partner has the faulty reproductive system. If the man is demonstrably fertile, doctors can concentrate on the woman. As infertility is spread evenly across the sexes, the chances are 50-50. The fact is, however, that women are usually tested for infertility before men, even though the causes in women can be more complex and less easily diagnosed. Men are not tested first because . . . well, chiefly because they do not fancy the idea. And so time is wasted and marital stress accumulates.

The male ego may be tiresomely at fault here, but I do not blame it or us completely. A sperm test is a strange piece of business. It requires masturbation. You will notice I have used the word 'deposit' above, as though sperm was in the same depositable league as sputum or faeces or urine. It is not. It needs imagination to produce. It is hedged around with morality and (still) permeated by shame. The strictures of Jesuits and Scouting for Boys may seem remote to our time, but the idea of an adult, married male masturbating remains taboo. Men do not confess it to each other - which is fine, I think.

When Blake Morrison published his much-praised and autobiographical And When Did You Last See Your Father last year, many men (I include myself) were, not shocked exactly, but certainly suprised that he described himself masturbating in the bath - as a man in his forties, mortgage, wife, kids. Some of us thought it was the worst thing in an otherwise marvellous book.

Medicine has no truck with this kind of social delicacy. It requires living sperm, delivered warm and on time. I have had two sperm tests in my life. The first went well. All my local hospital asked was that I arrived with my sample at 10am no more than 30 minutes after I had 'deposited' it. I lived then in South London. I ordered a mini-cab, stayed in bed an extra hour, fantasised to order, arrived on time.

The hospital said the sperm was fine, though the sample was rather small (trouble with the deposition). In fact, it might be too good, too many millions per millilitre, which could lead to clotting and lack of mobility.

So, some time later, I had a second test. This time the hospital was Bart's. I arrived at the fertility unit expecting to be given the previous advice: do it at home, get it here in half an hour. The nurses laughed. 'No, no, you do it here.' Where? 'In the lavatory, round the corner.'

The lavatory was occupied. Eventually an enormous woman emerged with what looked like a urine sample. I went in and locked the door. It was a basement, there were no windows, and nowhere to sit other than the lavatory bowl. The smell was pungent: shit, hospital cooking (boiled meat, cabbage), antiseptic. Outside I could hear trays and trolleys clattering and cheerful Caribbean shouts. I tried to fantasise and failed. Occasionally the door handle turned and people on the other side sighed.

'I'm sorry,' I told the nurse after 15 minutes, 'I don't seem able to manage it.' I felt - presumably looked - an abject and craven person: a man of 40, feeling like the boy who had failed to vault the horse in the school gym. Eventually she conceded I might try at home. I remember pleading that it was nearby, and her smile in response - the same smile, knowing, ironic, that so upsets women when it flits across the face of a male gynaecologist.

I took no chances. Somewhere opposite the Old Bailey I bought a copy of Playboy, then went home and booked another mini-cab. The results were fine. The nurse joked: 'You don't have a problem, they're certainly upwardly mobile.' She meant well. It was a kind of man-to- man remark. I was cheerful.

And then I began to think of my wife and her tests, and the swirling blame that passes through the minds - though it may not find a voice - of any couple who are trying and failing to have children.

Her fault, my fault, our fault, or no fault at all, a capricious phenomenon denied . . . by caprice. (When James Fenton wrote in the Independent last week that Virginia Bottomley was an 'impertinent cow' when she chastised the infertile for imagining that children were ' a right' rather than 'a gift', many more than me must have felt like cheering.)

Embarrassment and petty humiliation are small things for a man, perhaps, when compared to the routine rubber- glove explorations that a woman must suffer. But I am glad about the home sperm test. I hope the manufacturers sell millions, and that it is easily available in Boots.