First, there's no reason to lose data during the upgrade (if we well speak about data & not rules)
For your Testing env, the easiest seems to follow the approach you did in DEV environment. Otherwise, several options are available depending on your testing env versions.
- If you've got an upgraded env with same content in RULES schema than your testing then you could export/import the upgraded rules schema and perform upgrade of data schema only
- if each testing env has its own RULES version, then perform upgrade of each env the way the you did for DEV
- or, DB backup your testing env, put it in a non used env, perform the upgrade and restore either full DB or just rules schema
- or last, perform the upgrade approach with either just new RULES schema or Both RULES & DATA schema and then change the connections param to use these new schemas.
It really depends on the content of your env and what you can or cannot do.
Last point to consider: ideally the approach you'll use for testing or QA or Pre Prod environment should be the one you'll use for Prod. You shouldn't consider a full new approach just for Prod upgrade