Hi Sowjanya,
> Does this mean I have to keep recreating the same custom webapps for each envrionment?
I believe the answer is "yes" Just recreate the custom web app for the new portal.
> Is there a simpler way?
I don't believe so. After you copy over the web map and its associated data from the Test portal into the QA portal, I suppose you could try and edit the config.json file in the web app's installation directory and replace both the "portalURL" and "itemId" parameters with the new QA portal URL and new web map ID. However, I don't think this will make everything work, because it depends on which widgets you've configured in the web app and what they do. You may have to go into the config files for each widget and replace some item ID values to make them work properly. Not sure. Hence why I suspect it would be easier to recreate the web app.
Hope this helps,