You remove the files that were installed by hand, using the
(If you don't know which files you need to remove sometimes it helps to
make install again and look for the files that were updated - you've probably made yourself quite a mess though.)
The next time you need to build a test environment you should think it through and plan for the eventual removal of that environment (e.g. by using
--prefix=/usr/local/apache-test when you run
configure so all the installed files are conveniently under one directory).
This requires a little more work on your part, but is less likely to make a mess on your server.
A better solution would be to use FreeBSD's
jail functionality to fully confine your test environment. This has a steeper learning curve (and uses a lot more disk space), but it is The Right Thing in terms of isolation/containment.