BTW, Tellurium 0.8.0 provides a new way to change the configuration at
runtime, i.e, the following two methods

String getEnvironment(String key)
void setEnvironment(String key, String value)

For example, here is the test case in the LogonTestCase on trunk/core
project.

    @Test
    public void testEnvironment(){
        String fileName = (String)
getEnvironment("tellurium.test.result.filename");
        assertNotNull(fileName);
        System.out.println("Default test result file name " + fileName);

        setEnvironment("tellurium.test.result.filename",
"/tmp/TestResult.output");
        fileName = (String)
getEnvironment("tellurium.test.result.filename");
        assertEquals("/tmp/TestResult.output", fileName);
        System.out.println("New file name " + fileName);
    }


On Thu, May 26, 2011 at 6:01 PM, Jian Fang <[email protected]> wrote:

> You should call connectSeleniumServer() before you call connectUrl().
>
> The comment out is fine because the Tellurium Injector framework will
> automatically inject the instance to the
> Selenium connector.
>
> Try this,
>
>
>     @BeforeClass
>     public static void initUi() {
>         Logon = new LogonModule();
>         connectSeleniumServer();
>
>     }
>
>     @Test
>     public void testEnvironment() {
>         setCustomConfig(true, 5555, "*firefox", true, "");
>         connectUrl("http://localhost/";);
>         assertEquals("output", "output");
>     }
>
> Thanks,
>
> Jian
>
>
> On Thu, May 26, 2011 at 1:06 PM, KevinO <[email protected]> wrote:
>
>> I have the following code:
>>
>> public class TestingTestCase extends TelluriumJUnitTestCase {
>>
>>        //private static Logger logger =
>> Logger.getLogger(TestingTestCase.class.getName());
>>        private static LogonModule Logon;
>>        @BeforeClass
>>        public static void initUi() {
>>                Logon = new LogonModule();
>>        }
>>        @Test
>>    public void testEnvironment(){
>>                setCustomConfig(true, 5555, "*firefox", true, "");
>>                connectUrl("http://localhost/";);
>>                assertEquals("output","output");
>>        }
>> }
>>
>> I'm getting a Cannont invoke method open() on null object.  It is
>> referencing to the method
>> org.telluriumsource.component.connector.SeleniumConnector.connectUrl()
>>
>> I noticed in the class that connectSeleniumServer() has the
>> instantiation of the sel object comment out.  This would lead to the
>> issues of that object being null.  Have I missed something in setup?
>>
>> The following is my stack trace: http://paste.scsys.co.uk/107533
>>
>> --
>> 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.
>>
>>
>

-- 
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