An EKG is the most important test used in the diagnosis of AFib and atrial flutter . An EKG is performed by placing small, painless electrodes on your chest, wrist, and ankles. This test is performed while you are at rest or, in the case of an exercise stress test, while you are walking on a treadmill.