Allowing your wp-contents
folder to be reachable through apache is a security risk.
I would recommend that you find a better way to test your plugin, such as writing a unit test with PHPUnit or split it out of your wordpress install and test it on your own machine in the browser.
That said, you can add a RewriteCond like so:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/myplugin/test.php
RewriteRule . /index.php [L]
</IfModule>
# END WordPress