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?
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.
After a lot of tinkering and research I found the derailleur was in the need of indexing adjustment. Just twisted the barrel adjuster anticlockwise a little and the gears are shifting promptly now. The above link advises that indexing adjustment is the most frequently required adjustment for rear derailleur.