HI,
Ok... I am much further along now... just need to run the tests. When I try
to run via Eclipse as JUnit test
I get this msg : no tests found with test runner 'JUnit 4' .. I also tried with
'JUnit 3'. What else am I missing.
Thanks for your patience.
Regards
Manoj
--------------------------- My Test class -----------------------
package test;
import junit.framework.TestSuite;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.tellurium.test.java.TelluriumJavaTestCase;
import module.GoogleSearchModule;
/**
* Test cases created based on the GoogleSearchModule UI module
*/
public class GoogleSearchTestCase extends TelluriumJavaTestCase {
private static GoogleSearchModule gsm;
@BeforeClass
public static void initUi() {
gsm = new GoogleSearchModule();
gsm.defineUi();
}
@Before
public void connectToGoogle() {
connectUrl("http://www.google.com");
}
@Test
public void testGoogleSearchWithXPath() {
//turn off jQuery Selector
gsm.disableJQuerySelector();
gsm.doGoogleSearch("tellurium Groovy Test");
}
@Test
public void testGoogleSearchFeelingLuckyWithXPath() {
//turn off jQuery Selector
gsm.disableJQuerySelector();
gsm.doImFeelingLucky("tellurium automated Testing");
}
@Test
public void testGoogleSearchWithSelector() {
//turn on jQuery Selector
gsm.useJQuerySelector();
gsm.doGoogleSearch("tellurium Groovy Test");
}
@Test
public void testGoogleSearchFeelingLuckyWithSelector() {
//turn on jQuery Selector
gsm.useJQuerySelector();
gsm.doImFeelingLucky("tellurium automated Testing");
}
public static Test dssuite(){
TestSuite suite = new TestSuite();
System.out.println ("Adding Tests to a TestSuite.......");
suite.addTest(new MyBR("testGoogleSearchWithXPath"));
suite.addTest(new MyBR("testGoogleSearchFeelingLuckyWithXPath"));
suite.addTest(new MyBR("testGoogleSearchWithSelector"));
suite.addTest(new MyBR("testGoogleSearchFeelingLuckyWithSelector"));
return suite;
}
public static void main(String argv []){
public static void main(String args[]){
junit.textui.TestRunner.run(dssuite());
}
}
}
----- Original Message ----
> From: John <[email protected]>
> To: tellurium-users <[email protected]>
> Sent: Wednesday, May 13, 2009 2:21:24 PM
> Subject: Re: AOST - Beginner
>
>
> // Unable to recognize 'ui'
> Seems the tellurium core jar is not picked up by Eclipse.
>
> You need to check your class path to make sure Tellurium Core jar is
> in the project class path.
>
> Here is the introduction of Groovy Eclipse plugin,
>
> http://groovy.codehaus.org/Eclipse+Plugin
>
> Have you installed that correctly? What is your version of Eclipse?
>
> If you still have problem, I will try to reproduce it using the same
> settings as yours.
>
> Thanks,
>
> Jian
>
> On May 13, 4:52 pm, poweroftesting wrote:
> > Hi,
> >
> > I am a beginner to Tellurium but am a Selenium user, I am doing
> > something fundamentally wrong
> > trying to script Tellurium tests.
> >
> > Where can I find some complete sample code for creating Tellurium
> > Test cases?
> > I am using Eclipse IDE to develop my tests. I am able to develop
> > Selenium Tests using JUnit.
> > But when I create GoogleStartPage.java I get syntax errors. My source
> > is below (taken from the
> > project home). Some of the errors I have documented in the source
> > below as comments.
> > I am using tellurium-core.0.6.0.RC1.jar in my class path. Any help is
> > greatly appreciated.
> >
> > Regards,
> >
> > Manoj
> >
> > ---------------------------------------------
> > GoogleStartPage.java-------------------------------------------------
> >
> > import org.tellurium.dsl.DslContext;
> >
> > class GoogleStartPage extends DslContext
> > { // I am groovy-1.6.3.jar in class
> > path and it
> >
> >
> //
> > wants me to declare this class as abstract
> >
> >
> //
> > or add required setMetaClass abstract
> >
> >
> //
> > methods.
> > public void defineUi() {
> > ui.Container(uid: "GooglePage")
> > { // Unable to recognize 'ui'
> > which pkg should I
> >
> >
> //
> > import?
> > InputBox(uid: "InputBox", locator: "//input
> > [...@name='q']") // uid(String) undefined
> > Button(uid: "GoogleSearch", locator: "//input
> > [...@name='btnG']") // change to getLocator()
> > Button(uid: "FeelingLucky", locator: "//input
> > [...@name='btnI']")
> > }
> > }
> >
> > public void doGoogleSearch(String input){
> > type "GooglePage.InputBox", input
> > click "GooglePage.GoogleSearch"
> > waitForPageToLoad 30000
> > }
> >
> > public void doFeelingLucky(String input){
> > type "GooglePage.InputBox", input
> > click "GooglePage.FeelingLucky"
> > waitForPageToLoad 30000
> > }
> >
> > }
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---