Controlling a DC Motor via an analog PID circuit
High current from an op amp with or without transistors?
As for testing. Break the problem down into sections and test each section. To test the control loop, that gets a bit tricky, so start with just the P term. Then add the I term. The D term is last. Adjust the coefficients at each stage.
Understand that adjusting a real PID system is not trivial, so expect to make mistakes.