Is Oracle DB licensing needed for a test environment?
In general, yes.  Once you have an application in production, every environment (dev, test, staging, production, etc.) needed to support that application needs to be licensed.  As with all licensing advice, however, you need to get it in writing from Oracle Sales.  Advice from some guy on the internet holds up about as well as you might expect if there is ever a question about whether you're properly licensed and/or if you're overpaying for licenses.  And remember that agreements your company has with Oracle, laws in your country, etc. can change this general statement.

If you are a reasonably large customer or if you have some other leverage in the negotiation process, however, you can generally get the licenses for the test and development environments at a good discount from Oracle Sales.