I got an error that says curl: (7) Failed to connect to localhost port 18332: Connection refused I could succeed to work the testnet at once.However after I restarted my Mac,bitcoind came not to work.
bitcoind doesn't restart after your computer restarts. Start bitcoind after you start your computer.