Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed In starting

 
Rohan Deshmkh
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • 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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
    • 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
    Marshal
    Posts: 34178
    340
    Eclipse IDE Java VI Editor
    • Mark post as helpful
    • send pies
    • 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.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic