How to test if a transaction is standard without spending real money? The problem with Testnet is all types of transactions are allowed, so how can I know if a transaction would be rejected on mainet ?
You can use Bitcoin Core's testmempoolaccept RPC. It will tell you whether the transaction you give it would be accepted into your node's mempool at that time but won't actually add it to the mempool or broadcast it.