Of course you can automate that.
Make a sqlcmd script that
1) finds last full backup name and diff backup name.
2) restore them to test.
1) To find a backup name you can by querying msdb.dbo.backupset table on the production server,
or using dir command like this:
!!dir *.bak /o-d /b
or xp_cmdshell with the same command.
2) Once you have filenames, restore is almost trivial:
alter database XY set single_user with rollback after 2
RESTORE DATABASE XY FROM DISK='$(bak_filename)'
MOVE('logicaldatafilename' TO 'new data path and file name'),
MOVE('logicallogfilename' TO 'new log path and file name'),
RESTORE DATABASE XY FROM DISK='$(dif_filename)'
Verify that script work fine in sqlcmd mode in SQL Management Studio (Query->SQLCMD Mode).
After that, create a sql agent job with step type "CmdExec" and put sqlcmd.exe command to execute the script you just created.
Of course, you have to take care about the rights of sql agent account (or proxy account if you set one for that step) to be able to connect/read/write where it needs.
If you need to copy files, use "!!ROBOCOPY sourcedir destinationdir filename1 filename2 filename3 /MT:2"
Microsoft Certified Master: SQL Server 2008
XDetails Addin - for SQL Developers
blog.sqlxdetails.com - Transaction log myths