How are fuel tanks tested and certified?
The exact regulations governing an aircraft's fuel tanks depends on many factors such as type and number of engines, construction material, mounting method, number of passengers, aircraft gross weight, etc.

But a good overall set of requirements is given in 14 CFR 23.965 - Fuel tank tests. It includes such items as pressure testing, vibration, sloshing, inertia loads, venting, duration and number of cycles of each test, etc.

14 CFR 23.967 thru 23.101 - Fuel tank tests provides additional criteria but also includes requirements for components such as access panels, fuel sensors, filters and strainers, lines, pumps, drains, valves, jettisoning, etc. 

Other than a visual inspection for leaks and corrosion, the primary field test for an installed tank is to plug all the orifices and pressurize the tank to 2-3lbs for about 10 minutes. Large rubber stoppers that look similar to corks (with a bolt running through them that expands the rubber) are often used to plug the larger opening such as fuel filler openings.