[selenium-users] junit.framework.testsuite$1.warning

1,135 views
Skip to first unread message

sachin Gainewar

unread,
Dec 16, 2011, 2:44:40 AM12/16/11
to seleniu...@googlegroups.com

Hi All , 
 
I am getting the error message  "junit.framework.testsuite$1.warning " while running the script as Junit . Could you please help me ? does this means Junit-4.10.jar file is not containing the all the classes . Code are as below :
------


package socialMediaTest;
import com.thoughtworks.selenium.*;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.server.SeleniumServer;

import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.SeleneseTestCase;
import com.thoughtworks.selenium.Selenium;





public class FB extends SeleneseTestCase  {
@Before
public void setUp() throws Exception {
SeleniumServer seleniumserver = new SeleniumServer ();
seleniumserver.start();
selenium = new DefaultSelenium ("Local Host",4444,"*Chrome","http://www.cardratings.com");
selenium.start();
}
@ Test
public void TestFacebook() throws Exception {
selenium.open("http://www.cardratings.com");
selenium.click("id=media_facebook_text");
selenium.setSpeed("20000");
selenium.click("id=media_twitter_text");
selenium.setSpeed("20000");
selenium.click("aria-label=Click here to publicly +1 this.");


Thanks,
Sachin





Sel List

unread,
Dec 16, 2011, 4:25:50 AM12/16/11
to seleniu...@googlegroups.com
is the the complete error? What exception is being thrown?
-Regards





--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

sac

unread,
Dec 16, 2011, 5:48:51 AM12/16/11
to Selenium Users
Complete error thrown is

warning(junit.framework.TestSuite$1)
junit.framework.AssertionFailedError: No tests found in
socialMediaTest.FB
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.TestSuite$1.runTest(TestSuite.java:97)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
344)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
196)


Can any body let know hot to resolved this issue

Thanks,
Sachin

On Dec 16, 2:25 pm, Sel List <sel.lis...@gmail.com> wrote:
> is the the complete error? What exception is being thrown?
> -Regards
>
> On Fri, Dec 16, 2011 at 1:14 PM, sachin Gainewar

> <sachingaine...@gmail.com>wrote:

Nitin Malik

unread,
Dec 18, 2011, 4:31:20 AM12/18/11
to seleniu...@googlegroups.com
You need to extend TestCase and not SeleneseTestCase

sac

unread,
Dec 19, 2011, 11:40:37 PM12/19/11
to Selenium Users
Hi Nitin extend is also not working the same still i am getting the
same error

saju thomas

unread,
Dec 20, 2011, 12:52:46 AM12/20/11
to Selenium Users
Try junit 3 .

> > >http://groups.google.com/group/selenium-users?hl=en.- Hide quoted text -
>
> - Show quoted text -

Gulshan Saini

unread,
Dec 20, 2011, 3:24:52 AM12/20/11
to seleniu...@googlegroups.com
Can you please remove space between @ & Test (@ Test)

and try again.

Mark Collin

unread,
Dec 20, 2011, 3:57:08 AM12/20/11
to seleniu...@googlegroups.com
You have a space between @ and Test and you are extending the deprecated
method SeleneseTestCase which is no longer supported.

You need to extend SeleneseTestBase and get rid of the space:

public class scratch extends SeleneseTestBase {

Complete error thrown is

478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:
344)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:

196)

Thanks,
Sachin


--
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.

If you have received this email in error please notify postm...@ardescosolutions.com

sac

unread,
Dec 20, 2011, 7:22:57 AM12/20/11
to Selenium Users
Hey Mark
I have removed the space between @ and Test. Still i am getting the
same error,
It's seen script has decided that it always giving the same error for
any kind of changes ...:)

Now below is code
----------------------------------


package socialMediaTest;
import com.thoughtworks.selenium.*;

public class FB extends SeleneseTestCase {
@Before
public void setUp() throws Exception {

selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://
www.cardratings.com");
selenium.start();
}

@Test
public void tesTFacebook() throws Exception
{
selenium.open("http://www.cardratings.com");
// click on FB icon


selenium.click("id=media_facebook_text");
selenium.setSpeed("20000");

//Click on twitter icon


selenium.click("id=media_twitter_text");
selenium.setSpeed("20000");

//Click on google+1 icon
selenium.click("id=button");
String [] winNames= selenium.getAllWindowTitles();
//All windows name should be displayed in console
for (int i= 0; i< winNames.length; i++)
{
System.out.println ("Window Titles are " + winNames[i]);

}

}

@After
public void tearDown () throws Exception {
selenium.stop();

}


}

> For more options, visit this group athttp://groups.google.com/group/selenium-users?hl=en.


>
> --
> This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
>

> If you have received this email in error please notify postmas...@ardescosolutions.com

Mark Collin

unread,
Dec 20, 2011, 7:32:32 AM12/20/11
to seleniu...@googlegroups.com
That's because you ignored the second part of my post which said that
SeleneseTestCase is deprecated and won't work.

Change SeleneseTestCase to SeleneseTestBase as previously suggested (and
shown in the code snippet I pasted back)

Lutfi Dughman

unread,
Dec 20, 2011, 8:06:48 AM12/20/11
to seleniu...@googlegroups.com
i do recall that you cant use annotation and extend junit base class at the same time.

Mark Collin

unread,
Dec 20, 2011, 8:56:31 AM12/20/11
to seleniu...@googlegroups.com

SeleneseTestBase doesn’t extend anything.


-- This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify postm...@ardescosolutions.com

Lutfi Dughman

unread,
Dec 20, 2011, 10:26:47 AM12/20/11
to seleniu...@googlegroups.com
you're correct. Ignore my comment then.
Reply all
Reply to author
Forward
0 new messages