Changes for page Thrash Testing
Last modified by Ray Kiddy on 2009/11/04 13:00
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,0 @@ 1 -Testing - Content
-
... ... @@ -1,6 +1,6 @@ 1 1 One can test EOF operations in concurrent threads using the "thrash" test built into Wonder. One uses ant to execute the tests. 2 2 3 -See [[ERXThrashTest.java>> url:http://wonder.svn.sourceforge.net/viewvc/wonder/trunk/Wonder/Frameworks/Core/ERExtensions/Tests/Sources/er/extensions/eof/ERXThrashTest.java?view=markup||shape="rect"]] in the Wonder sources. One can define inner classes in that class. The "SimpleFetchTest" and "SimpleInsertTest" classes are examples. The thrash test will take a "scheme" that can be specified by the user and execute that scheme.3 +See [[ERXThrashTest.java>>http://wonder.svn.sourceforge.net/viewvc/wonder/trunk/Wonder/Frameworks/Core/ERExtensions/Tests/Sources/er/extensions/eof/ERXThrashTest.java?view=markup]] in the Wonder sources. One can define inner classes in that class. The "SimpleFetchTest" and "SimpleInsertTest" classes are examples. The thrash test will take a "scheme" that can be specified by the user and execute that scheme. 4 4 5 5 {{code}} 6 6 ... ... @@ -12,14 +12,6 @@ 12 12 13 13 There is a target defined in ant which will run a pre-defined set of schemes. 14 14 15 -One can pass in a string parameter to the tests. This can, of course, be used for any purpose. For example, the SimpleInsertTest inner class can use a subclass of EOEditingContext instead of using EOEditingContext itself. Thus, the same test as above can be run using ERXEC with this command: 16 - 17 -{{code}} 18 - 19 -scheme:SimpleInsertTest:er.extensions.eof.ERXEC:0-5,5-10,15-10,20-10 20 - 21 -{{/code}} 22 - 23 23 This set of commands will compile the tests (the ERXThrashTest class compilation is conditional on having "include.tests=true" defined in the ant build of the ERExtensions project) and run the thrash tests: 24 24 25 25 {{code}} ... ... @@ -36,16 +36,3 @@ 36 36 ant thrash -Dthrash.scheme=scheme:SimpleInsertTest::0-50,5-100,15-100,20-100 37 37 38 38 {{/code}} 39 - 40 -The tests rely on a few things. Values need to be set in the ~~/Library/wobuild.properties file: 41 - 42 -{{code}} 43 - 44 -wonder.test.thrash.adaptor=MySQL 45 -wonder.test.thrash.url=jdbc:mysql://localhost/wotesting 46 -wonder.test.thrash.user=ray 47 -wonder.test.thrash.pwd=zekretword 48 - 49 -{{/code}} 50 - 51 -The "SimpleFetchTest" and "SimpleInsertTest" inner classes will load the "BusinessModel" in the ERExtensions framework, based on the defined adaptor. For example, with the information above, the "MySQLBusinessModel.eomodeld" will be loaded by the tests and they rely on that model being available.