Using JAX-B, its amazing easy to convert java objects to xml and vice versa. Java Object --> XML (Marshalling) XML --> Java Object (Unmarshalling) We are going to create 3 DTO's and then, using JAX-B, will print the output to a log file. The DTO's have following hierarchy: TestSteps :--> TestCase :--> TestCases. The Main Class: /** * */ package main; import logger.Logger; /** * @author sundaram * */ public class Main { /** * @param args */ public static void main(String[] args) { Logger logger = new Logger("SampleLog1"); logger.writeToLogTestCase(1.0, "Title 1"); logger.writeToLogTestStep(1.0, 1.1, "Verify that part 1", "PASS", "Function FAM_ClientNotesPane has been executed successfully.", "[Table:NotesPanes; 1] Action = Action,ExecuteVerify = ExecuteVerify"); } } The Logger Class: Will Upload it shortly. Here are the 3 DT...
Comments
Post a Comment