Results 1 to 9 of 9
Thread: Junit with input as xml
- 04-15-2011, 07:28 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 4
- Rep Power
- 0
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
- 04-15-2011, 07:42 AM #2
Duplicate post
Junit with input as xml
- 04-15-2011, 08:40 AM #3
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
What is the question here?
Are you asking
how to join together xml files using Java
or
how to read xml files in a JUnit test?
- 04-15-2011, 08:49 AM #4
Member
- Join Date
- Apr 2011
- Posts
- 4
- Rep Power
- 0
Hi! thnaks for ur reply! My quest is that how do i change aggregate values in the xml,during the execution of each test cases?
- 04-15-2011, 08:53 AM #5
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Still not clear. Maybe if you post some relevant code explaining where the problem is.
- 04-15-2011, 09:08 AM #6
Member
- Join Date
- Apr 2011
- Posts
- 4
- Rep Power
- 0
I am in the R&D phase of this requirement and yet to decide and start with the approach.
Here's detailed explanation of the requirement:
I am to test a class which has two two methods which need parameter values as String xml = myInputXML.toString();
method call in the test case will be like:
myTestCase(){
.... {1}
.... {2}
myService.myMethod(xml);
}
Now I want the values of the aggregates in the xml file to be changed at lines {1} and {2} in myTest()
Hope this makes it clear.Please ask if you need more details.
Also,U can suggest any other framework if u this that will be better.
Thanks
- 04-15-2011, 09:34 AM #7
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Why not start with multiple input xml files with known values?
- 04-15-2011, 09:37 AM #8
Member
- Join Date
- Apr 2011
- Posts
- 4
- Rep Power
- 0
Thanks!Thats one option I have put as last thing to do ! Was just expolring things to make my test lighter as thr can be approx 20 cases and hence 20 xmls.
- 04-15-2011, 10:01 AM #9
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Similar Threads
-
JUnit issues
By aca10mpr in forum New To JavaReplies: 0Last Post: 03-05-2011, 11:48 AM -
JUnit
By cka in forum EclipseReplies: 3Last Post: 07-27-2010, 04:14 PM -
Input technique for unknown lines of input
By ducreative in forum New To JavaReplies: 16Last Post: 09-23-2009, 09:26 AM -
Junit
By Azndaddy in forum New To JavaReplies: 6Last Post: 06-15-2008, 06:47 AM -
how to take input and verify input in Java programs
By bilal_ali_java in forum Advanced JavaReplies: 0Last Post: 07-21-2007, 08:46 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks