Refrigerator and Freezer not cooling

Our refrigerator stopped cooling. I took the thrmostat and defrsot timer out and we checked them. They both seemed to working on the test bench. I then opened the back and checked the compressor. There was a clicking but the compressor never came on. Yesterday I replaced the relay and the capacitor on the compressor and the compressor seemed to start running when I plugged the unit back into the outlet. After eight hours the freezer is only cooling to 48 degrees and the refrigerator is about the same temperture. What do you suggest I try now?