The mining software is long gone out of the bitcoin core code (because it was a CPU miner). You will need a stick miner or some piece of mining hardware.
A CPU miner won't cut it, even on testnet. A GPU miner may get you lucky on testnet, but I wouldn't count on it. It took my stick miner (25gh/s) about a week on testnet to get a block. No GPu is gonna come close to that.
Start bitcoin with -daemon -rpcport=18332 -testnet -rpcuser -rpc password options. rpcallowip is not nessesary but provides extra insurance tha tonly addresses on my local network can use the miner even though my router doesn't route port 18332 from the outside.
In my case here is the exact command I use to start bitcoin on testnet with an open port for miners to connect to:
bitcoin-qt -datadir=/bitcoin/data -daemon -server -rpcuser=t -rpcpassword=t -rpcallowip=192.168.0.0/255.255.0.0 -rpcport=18332 -testnet
Then startup your miner like so
cgminer -o
http://YourbitcoinServername_OR_IP:18332 -u t -p t --btc-address BTCADDYfromYOURtestnetWALLET --btc-sig ANYBLOCKSIGYOUWANT
and any other options specific to your miners hardware
In my case this is the exact command I use with a gekko 2pac miner (cranked up a tad) in a specific USB port:
cgminer -o http://impalaubu:18332 -u t -p t --btc-address mziZEvRutyzoB3NX1eYv214K67hwYP87bB --btc-sig TheAnoyer --gekko-2pac-freq 225 --usb 2:13
most mining software has the -o address and sig options. user and password doesn't matter, use anything you want just make sure to match them in your bitcoin command and miner command....You'll also want to ensure port 18332 is open on the machine you started bitcion on, most linux have default firewall you'll need to disable or add a rule to allow that port.