Tellurium DDT has some problem reported here,

http://code.google.com/p/aost/issues/detail?id=423

I just fixed it and please use 0.7.0 snapshot from our Maven repo:


http://maven.kungfuters.org/content/repositories/snapshots/org/telluriumsource/tellurium-core/0.7.0-SNAPSHOT/

I tested DDT with the following example and seems it works fine.

class GoogleDataDrivenModule extends TelluriumDataDrivenModule{

  public void defineModule() {
    ui.Container(uid: "Google", clocator: [tag: "table"]) {
      InputBox(uid: "Input", clocator: [tag: "input", title: "Google
Search", name: "q"])
      SubmitButton(uid: "Search", clocator: [tag: "input", type: "submit",
value: "Google Search", name: "btnG"])
      SubmitButton(uid: "ImFeelingLucky", clocator: [tag: "input", type:
"submit", value: "I'm Feeling Lucky", name: "btnI"])
    }

    fs.FieldSet(name: "GoogleSearch", description: "Data format for testing
Google Search") {
        Test(value: "DoGoogleSearch")
        Field(name: "SearchWords", description: "Search Key Words")
    }

    fs.FieldSet(name: "FeelingLuckySearch", description: "Data format for
testing Google Search") {
        Test(value: "DoFeelingLuckySearch")
        Field(name: "SearchWords", description: "Search Key Words")
    }

    defineTest("DoGoogleSearch") {
      connectUrl "http://www.google.com";
      String input = bind("GoogleSearch.SearchWords")
      keyType "Google.Input", input
      pause 500
      click "Google.Search"
      waitForPageToLoad 30000
    }

    defineTest("DoFeelingLuckySearch") {
      connectUrl "http://www.google.com";
      String input = bind("FeelingLuckySearch.SearchWords")
      keyType "Google.Input", input
      pause 500
      click "Google.ImFeelingLucky"
      waitForPageToLoad 30000
    }
  }
}

class GoogleDataDrivenTest extends TelluriumDataDrivenTest{

    String data = """
    ##Data test for "Google Search"
    ##TEST | INPUT
    DoGoogleSearch | tellurium testing
    DoFeelingLuckySearch | aost groovy
    DoGoogleSearch | data driven testing"""

    public void testDataDriven() {

        includeModule org.telluriumsource.ddt.GoogleDataDrivenModule.class

        //load String
        useData data

        connectSeleniumServer()

        useCache(true);
        //read each line and run the test script until the end of the file
        stepToEnd()

        //close file
        closeData()
    }
}


Thanks,

Jian

-- 
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en.

Reply via email to