Whether you've found a treasure of old seed packets in the back of your junk drawer or you've been gifted with a handful of seeds from your next door neighbor, it's worthwhile to test their viability before you spend lots of time and energy in getting them to sprout. Keep in mind that not every seed sprouts even in highly viable batches, so you'll need to test around 10 seeds of each type. The results will give you a germination rate that can help you decide how many to plant or if the project is even worth it. If only 1 or 2 out of every 10 seeds germinate (10 to 20% germination rate) that may be a recipe for frustration. A 90% germination rate, however, is excellent.
The paper towel method is the simplest method of testing seed viability. It's as simple as placing seeds on a damp paper towel, sealing it in a plastic bag and placing it in a warm place. In 2-14 days (depending on the variety) you should see some results. Some growers test by checking whether a seed floats or sinks in a tub of water. This isn't as accurate as the paper towel method, but it can work for large seeds like corn and beans. Other tests are similar to the paper towel method but use trays filled with sand or soil and covered with perlite instead. These are particularly suited to seeds like peanuts, that require soild to germinate.