Menu

#58 GUIReplayer - Malformed Testcase XML causes exception

open
nobody
None
5
2010-03-29
2010-03-29
Anonymous
No

When running the Replayer with the chosen test containing malformed XML (in this example, delete "<xml" at the beginning), a javax.xml.bind.UnmarshalException is thrown. Instead of this, a proper error should be shown.

Output:

[echo] Project.GUI.xml
[java] [main] INFO Testcase: ./TC/t_e11_e14.tst
[java] [main] INFO Log file: Project_log/t_e11_e14.tst.
Project.log

[java] [main] INFO GUI state file: ./Project_sta/t_e11_e14.tst.Project.STA.xml
[java] [main] ERROR javax.xml.bind.UnmarshalException
[java] - with linked exception:
[java] [org.xml.sax.SAXParseException: Content is not allowed in prolog.]

[java] [main] ERROR Test case not found
[java] java.io.FileNotFoundException
[java] at edu.umd.cs.guitar.replayer.JFCReplayer.execute(Unknown Source)
[java] at edu.umd.cs.guitar.replayer.JFCReplayerMain.main(Unknown Source)
[java] [main] INFO Time Elapsed: 00 : 00 : 00: 385

[java] [main] INFO Testcase: ./TC/t_e11_e14.tst
[java] [main] INFO Log file: Project_log/t_e11_e14.tst.Project.log
[java] [main] INFO GUI state file: ./Project_sta/t_e11_e14.tst.Project.STA.xml

To replicate the error:
-Build guitar.tool with 'ant -f build.xml modules'
-Make TC, and Project_sta directories
-run 'ant -Dproperties=jfcripper.properties -f jfcripper.xml'
-run 'ant -Dproperties=GUIStructure2GraphConvert.properties -f
GUIStructure2GraphConvert.xml'
-run 'ant -Dproperties=TestCaseGenerator.properties -f
TestCaseGenerator.xml'
-Edit a test listed in the jfcreplayer.properties file and remove "<xml" from the top so the file is now malformed.
-ant -Dproperties=jfcreplayer.properties -f jfcreplayer.xml

Jonathan Kay, Bria Smith, Paul Goldin, Arya Bhatt, Michael Braun, Anika Cartas, Alex Lockyear

Discussion


Log in to post a comment.

MongoDB Logo MongoDB