Home
User manual of JTDE - Java Test Data Editor Content
Contents
1. be referenced by several fields this is also supported by the editor How to Mi Bar java java Test Data Editor i Name Type Declaring Type Value d java util Date i bar Bar i lt null gt ist java util List bar Baz lt java util Li sub bar Foo bar Baz lt null gt l Reset Choose reference in a fields context menu only available for object types Select the instance to reference from the current attribute 1 bar Baz v O list java util List b 1 O bar Bar v 1 bar Foo number java lang Integer f java lang Float baz java lang Integer Cancel OK The populated fields of the whole data structure were shown now you can choose the instance to reference How to use the test data XStream Cause the data is written in the XStream format your project must contain XStream Just add XStream and it s XML parser XPP3 to the classpath XStream and further information can be found on http xstream codehaus org Parse As it s the normal XStream format you can simply deserialize the data using Object data new XStream fromXML new FileInputStream foo data The rest of the test code can be written as usual Page 5 of 5
2. JTDE user manual 07 03 10 User manual of JTDE Java Test Data Editor Content WS oer aks oc ene te ee Ena ETE Ee ES eee ET CTC aEE ENN COR a Stee A Ie Ra ee Tene een a er nT AIoTee 2 Tastan the PIUS M Rpeeeome me Nene noe esr cn mene eae mn ee ore a oe Oe ON 2 Car AIE ES I EEA PTEE EPEE A EEE PEATE E TEA EE TEETE T A EAN AE 3 TOES O een ta fe er eae tp eer en en eC ne EEE 4 CONO spc ec austere eh see tisenseateseiaer ects gusets T EA 4 PS UU UC ds PA lah asc adore cee a ea hale sala hte vec aeteb a satcsa Stale c de A EEO ers asa sess AN 4 RFCM Ahlers Siac aces Se ec ean eB ee A A 4 Cea 10 0 2181 oe Pe DP RRS RPO AP eA ORD TPE RRM NORRIS CPAP CARE SOC NOOL TET SEARED MINE RRR R OPS ER 4 CS Oe Nt Me NUD eer ras siete kas seer acs aaiaesiens sate comes satin uasteaaeoe talon dante N 4 Create a reL TENCO all INSlANC es sac See adele taihnd lh ce adalat he Macbeth saauian ileus tstehin ds 5 EON 0 ene ea Ne A aE RO ee Ce ee a eee 5 How tO USE Metes dalani n a a a iiasleedatnctaat acaaeeeate 5 AO UNA a EA E TEA E T A a 5 US NENE AEAEE EN ENE EEE EN ENE E EE EEE EA EAE E A 5 Page 1 of 5 JTDE user manual 07 03 10 Use case The main purpose of this editor is to create edit test data persisted in XStream files Outsourcing test data allows cleaner test code cause it has not to deal with setting up data objects You may use it also to edit adapt existing XStream records Installing the plugin e Close Eclipse e Copy ch jtde xyz jar to lt Ec
3. e foo int 1 A lt int 1 gt list 2 java util List 2 A 2 a MUL name 2 java lang String 2 A 2 arnd Columns e Name Name of the field or the key of an map entry e Type Type of the field e Declaring Type The class owning this field e Value String representation of the value Editable for atomic types i e strings and primitive types o Shows the concrete type name for non atomic types Button path i Bar java java Test Data Editor 3 Name Type Declaring Ty e The path starting at the object root toward the currently displayed element analogous to Thunar Nautilus e Click on a button to jump back to the represented element General e Double click a row to create an instance for a nulled attribute e Double click a row holding an instance to edit it steping into it e Click on the value cell to edit atomic values like strings and primitive types Create an instance e Double click the row of the field e Choose the concrete type for the instance only for non final types o Type dialog filters for assignable types o Abstract classes interfaces were not supported by default but you may write an extension for them t Currently there is one exception for collection types e The editor jumps into the newly created instance Context menu Further functionality may be found in the context menu of a field Page 4 of 5 JTDE user manual 07 03 10 Create a reference to an instance An instance may
4. lipse home gt dropins e Start Eclipse maybe with clean Page 2 of 5 JTDE user manual 07 03 10 Create test data file Select a wizard H Packa X fg Hierar 7 O Wizards x v 5 Foo v Test Data gt src amp Java Project Java Test Data b mAJRE Go Into Fj Project gt pARefe Open in New Window iY Package gt amp lib Open Type Hierarchy F4 Class Show In Shift Alt W P Interface Copy Sees E Copy Qualified Name Annotation Paste Ctri v 8 Source Folder X Delete Delete Java Working Set C3 Folder Build Path File Source Shift Alt S b E Untitled Text File Refactor Shift Alt T gt lt Bac Cancel ee E3 Other Ctrl N TestData File Wizard to create a new testdata file Enter or select the parent folder Foo deo 7 amp Foo amp settings gt amp bin lib gt src File name test data Baseclass bar Bar Browse Cancel Finish Parent folder Target folder for the file o The classpath of the parent project will be used to retrieve the required information about classes all classes to be used in the test data file must be present in this classpath e File name Name of the file e Baseclass Class for which you want to create test data o This must be a concrete class excepting for Collection types which have to be present on the projects classpath Page 3 of 5 JTDE user manual 07 03 10 The editor S b data ES Name Type Declaring Type Valu
Download Pdf Manuals
Related Search
Related Contents
DOSE IT Bedienungsanleitung ManualsLib - Makes it easy to find manuals online! Sony CFS-515L User's Manual Copyright © All rights reserved.
Failed to retrieve file