Oh yes...I remember that...my puppy is 8 months old and he was like that from about 4 1/2 months until probably about 3 weeks ago! He would test us like crazy to see how far he could go. We had him neutered the beginning of January and he has calmed way down and now he just loves to play..and he LISTENS to us about 98% of the time...he is becoming more enjoyable and not getting into so much trouble.
Just be patient and don't let him get away with things...as far as the potty training part I am not sure about that...but I am sure that others will have some good advice for you
Good Luck..it does get better I promise!