First of all on-chain code isn't stored in the blockchain, the hash of on-chain code is.
To use on-chain validator on testnet or mainnet steps are:
Compile on-chain code into plutus script
Generate address from plutus script
Lock funds into plutus script address (Don't forget Datum!!!)
Pass plutus script for validation to unlock funds from plutus script ...
Seems something wrong with your topology script, you need to fix it. Maybe it has some shortened paths like ./bla.json. It should have access to testnet-shelley-genesis.json file(or maybe it called a bit different in your case) and seems this error hints that script can't access it.
Please post your topology updater script so we can fix it.
Currently when ...
This question is too broad. It really depends on the use case you are using the smart contract for. It is like asking what are best practices to test software.
Mainnet and testnet are just different networks, the smart contacts works the same way on both.