Do we need licenses to deploy the extension in development and test environments?

No, you only need licenses for your production environment and you can use the extension on your development and test environment without extra need for licenses.