You could protect the /test/ directory with a username / password by using .htpasswd.
This will prevent Google crawling your site and saves you your Crawl Budget. Make sure you don't link to the test/protected pages.
You can remove the /test/ from Google by requesting a removal in Google Webmaster Tools. Otherwise there is a possibility that users visit some pages in the /test/ dir and receive a 404 error when you finished the tweaks.