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,550
    My Mood
    Grumpy
    Thanks
    0
    Thanked 169 Times in 160 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 287 Times in 225 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 - The problems with cross-posting

    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.

    Looking for a Java job? Visit - Java Programming Careers

  5. #5
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 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.

    Looking for a Java job? Visit - Java Programming Careers

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, 10:26 PM
  3. [SOLVED] JUnit initialization error
    By raphytaffy in forum Java IDEs
    Replies: 2
    Last Post: September 20th, 2010, 06:33 PM
  4. Getting input
    By BuhRock in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 22nd, 2010, 11: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, 05:44 AM