Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Junit with input as xml

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Junit with input as xml

    Hello All,

    I am stuck with a testing issue!
    I have a class to perform unit testing for.The input to the methods in the class is string.This string is made by flattening one of my own XML.Now, to perform the tests,I want the aggregates of my XML to be configured for different inputs.

    Is there any way in Junits framework to perform such type of testing?Or is there any other framework which can make my this happen?

    Thanks in Advance,
    Mansi


  2. #2
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: Junit with input as xml

    Duplicate post

    This thread has been cross posted here:

    http://www.java-forums.org/new-java/42445-junit-input-xml.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting


  3. #3
    Junior Member
    Join Date
    Apr 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Junit with input as xml

    Hi,

    Didnt know that both sites are managed by same auhority.Infact, I was able to make seperate account for both!

  4. #4
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Junit with input as xml

    Quote Originally Posted by frendmansi View Post
    Hi,

    Didnt know that both sites are managed by same auhority.Infact, I was able to make seperate account for both!
    These 2 forums are totally seperate but some members are active on both.
    Please take the time to read - http://www.javaprogrammingforums.com...s-posting.html

    You will understand the situation then.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  5. #5
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Junit with input as xml

    You say your String is made by flattening one of my own XML.
    What do you mean exactly? Can you show us an example input and output please?
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. Junit and TestNG which one is best?
    By jammychen in forum Java Theory & Questions
    Replies: 0
    Last Post: November 7th, 2010, 05:32 AM
  2. JUnit test for ER
    By raphytaffy in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 20th, 2010, 09:26 PM
  3. [SOLVED] JUnit initialization error
    By raphytaffy in forum Java IDEs
    Replies: 2
    Last Post: September 20th, 2010, 05:33 PM
  4. Getting input
    By BuhRock in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 22nd, 2010, 10:30 AM
  5. [SOLVED] allow a new input, dicarding the last mismatch input without terminating the program
    By voltaire in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 9th, 2010, 04:44 AM