• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

JSUnit Eclipse Plugin ?  RSS feed

 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used JSUnit, but have not been able to get the plugin to work.

I D/L the zip file from sourceforge, extracted, and moved the directory to eclipse/plugins/net.jsunit_1.0.0

But when I right click on a js file, either on the Package Explorer or directly on an open JSFile, I go to Run As > but JSUnit test is not an option!

Please advise.

Thank you,

Garrett
 
Bartender
Posts: 20739
124
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You didn't say if you'd restarted Eclipse. Most plugins require a restart after you've unzipped the plugin.

Also, the plugin proper should be in a Packagename-format folder within ECLIPSE/plugins, just like the "org.eclipse...." folders. "Packagename-format" simply means an ordinary folder whose name looks like a package name. Not that it's absolutely mandatory to have names like that, but it makes it easier to figure out where the different plugins came from.

Some plugins aren't put together quite right, so you might have to relocate the plugin folder when you unzip it.
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim,

I'd like to try and figure this one out. It would be useful to run tests from right inside Eclipse, just like JUnit.

I did restart Eclipse.

Originally posted by Tim Holloway:
he plugin proper should be in a Packagename-format folder within ECLIPSE/plugins, just like the "org.eclipse...." folders. "Packagename-format" simply means an ordinary folder whose name looks like a package name.



Originally posted by Garrett Smith:
eclipse/plugins/net.jsunit_1.0.0



Originally posted by Tim Holloway:
Some plugins aren't put together quite right, so you might have to relocate the plugin folder when you unzip it.


Hmmm. Can you elaborate? What exactly should I do with the plugin directory?

Here's what I've got:

[ May 08, 2007: Message edited by: Garrett Smith ]
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Eclipse: Window > Preferences > JSUnit

I choose the installation directory for JSUnit ( /Users/gs/Downloads/jsunit/ )

Then what?
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then restart eclipse again.

Then, I get "run as JsUnit Test Page"

That's what I wanted!

So now I try to run a test. I stole this right from JSUnit tests directory. It does some basic assertions like assertTrue("true should be true", true);
Testfile: jsUnitAssertionTests.html

I don't see any console output.

Is it running? I don't see any error when I try to run.

Should I be using a ".js" file instead?

When I go back to Window > Preferences > JSUnit, I see an error, "The currently displayed page contains invalid values."

I don't know how to use JSUnit plugin. Tired.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!