Hi Dominic,
You should use the includeModule command to load the test module. The
includeModule command
can load up multiple test modules. Then define your DDT as follows,
class TelluriumIssuesDataDrivenTest extends TelluriumDataDrivenTest{
public void testDataDriven() {
includeModule org.telluriumsource.ddt.TelluriumIssuesModule.class
//load file
loadData
"src/test/resources/org/telluriumsource/data/TelluriumIssuesInput.txt"
useCache(true);
useClosestMatch(true);
//read each line and run the test script until the end of the file
stepToEnd()
//close file
closeData()
}
}
BTW, the new tellurium reference project tellurium-website includes the
above test case, you can download
the RC1 release from
http://aost.googlecode.com/files/tellurium-0.7.0-RC1.tar.gz
and run this test case to see if you have any problem.
Thanks,
Jian
On Thu, Feb 11, 2010 at 6:42 AM, dominicm <[email protected]>wrote:
> Hi,
>
> I'm currently trying to implement data driven testing for our solution
> using Tellurium. I've copied over the TelluriumIssuesModule.groovy and
> the TelluriumIssuesModuleDataDrivenTest.groovy from the refereence
> project and have created the following Java class to run them
>
> package com.betfair.ddt;
>
> import
> com.betfair.www.website.datadriven.TelluriumIssuesDataDrivenTest;
> import com.betfair.www.website.datadriven.TelluriumIssuesModule;
>
> public class TelluriumIssuesTest {
>
> protected static TelluriumIssuesDataDrivenTest ddtTest;
> protected static TelluriumIssuesModule issuesModule;
> public void runTest() throws Throwable{
>
> issuesModule = new TelluriumIssuesModule();
> issuesModule.defineModule();
> ddtTest = new TelluriumIssuesDataDrivenTest();
> ddtTest.testDataDriven();
> ddtTest.run();
> }
> }
>
> During issuesModule.DefineModule() i get the following error:
>
> Caused by: java.lang.NullPointerException: Cannot invoke method
> FieldSet() on null object
> at
> org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:
> 77)
> at
>
> org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:
> 751)
> at
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:
> 728)
> at
> org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:
> 17)
> at
>
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
> 40)
> at
>
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
> 117)
> at
>
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
> 129)
> at
>
> com.betfair.www.website.datadriven.TelluriumIssuesModule.defineModule(TelluriumIssuesModule.groovy:
> 83)
> at
> com.betfair.ddt.TelluriumIssuesTest.runTest(TelluriumIssuesTest.java:
> 14)
> ... 12 more
>
> What am I doing wrong??
>
> --
> 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]<tellurium-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/tellurium-users?hl=en.
>
>
--
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.