1 Reply Latest reply on Dec 1, 2012 6:08 AM by Aslak Knutsen

    Substituting Browsers in Arquillian.xml

    Lucas Holmquist Newbie

      I'm in the middle of writing the guide for mobile testing with drone,  https://github.com/arquillian/arquillian.github.com/issues/181

       

      and i would like running it to be dynamic, where all i do is specifiy the profile and it runs with that Browser.

       

      The problem i am having is i'm unsure of how to substitue the "browser" property in arquillian.xml from a variable in my pom.

       

      I'm trying to follow Karel's video from java one,  but haven't been succesful

       

      Is there something that i need to include to do this?

       

      repo is here

       

      https://github.com/lholmquist/quickstartsforguide/tree/master/kitchensink-html5-mobile

        • 1. Re: Substituting Browsers in Arquillian.xml
          Aslak Knutsen Master

          Arquillian.xml

          <property name="browserCapabilities">${browser}</property>
          

           

           

          You can use Maven filtering of the test resources like this:

          Pom.xml

                  <profile>
                      <id>browser-firefox</id>
                      <activation>
                          <property>
                              <name>browser</name>
                              <value>firefox</value>
                          </property>
                      </activation>
                      <properties>
                          <browser>firefox</browser>
                      </properties>
                  </profile>
          
          ...
          
              <build>
                  <testResources>
                      <testResource>
                          <directory>src/test/resources</directory>
                          <filtering>true</filtering>
                      </testResource>
                  </testResources>
          
          
          

           

          Or you can setup surefire execution to set system properties:

           

                                          <configuration>
                                              <systemPropertyVariables>
                                                  <browser>${browser}</browser>
                                              </systemPropertyVariables>
                                          </configuration>
          
          

           

           

          Non of the options works perfect from IDE, tho the filtering probably works better then the pure surefire version.

           

          If you have any bright ideas, we're discussing the future of the configuration here: https://community.jboss.org/message/777830