every time you're creating archive, you can specify a name of archive via second argument:
ShrinkWrap.create(Class<? extends Archive<?> archiveType, String name)
You can also check a guide here http://arquillian.org/guides/shrinkwrap_introduction/
this is the correct way to set the name of the archive. But the application is always deployed with the application name test. Therefore I cannot deploy two archives at once.
Could you be very specific what do you mean when you say "the application name"?
If I have two jar deployments in one Arquillian test Glassfish complains during the deployment of the second jar that there is already an application named test.
most of the servers use name of the war to give application name or some server specific descriptor - glassfish-web.xml in your case. If you are not using WAR but EAR, deployment name is usually in application.xml descriptor. Or maybe in server specific descriptor, such as glassfish-application.xml.
Hard to tell as we don't now what are you deploying, to what server you are deploying and what exception you actually got.