Can patients in the throes of getting this terrifying news really make an informed choice about whether they want the test? Are they able to understand at such a fraught time that, for now at least, there is nothing that can save them if they get the bad prognosis?

Some doctors do not offer the test, reasoning that there is little to be gained.

But other doctors, including J. William Harbour of Washington University, who developed the test (but does not profit from its use), encourage patients to have it. And probably because of the way he describes it, Dr. Harbour says his patients almost always want it.

Ms. Caton was no exception. Without the test, doctors would have had to guess her outcome based on the size of her tumor. And the conventional wisdom is that people with growths as large as hers have a slim chance of surviving. But perhaps, her doctors hoped, the genetic test would come up with a different answer.

Heralding the Future

Dr. Harbour, a genial and burly man with salt-and-pepper hair, has a way about him that relaxes patients, makes them feel everything will be O.K.

“I give them as much information as I think they can handle,” Dr. Harbour says.

And he’s an optimist. The ocular melanoma test is just the beginning, he believes, of a new understanding of that cancer — and perhaps other cancers as well — and why they spread.

About 2,000 people a year, or about 5 percent of melanoma patients, have ocular melanoma, a tumor of the dark brown melanocytes that form a sheet much like a photographer’s backdrop behind the retina. Those with very large tumors are most likely to have a bad prognosis, but patients with small tumors also can have the deadly type.

Often there are no symptoms; the tumor may be discovered by an ophthalmologist during a routine exam. Other patients, though, lose vision or see flashing lights or a sea of floaters in an eye, all signs of damage to the retina as the tumor encroaches.