I just added the support for the configuration file check. That can be
easily demonstrated by the following example, if we comment out the
following section in TelluriumConfig.groovy

      //the bundling tier
//    bundle{
//        maxMacroCmd = 5
//        useMacroCommand = false
//    }

What will happen? Tellurium will throw the following exception

java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at 
org.telluriumsource.bootstrap.TelluriumSupport.class$(TelluriumSupport.groovy)
        at 
org.telluriumsource.bootstrap.TelluriumSupport.$get$$class$org$telluriumsource$framework$TelluriumFrameworkMetaClass(TelluriumSupport.groovy)
        at 
org.telluriumsource.bootstrap.TelluriumSupport.addSupport(TelluriumSupport.groovy:17)
        at 
org.telluriumsource.test.java.TelluriumTestNGTestCase.setUpForTest(TelluriumTestNGTestCase.java:22)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:607)
        at 
org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:417)
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:154)
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:88)
        at org.testng.TestRunner.beforeRun(TestRunner.java:510)
        at org.testng.TestRunner.run(TestRunner.java:478)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
        at org.testng.SuiteRunner.run(SuiteRunner.java:204)
        at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:867)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:832)
        at org.testng.TestNG.run(TestNG.java:748)
        at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
        at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
Caused by: org.telluriumsource.exception.ConfigNotFoundException:
Cannot find Tellurium Configuration tellurium.bundle.maxMacroCmd,
please check http://code.google.com/p/aost/wiki/TelluriumConfig070 for
updated TelluriumConfig.groovy, or report to Tellurium user group at
http://groups.google.com/group/tellurium-users
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at 
org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
        at 
org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:107)
        at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:52)
        at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:192)
        at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:200)
        at 
org.telluriumsource.config.TelluriumConfigurator.checkConfig(TelluriumConfigurator.groovy:41)



On Fri, Dec 11, 2009 at 10:10 AM, Jian Fang <[email protected]>wrote:

> Wow, you updated so quickly. Sorry for the inconvenience. I am working on
> the wiki page for all
> the updates. Still in progress, but most parts are done now, you may like
> to take a look and feel
> free to provide some suggestions.
>
> http://code.google.com/p/aost/wiki/Tellurium070Update
>
> You have very good point about the error message of the configuration file.
> We certainly will add that support.
>
> Please let us know if you have any other problems.
>
> Thanks,
>
> Jian
>
> On Fri, Dec 11, 2009 at 7:43 AM, Jonathan Share <[email protected]>wrote:
>
>> 2009/12/9 John <[email protected]>:
>> > Hi all,
>> >
>> > Since there are a lot of changes in the code after the merge and
>> > update, I like to change the tellurium core package name from
>> > org.tellurium to org.telluriumsource. The reason is that tellurium.org
>> > does not really belong to us. We have registered the
>> > telluriumsource.org domain name. I plan to do that tonight and create
>> > a wiki page to list all the changes.
>> >
>> > Any objections?
>>
>> Just a short experience report from after the change (as I'm running
>> the 0.7.0-SNAPSHOT version.
>>
>> The first thing I noticed as a problem was that I got the following
>> error when trying to run my tests
>>
>> java.lang.ExceptionInInitializerError
>>        at java.lang.Class.forName0(Native Method)
>>        at java.lang.Class.forName(Class.java:169)
>>        at
>> org.tellurium.bootstrap.TelluriumSupport.class$(TelluriumSupport.groovy)
>>        at
>> org.tellurium.bootstrap.TelluriumSupport.$get$$class$org$tellurium$framework$TelluriumFrameworkMetaClass(TelluriumSupport.groovy)
>> ...
>> Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException:
>> Cannot cast object &apos;{}&apos; with class
>> &apos;groovy.util.ConfigObject&apos; to class
>> &apos;java.lang.Number&apos;
>>        at
>> org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToNumber(DefaultTypeTransformation.java:130)
>>        at
>> org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.intUnbox(DefaultTypeTransformation.java:56)
>>        at
>> org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:300)
>>        at
>> org.codehaus.groovy.reflection.CachedField.setProperty(CachedField.java:61)
>>        at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2339)
>>        at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3279)
>>        at
>> org.tellurium.framework.Environment.setProperty(Environment.groovy)
>>        at groovy.lang.GroovyObject$setProperty.call(Unknown Source)
>>        at
>> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
>>        at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>>        at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
>>        at
>> org.tellurium.config.TelluriumConfigurator.configEnvironment(TelluriumConfigurator.groovy:230)
>>
>> The first thing I did was to go back to my maven module containing my
>> tellurium modules where I started getting messages about
>> TelluriumJavaTestCase DslContext not being found, at which point I
>> remembered this thread and updated my maven dependencies and imports
>> allowing my modules to build.
>>
>> However this did not fix the problem above, it seems that this is the
>> error message you get when there is something missing from
>> TelluriumConfig.groovy. After overwriting my TelluriumConfig with the
>> one found in trunk my tests started running again.
>>
>> It would be nice if;
>> a) If a property is missing from the config then a sane default is used
>> or;
>> b) when a property is found to be missing from the config a better
>> error message should be rendered, telling which property caused the
>> problem and telling the user where they can find a sample config file.
>>
>> Regards,
>>
>> Jonathan
>>
>> --
>>
>> 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.


Reply via email to