That all depends on what you mean by "test". Let's start with shining a light in one end, and checking to see if you can see it on the other end.
If you are just trying to determine if it has been broken, it may provide a "Quick Test". (Of course, you may have to have a very bright light and good vision for this to work.
If you are trying to determine if it is damaged, see the "Quick Test" above.
If you are trying to determine if it will work, try plugging it into some device that it is supposed to work with. The electronics that are doing the evaluation may not be in the mood to work but then you would need a known "good" fiber optic cable to verify that the electronics are OK.
In reality, it really depends on the length of the cable. Since most of them are paired, it will be rather obvious if one is broken but the other is "OK". A damaged cable is a little more difficult. There are test devices that measure the transmission characteristics of the fiber optic. And there are standards that they should meet. And lastly, all fiber optic testing devices use a light source.
Exactly what did you have in mind?
__________________
A great troubleshooting tip...."When you eliminate the impossible, whatever remains, however improbable, must be the truth." Sir Arthur Conan Doyle
__________________
"Did you get my e-mail?" - "The biggest problem in communication is the illusion that it has taken place" - George Bernard Shaw, 1856