Re: Script is terminated in Eclipse

2,070 views
Skip to first unread message

Gustavo Godoy

unread,
May 9, 2013, 2:48:06 PM5/9/13
to seleniu...@googlegroups.com
Hi,

Its not clear how error is thrown by your tests. Is a java error or a error in your test?

Enable 'Console view'  in your eclipse and put the exception throwed.

And I suggest to export from IDE to Junit 4 , also...

thanks.

gustavo


On Wednesday, May 8, 2013 4:45:44 PM UTC-3, testerse...@gmail.com wrote:
Hi All,
 
I am getting terminated error when i ran Selenium IDE script in Eclipse, please help me

1. I am added below jar files to Eclipse
junit-4.11.jar
selenium-java-2.32.0.jar
selenium-java-2.32.0-srcs.jar
Eclipse Java EE IDE for Web Developers.

I am using selenium IDE 2.0.0


2. I also added below jar file in Eclipse External Tools

selenium-server-standalone-2.32.0.jar

3. I Started above selenium server from cmd

4. Copied Converted Selenium IDE scripts(i converted my script to "Java/JUnit3/Remote Control)  to my eclipse when i run my scripts as JUnit it is giving be error<terminated> Testcase[JUnit] C:\Program Files\Java\jre7\bin\javaw.exe "

here is my script


package com.example.tests;

import com.thoughtworks.selenium.SeleneseTestCase;

@SuppressWarnings("deprecation")
public class Testcase extends SeleneseTestCase {
 public void setUp() throws Exception {
  setUp("https://<URL>/", "*firefox");
 }
 public void testCase() throws Exception {
  selenium.open("/index.xhtml?windowId=319");
  selenium.click("id=j_idt178");
  selenium.waitForPageToLoad("90000");
  selenium.click("id=j_idt169");
  selenium.waitForPageToLoad("90000");
  selenium.click("id=participant-types:3");
  selenium.click("//div[@id='opt4']/div[2]");
  selenium.click("id=j_idt224:j_idt235");
  selenium.waitForPageToLoad("90000");
  selenium.click("//div[@id='elig-indiv-opt1']/div[2]");
  selenium.click("id=j_idt353:j_idt364");
  selenium.waitForPageToLoad("90000");
  selenium.type("id=firstname", "df");
  selenium.type("id=lastname", "fgdf");
  selenium.type("id=address1", "rtert");
  selenium.type("id=address2", "reterter");
  selenium.type("id=city", "erwerwer");
  selenium.select("id=statesSelectMenu", "label=Colorado");
  selenium.click("css=option[value=\"CO\"]");
  selenium.type("id=zipCode", "44556");
  selenium.type("id=ezstep3IndPI:phoneNumber", "645645");
  selenium.type("id=email", "s...@email.com");
  selenium.type("id=confirmemail", "s...@email.com");
  selenium.click("id=j_idt224:j_idt235");
  selenium.waitForPageToLoad("90000");
  selenium.click("id=j_idt254:j_idt274");
 }
}

David Lai

unread,
May 9, 2013, 9:18:37 PM5/9/13
to seleniu...@googlegroups.com
Without any further info, I can't tell you exactly what's wrong.  But I suspect that you're using the wrong version of JUnit.

JUnit4, you'll normally use @Test annotations.  The code you have looks like a Junit 3 or older style where test cases extend a TestCase base class.

Gustavo Godoy

unread,
May 10, 2013, 6:40:56 AM5/10/13
to seleniu...@googlegroups.com
Hi,

The message:
"<terminated> Testcase2[JUnit] C:\Program Files\Java\jre7\bin\javaw.exe "
showed in your eclipse is not an error. Its a INFO thats your java code runned and terminated..
To know if your test run sucessfuly, enable the JUnit view in eclipse:

Window > Show view > Other
In show vie Dialog, open Java  and select Junit.



This view show to you the test result and, if fail, the reason why.

Please, Let us know if this help you....

Gustavo
Reply all
Reply to author
Forward
0 new messages