3 Replies Latest reply on Jul 13, 2016 10:02 AM by Bartosz Majsak

    TestNG  @Parameters don't works using arquillian

    Luis Fernandes Newbie

      No value is passed to the test method arguments.

      Anybody knows how to workaround this problem?



      <suite name="XXXX" verbose="1" preserve-order="true" configfailurepolicy="skip" parallel="false" thread-count="1">

          <parameter name="context" value="Default"/>

        <test name="Check Dao Availability" enabled="true">


        <class name="x.y.z.TestIT" />







        public void testCheckDao(String context){

        System.out.println("============== " + context + "==================");




        • 1. Re: TestNG  @Parameters don't works using arquillian
          Taylor Benson Newbie


          I finally decided to create an account so I can maybe help with other TestNG issues that I'm experiencing with paralleling with Arquillian, however I see your problem and within my projects I am able to use parameters within Arquillian.


          I have used parameters like you defined within the suite and using maven pom (surefire/fail-safe).


          How are you executing the tests? Maven or IDE?


          If you are running via IDE

          Are you right clicking on suite.xml and selecting Run As->TestNG Suite? (If so this should work fine)

          If you are right clicking on the test file itself, then you have to add the parameter as a vm argument. To do this you need to go to Run As->Run Configuration... and select the Arguments tab, add -Dcontext=Default to the vm arguments box. This will then pass "Default" to your test.


          If you are doing it via maven, if you can post you pom, I might be able to help.



          • 2. Re: TestNG  @Parameters don't works using arquillian
            Luis Fernandes Newbie

            Hi Taylor,


            I'm using MAVEN



                   <argLine>-Xmx1024m ${jacoco.agent.it.arg}</argLine>


            • 3. Re: TestNG  @Parameters don't works using arquillian
              Bartosz Majsak Master

              Moved to general Arquillian space.

              If this is not the exact issue you are struggling with [ARQ-1282] TestNG @DataProvider is fully invoked for each record - JBoss Issue Tracker please create new one and we will take a closer look.