Question: When I am pedaling hard and shift to a larger sprocket, the shift is not smooth or sometimes doesn't happen at all. Sometimes even double up-shifts don't work. There is no problem shifting when I test for it without riding. What could be the issue?

Answer: 
On ground, after shifting, look at your bike from the back. The sprocket into which you have attempted to shift, and the pulley in the derailleur should be aligned. If the pulley is more to the right than sprocket, you need to get it aligned to the sprocket, by tightening in the screw on shifter or on the rear derailleur. As you tighten the screw, you should see pulley moving horizontally.

If that does not help, other problem might be that your chain hanger is bent, but that happens much less often, and typically after some crash or hard hit on the rear derailleur. If that is the case, taking your bike to LBS sounds like a good idea.
That is perfectly normal because when you are pedaling hard the chain is under tension and resists being moved by the derailleur. Before shifting to a higher gear slow your pedaling slightly.