• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help needed In starting

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just started with jWebUnit . I wanted to write a simple program to check if i installed everything correctly, so i wrote following code:



I have no idea if this is correct or not.Can you tell where i am wrong?I could not find a complete example to run in order to check if everything is set up correctly.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rohan,
There is an example in the quick start on the jwebunit site. I see two problems in yours:

  • 1) It isn't being run as a unit test. JWebUnit is intended to be run by JUnit not as a main method.
  • 2) You should add the @Before/@Test annotations rather than having prepare call your test. JWebUnit is assuming you are using standard junit (see item #1) and may not work if you call things directly.
  •  
    Rohan Deshmkh
    Ranch Hand
    Posts: 127
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Jeanne Boyarsky wrote:Rohan,
    There is an example in the quick start on the jwebunit site. I see two problems in yours:

  • 1) It isn't being run as a unit test. JWebUnit is intended to be run by JUnit not as a main method.
  • 2) You should add the @Before/@Test annotations rather than having prepare call your test. JWebUnit is assuming you are using standard junit (see item #1) and may not work if you call things directly.


  • ok, i will start learning about JUnit first , and then i will come back to this problem.
    Thanks for clarifying , also i wanted to ask one more thing , does httpUnit work the same way, also how do you learn these things from documentation itself as no other resources are available.
     
    Jeanne Boyarsky
    author & internet detective
    Posts: 41860
    908
    Eclipse IDE VI Editor Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Yes. HttpUnit is similar.

    I learn by reading the documentation. I don't know how to answer beyond that. JWebUnit has the quickstart. HttpUnit has a tutorial and cookbook.
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic