Results 1 to 3 of 3

Thread: Automated functional testing with WebDriver and jUnit

  1. #1

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Automated functional testing with WebDriver and jUnit

    Being new to Java and all that, I got the hang of jUnit to create unit test for code, and today nutted out to work with webdriver for functional tests.

    Was wondering if one can use jUnit for asserting the results of webdriver test results?

    Did not look (it's late......kinda last minute thought before hitting the sack), but create a normal jUnit test suite, use webdriver to run tests on the UI, and assert the results with jUnit. Something like that?

    If one can do this, did anyone do it? Some simple sample perhaps if you did?

    Only "promising" link I got from google seems to be in some blog which seems to be blocked here (China....what's new?)
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  2. #2

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Automated functional testing with WebDriver and jUnit

    Pretty simple it turned out:
    Code:
    @Test
    public void SomeTest() {
    	
    	WebDriver driver = new FirefoxDriver();
    	driver.get("https://xxx.xxx.xxx.xxx:8081");
    	assertEquals("Log on", driver.getTitle());
    	
    }
    Now I'm stuck with the windows authenticated login that pops up. This is a team build site, from there it got authentication on it now.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  3. #3

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Automated functional testing with WebDriver and jUnit

    Hey!
    Anyone here use WebDriver at all?

    Need some help with PageFactories.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width