java - Call an XMLUnit-test from another class -
i'm using xmlunit compare 2 xmls. works fine when perform test class manual junit test.
but want call tests have class. can perform testmethod, nothing happens
here example class test:
public class tests extends xmltestcase{ public void testforequality() throws exception { string mycontrolxml = "<msg><uuid>2376</uuid><uuuid>23767</uuuid></msg>"; string mytestxml = "<msg><uuid>2376</uuid><uuuid>23767</uuuid></msg>"; assertxmlequal(mycontrolxml, mytestxml); } }
here have tried call class:
public class testexternalcall{ public static void main(string[] args) { tests comparetest= new tests (); comparetest.testforequality(); } }
blue
yes can that... test method called simple java code , there no failures simple pass test , not print in testexternalcall.java.
add system.out.println("finished...");
in tests.java last line. gets printed.
or change code below different value test fail , failure logs.
string mytestxml = "<msg><uuid>2376</uuid><uuuid>23767xxxxxxxx</uuuid></msg>";
Comments
Post a Comment