diff options
author | Justin Clark-Casey (justincc) | 2011-03-11 22:38:51 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-03-11 22:38:51 +0000 |
commit | cb863851e0149a931f3c79fdc7301e7086c3c16f (patch) | |
tree | ea7e8862f5dd663ea721bed7887619242e89abe5 /TESTING.txt | |
parent | Change how map blocks are encoded to make map search (diff) | |
download | opensim-SC_OLD-cb863851e0149a931f3c79fdc7301e7086c3c16f.zip opensim-SC_OLD-cb863851e0149a931f3c79fdc7301e7086c3c16f.tar.gz opensim-SC_OLD-cb863851e0149a931f3c79fdc7301e7086c3c16f.tar.bz2 opensim-SC_OLD-cb863851e0149a931f3c79fdc7301e7086c3c16f.tar.xz |
Update/simplify test running instructions
Diffstat (limited to '')
-rw-r--r-- | TESTING.txt | 81 |
1 files changed, 7 insertions, 74 deletions
diff --git a/TESTING.txt b/TESTING.txt index e0a7748..54fc976 100644 --- a/TESTING.txt +++ b/TESTING.txt | |||
@@ -2,23 +2,14 @@ | |||
2 | 2 | ||
3 | == Running Tests == | 3 | == Running Tests == |
4 | 4 | ||
5 | On Linux: | 5 | On Linux you will need to have NUnit installed (http://www.nunit.org). |
6 | This is commonly available in distribution package repositories. | ||
6 | 7 | ||
7 | > nant test | 8 | When this is installed, run the command |
8 | |||
9 | This will print out to the console the test state. | ||
10 | |||
11 | On Windows: Please see the TESTING ON WINDOWS section below. | ||
12 | 9 | ||
10 | > nant test | ||
13 | 11 | ||
14 | Also, every checkin will run tests that are kicked off by bamboo. | 12 | Please see the TESTING ON WINDOWS section below for Windows instructions. |
15 | Results are posted here: http://www.opensimulator.org:8085/ as well as | ||
16 | to #opensim-dev IRC channel. | ||
17 | |||
18 | == Writing Tests == | ||
19 | |||
20 | Tests are written to run under NUnit. For more information on NUnit | ||
21 | please see: http://www.nunit.org/index.php | ||
22 | 13 | ||
23 | == Adding Tests == | 14 | == Adding Tests == |
24 | 15 | ||
@@ -32,70 +23,15 @@ that if you are writing tests they end up in a "Tests" sub-directory | |||
32 | of the directory where the code you are testing resides. | 23 | of the directory where the code you are testing resides. |
33 | 24 | ||
34 | If you have added a new test assembly that hasn't existed before you | 25 | If you have added a new test assembly that hasn't existed before you |
35 | must list it in both ".nant/local.include" and ".nant/bamboo.build" | 26 | must list it in both ".nant/local.include" |
36 | for it to be accessible to Linux users and to the continuous | 27 | for it to be accessible to Linux users and to the continuous |
37 | integration system. | 28 | integration system. |
38 | 29 | ||
39 | |||
40 | === The Gory Details === | ||
41 | The following is the original document which started off this | ||
42 | document. It should probably be better integrated with the new info. | ||
43 | |||
44 | ==UPDATE== | ||
45 | |||
46 | The text immediately following is an update to the testing documentation. The | ||
47 | update is written on 2008.08.30 and is copied from an email to the opensim-dev | ||
48 | mailing list[1]. The information below the update, beginning with the section | ||
49 | titled TESTING, is still relevant, so please read this document in its | ||
50 | entirety. | ||
51 | |||
52 | Mike Mazur | ||
53 | |||
54 | [1] https://lists.berlios.de/pipermail/opensim-dev/2008-August/002695.html | ||
55 | |||
56 | """ | ||
57 | The tests are contained in certain DLLs. At the time of writing, these DLLs | ||
58 | have tests in them: | ||
59 | |||
60 | OpenSim.Region.ScriptEngine.Common.Tests.dll | ||
61 | OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests.dll | ||
62 | OpenSim.Region.ScriptEngine.Shared.Tests.dll | ||
63 | OpenSim.Framework.Tests.dll OpenSim.Region.CoreModules.dll | ||
64 | OpenSim.Region.Physics.OdePlugin.dll[2] | ||
65 | |||
66 | The console command used to run the tests is `nunit-console` (or | ||
67 | `nunit-console2` on some systems). This command takes a listing of DLLs to | ||
68 | inspect for tests. | ||
69 | |||
70 | Currently Bamboo's[3] build file (.nant/bamboo.build) lists only those DLLs | ||
71 | for nunit-console to use. However it would be equally correct to simply pass | ||
72 | in all DLLs in bin/; those without tests are just skipped. | ||
73 | |||
74 | The nunit-console command generates a file TestResults.txt by default. This is | ||
75 | an XML file containing a listing of all DLLs inspected, tests executed, | ||
76 | successes, failures, etc. If nunit-console is passed in all DLLs in bin/, this | ||
77 | file bloats with lots of entries like this: | ||
78 | |||
79 | <test-suite name="/home/mike/source/workspace/bin/OpenSim.Grid.Communications.OGS1.dll" success="True" time="0.000" asserts="0"> | ||
80 | <results /> | ||
81 | </test-suite> | ||
82 | <test-suite name="/home/mike/source/workspace/bin/OpenSim.Region.ClientStack.dll" success="True" time="0.000" asserts="0"> | ||
83 | <results /> | ||
84 | </test-suite> | ||
85 | |||
86 | Therefore it makes more sense to me to specify the DLLs when running | ||
87 | nunit-console. | ||
88 | |||
89 | [2] Note that OpenSim.Region.Physics.OdePlugin.dll is in bin/Physics/ and | ||
90 | needs to be first copied to bin/ before nunit-console is executed. | ||
91 | [3] http://opensimulator.org:8085/ | ||
92 | """ | ||
93 | |||
94 | ==TESTING ON WINDOWS== | 30 | ==TESTING ON WINDOWS== |
95 | 31 | ||
96 | To use nunit testing on opensim code, you have a variety of methods. The | 32 | To use nunit testing on opensim code, you have a variety of methods. The |
97 | easiast methods involve using IDE capabilities to test code. Using | 33 | easiast methods involve using IDE capabilities to test code. Using |
98 | VS2005/2008 I recommend using the testing capabilities of Resarper(commercial) | 34 | VS2005/2008 I recommend using the testing capabilities of Resharper(commercial) |
99 | or TestDriven.Net(free). Both will recognize nunit tests within your | 35 | or TestDriven.Net(free). Both will recognize nunit tests within your |
100 | application and allow you to test them individually, or all at once, etc. You | 36 | application and allow you to test them individually, or all at once, etc. You |
101 | will also be able to step into debug mode into a test through these add-ins | 37 | will also be able to step into debug mode into a test through these add-ins |
@@ -133,6 +69,3 @@ Example | |||
133 | 69 | ||
134 | nunit-console2 OpenSim.Framework.Tests.dll (on linux) | 70 | nunit-console2 OpenSim.Framework.Tests.dll (on linux) |
135 | nunit-console OpenSim.Framework.Tests.dll (on windows) | 71 | nunit-console OpenSim.Framework.Tests.dll (on windows) |
136 | |||
137 | For more information on testing contact the autor of this testing readme: Daedius Moskvitch ( daedius @@@@ daedius com) | ||
138 | |||