Denys S.
Denys S.

Reputation: 6525

Passing server parameters as arquillian resource?

I'm using arquillian for functional tests only. Arquillian is not managing a container (standalone) and is not deploying an app (also done manually. Since there's no deployment I can't obtain deploymentUrl using @ArquillianResource.

Also, it's a maven project and I have a property with server hostname which is pretty much what I need to get in arquillian test.

My question is: what would be another option to acquire a url except for hard coding it?

Upvotes: 0

Views: 852

Answers (1)

Tair
Tair

Reputation: 3819

If the tests are run in client JVM, you can probably use system properties. For example, with maven it could be:

$ mvn test -Ddeployment.url=http://whatever

And in test code:

String url = System.getProperty("deployment.url", "http://defaulturl");

Upvotes: 1

Related Questions