Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • 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
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

JSUnit Eclipse Plugin ?

 
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
 
Saloon Keeper
Posts: 21625
147
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • 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.
 
Onion rings are vegetable donuts. Taste this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!