Jenkins/Ant -> Selenium Tests

69 views
Skip to first unread message

fuba77

unread,
Nov 4, 2014, 2:46:32 AM11/4/14
to seleniu...@googlegroups.com
Hi,

i created some gui-tests with selenium webdriver. Can anyone tell me, how i can start theses tests by using Jenkins/Ant?

Do i have to use the selenium-server? Or can i use webdriver?  Actually i use "wdriver = new FirefoxDriver(profile);"

greetings

Krishnan Mahadevan

unread,
Nov 4, 2014, 3:33:10 AM11/4/14
to Selenium Users
If you are using WebDriver driver = new FirefoxDriver(profile); 
then you dont need to do anything additional.

You just need to have jenkins kick off the relevant Ant task, which will run your tests and you should be good to go with that.

Just make sure that you are running your tests on a Jenkins box on which UI has been configured. If its a headless box then you may need to leverage something like https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin to get that sorted out.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8e3d190b-9592-4c93-9f1c-258c82cbb755%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Muralisankar A

unread,
Nov 4, 2014, 11:06:02 AM11/4/14
to seleniu...@googlegroups.com
@Test
       public void TC9() {         
         WebDriverWait wait = new WebDriverWait(driver, 30);
          wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".icon-users")));
         }

      @Test
      public void TC10() {       
        WebDriverWait wait = new WebDriverWait(driver, 30);
         wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".icon-users")));
        driver.findElement(By.cssSelector(".icon-users")).click();
        driver.findElement(By.cssSelector("#menuList > li.dropdown.open > ul > li:nth-child(3) > a")).click();
        Reporter.log("TC102 > Click on User Profile > Profiles");  
      }


PASSED: TC8
PASSED: TC9
FAILED: TC10
org.openqa.selenium.TimeoutException: Timed out after 30 seconds waiting for visibility of element located by By.selector: .icon-users
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'BDMAGFPC009', ip: '192.168.12.118', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_05'
Driver info: org.openqa.selenium.firefox.FirefoxDriver


Reply all
Reply to author
Forward
0 new messages