phorsenuf,
I'm not sure what battery you speak of. However, there should be a battery on your motherboard that maintains the BIOS's settings. It's small, and is generally a round 3V Lithium-Ion. If this is not the battery you're looking at, then I'm not sure what you are, and you should probably not read on.
However, the battery I speak of keeps your BIOS settings intact, and if you're mobo (motherboard) is having issues maintaining it's settings, there is a slim chance it can't recognize your CPU properly, hence, giving you the line "System failed CPU test".
So, try this: power down the system and disconnect the power cord from the back of the PC. Once that's done, press the power button on the front of the PC a couple of times. This will discharge any energy held in the system's capacitors. Afterward, replace the power cord and power the system up.
At this point, attempt to enter the system's BIOS. You can do that by pressing DEL repeatedly at the very beginning of the system startup (Some systems require F1, F2, or F10). You should get a strange-looking settings screen. If you've made it this far, then it's not your CPU that's bad, but something may be wrong with your BIOS settings.
If you continue to get the line "System failed CPU test." Then your BIOS is retaining its settings, and the battery I described above is good.
I'd like to note, this is a long troubleshooting technique, but I'm generally very thorough before I go spending $100+ on a new CPU.
That said, attempt to clear your BIOS. If you have the manual for you mobo, there should be a section describing how to clear CMOS or BIOS settings. Usually, it involves setting a jumper on the mobo to a particular place, removing the battery, shutting down the system, or some combination of all or some of those.
After doing this, power up the system and attempt to enter the BIOS again. If you still get that fateful line, then I'm sorry, but you've lost her.
I just thought of one more thing to try while you have your PC open, disconnect everything that isn't related to a working system. In other words, the only things that should be getting power or connected to the PC are:
keyboard
monitor
hard drive
From there, let the PC figure it out. Of course, don't remove the CPU, RAM, or any power cables feeding the motherboard.
As usual, PM me or continue posting for further help. Good luck.