I have a bunch of systemproperties defined in my maven pom.xml, that i need to acccess from Arquillian-tests, running on a remote glassfish instance.
What's the easiest way to push the systemproperties to the container?
I have a bunch of systemproperties defined in my maven pom.xml, that i need to acccess from Arquillian-tests, running on a remote glassfish instance.
What's the easiest way to push the systemproperties to the container?
There is an Arquillian Extension in the Arquillian Showcase that demo how this could be done 'automatically'.
https://github.com/arquillian/arquillian-showcase/tree/master/extensions/systemproperties
You could write these properties out to a file that is added to your ShrinkWrap @Deployment
.
You could then read this file in your @Before
setup method that executes server-side, and set the System properties using System.setProperty(...)
. This assumes the SecurityManager
on the server will allow you to set the properties.
If you don't want to pollute your test code with all of this, you could write this harness into an Arquillian extension that does something similar.