Changes for page Testing

Last modified by Pascal Robert on 2012/01/03 10:53

From version 21.1
edited by Ray Kiddy
on 2009/07/29 16:18
Change comment: re-format, adding example
To version 32.1
edited by Ray Kiddy
on 2009/07/29 15:59
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,69 +14,29 @@
1 -There are many documents relevant to testing that should be evaluated for veracity, usefulness and relevance:
2 -
3 -* http:~/~/wiki.objectstyle.org/confluence/display/WO/Project+WONDER-Frameworks-ERSelenium
4 -* http:~/~/wiki.objectstyle.org/confluence/display/WONDER/Selenium+Introduction
5 -* http:~/~/wiki.objectstyle.org/confluence/display/WO/Web+Services-Testing+Services+with+Terminal
6 -* http:~/~/wiki.objectstyle.org/confluence/display/WO/Web+Applications-Development-Testing+and+JUnit
7 -* http:~/~/wiki.objectstyle.org/confluence/display/WONDER/How+to+Develop+Selenium+Tests
8 -* http:~/~/wiki.objectstyle.org/confluence/display/WO/Testing-Load+Testing+WO+Apps+with+JMeter
9 -* http:~/~/wiki.objectstyle.org/confluence/display/WO/Testing-JUnit
10 -* http:~/~/wiki.objectstyle.org/confluence/display/WO/Testing-WOUnitTest
11 -
12 -== Junit Testing of Project Wonder in Ant Builds ==
13 -
14 14  I have checked in changes to the ant build files. The result of these is:
15 15  
16 -1. 1) If you do a build as you used to do a build, there should be no change.
17 -1. 2) There are two targets at the top-level:
18 -1*. test-all - does a clean and then build of frameworks,applications, and examples with Dinclude.tests=true.
19 -1*. test-run - calls a junit test on selected proje
20 -1. 3) If the "test-all" target is invoked, then, in addition to any test sources being built in the other projects, the Wonder/Tests/ERXTest project is built. Is anyone involved in that project? If not, no harm, no foul.
21 -1. 4) I added a little stub of a test to ERExtensions. It does nothing right now.
22 -1. 5) I added a top-level target for "build" in Wonder/build.xml, just because it should be there.
3 +1) If you do a build as you used to do a build, there should be no change.
23 23  
24 -Various things are needed to enable testing in a project:
5 +2) There are two targets at the top-level:
25 25  
26 -1. 1) There must be a "Tests" directory in the top level of the project. So chill has spoken and thus it shall be done. Put junit test java sources under that.
27 -1. There must be a parameter which defines the main test class. This could be a TestSuite, which would then invoke all the tests in the project. For example, the "ERChronic.all" target in the Build/build/build.xml file now includes the line:
28 -1*. <param name="test.className" value="er.chronic.ChronicTestSuite" />
7 +&nbsp;&nbsp; &nbsp;test-all - does a clean and then build of frameworks,applications, and examples with Dinclude.tests=true.
29 29  
30 -If there is no Tests directory in a project or if there are no sources in the Tests directory, then a build for testing does nothing more than a normal build. If there is no test.className property set in a project's target, then a build for testing does nothing more than a normal build. If there is no test.className property or there are no test classes in the jar files in the build root, then no tests from that project will be run. An example of a "test-run" appears below.\\
9 +&nbsp;&nbsp; &nbsp;test-run - calls a junit test on selected projects
31 31  
32 -{{code}}
11 +3) If the "test-all" target is invoked, then, in addition to any test sources being built in the other projects, the Wonder/Tests/ERXTest project is built. Is anyone involved in that project? If not, no harm, no foul.
33 33  
34 -% cd Wonder
35 -% ant tests.run
36 -Buildfile: build.xml
13 +4) I added a little stub of a test to ERExtensions. It does nothing right now.
37 37  
38 -tests.run:
15 +5) I added a top-level target for "build" in Wonder/build.xml, just because it should be there.
39 39  
40 -tests.run:
17 +Various things are needed to enable testing in a project:
41 41  
42 -ERExtensions.all:
19 +1) There must be a "Tests" directory in the top level of the project. So chill has spoken and thus it shall be done. Put junit test java sources under that.
43 43  
44 -global.environment:
21 +2) There must be a parameter which defines the main test class. This could be a TestSuite, which would then invoke all the tests in the project. For example, the "ERChronic.all" target in the Build/build/build.xml file now includes the line:
45 45  
46 -global.properties:
23 +&nbsp;&nbsp; &nbsp;<param name="test.className" value="er.chronic.ChronicTestSuite" />
47 47  
48 -global.framework.test:
49 -    [junit] Testsuite: er.extensions.statistics.ERXMetricsTest
50 -    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.002 sec
51 -    [junit]
25 +If there is no Tests directory in a project or if there are no sources in the Tests directory, then a build for testing does nothing more than a normal build.
52 52  
53 -ERChronic.all:
27 +If there is no test.className property set in a project's target, then a build for testing does nothing more than a normal build.
54 54  
55 -global.environment:
56 -
57 -global.properties:
58 -
59 -global.framework.test:
60 -    [junit] Testsuite: er.chronic.ChronicTestSuite
61 -    [junit] Tests run: 74, Failures: 0, Errors: 0, Time elapsed: 0.355 sec
62 -    [junit]
63 -
64 -BUILD SUCCESSFUL
65 -Total time: 0 seconds
66 -
67 -{{/code}}
68 -
69 -\\
29 +If there is no test.className property or there are no test classes in the jar files in the build root, then no tests from that project will be run. An example of a "test-run" appears below.