There are ways to execute CLI commands using any JVM language. Depending on which AS7 version you are using, you may find some of these links useful:
However, for most purposes, a better approach during testing is to just substitute your own version of standalone.xml. That way, you don't need to change anything after Arquillian starts the server. I have an example of this in my cli-resolver project here:
The fact is that I am using arquillian with a remote jboss AS adapter. This means that I cannot start/stop the server. I am NOT using a jboss as managed adapter.
I want to use inside my arquillian test a .cli script file that I want to run it in the context of the remote container specified inside arquillian.xml (so that I shouldn't specify again the address and port whereto I should connect with cli)
Also, if I am using the jboss remote adapter, it is possible to use my own standalone.xml file ?