1 Reply Latest reply on Apr 26, 2012 2:42 AM by kpiwko

    Aqruillian selenium test problem

    mano_seba

      Hello,

       

       

      I use arquillian in selenium test, they run ok on my laptop but when I try to put them on Jenkins the build lasts 4 hours for 30 test. Could the arquillian cause this problem?

       

       

       

      public class AdministrationSeleniumTest extends Arquillian {

          private WebDriver        driver;

          private StringBuffer    verificationErrors    = new StringBuffer();

          private String baseUrl ;

       

         

           @Deployment(testable=false)

             public static WebArchive createTestArchive() {

               WebArchive war = ShrinkWrap.createFromZipFile(WebArchive.class,new File("target/project.war"));

               return war;

           }

          

           @ArquillianResource

            URL deploymentURL;

          

         

          @BeforeTest

          public void setUp() throws Exception{

              driver = new FirefoxDriver();   

             

              driver.manage().window().setPosition(new Point(0,0));

              java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();

              Dimension dim = new Dimension((int) screenSize.getWidth()-20, (int) screenSize.getHeight()-30);

              driver.manage().window().setSize(dim);

             

              driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

          }

       

       

      @Test

      public void test(){

      ....

      }

       

       

      Any help would be appreciated.

       

      Best Regards

        • 1. Re: Aqruillian selenium test problem
          kpiwko

          Hi Manolescu,

           

          what Jenkins are you speaking about? Is it your instance? And does it succeed after 4:30 hours?

           

          A lot of reasons could do that:

           

          1/ Your are using a clean Maven repository in each build so you're redownloading all the dependencies

          2/ Something is broken at provisining machines at Jenkins

          3/ You executor is swapping heavily

          etc.

           

          I suspect 1/ has the biggest probabilaty.

           

          Btw, you can use Arquillian Drone to make Selenium usage much easier:

           

          https://docs.jboss.org/author/display/ARQ/Drone