Chosen Solution

My MacBook Pro works completely fine aside from these issues. A few times, the laptop has just randomly shut down out of nowhere and on two occasions I have not been able to turn it on without plugging in the charger. As soon as I plug in the charger and turn it on, I can unplug the charger and the laptop will work fine off the battery. Doing an Apple Hardware test, it will not past the Memory Test. It just freezes. I have brand new ram, a brand new hard drive, and a brand new battery installed in the machine. Is it possibly logic board related?

Your machine uses : RAM Type: PC3-12800 DDR3L Min. RAM Speed:1600 MHzDetails: Supports 1600 MHz PC3-12800 DDR3L SDRAM SO-DIMMs (204-pin). Also see: How do you upgrade the RAM in the “Mid-2012” 13-Inch and 15-Inch MacBook Pro models? How much RAM of what type do they support? Standard RAM: 4 GB Maximum RAM:16 GB *Details: 4 GB of RAM is installed as two 2 GB modules, no slots free. *Apple officially supports a maximum of 8 GB of RAM, but third-parties have determined that this model actually is capable of using up to 16 GB of RAM with two 8 GB memory modules. What did you install into it? I use Atomic to test RAM: Micromat - ATOMIC UPDATE Could be a RAM or a RAM slot issue. I would first take it back to the original RAM configuration and see if the problem persists, or if in testing you still get the error.