Like we have a function called estimateGas in 'web3' and it creates a dummy transaction which is not added to the blockchain, is there some way to test if my signed transaction will broadcast properly and check if the gas would be enough without actually broadcasting the transaction?
If you create a private network with multiple nodes, you can deploy your smart contract from
Node1. You can use the second
Node2 as a miner to see whether the smart contract will be included in one of the blocks or not. By doing so, you can check and see what exactly will happen. This blog gives a great introduction to private networks.