You can use faucets to test smart contracts on the test network with no need to use real ether for this purpose (because ether from the mainnet is not valid in testnets, and vice versa). Ether in a test network has no real value except for testing purposes in smart contracts development.
Access the faucet on the Ropsten network
Access the faucet on the Rinkeby network
Access the faucet on the Polygon Mumbai test network
Access the faucet on the ...