aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/TESTING.txt
diff options
context:
space:
mode:
Diffstat (limited to 'TESTING.txt')
-rw-r--r--TESTING.txt81
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
5On Linux: 5On Linux you will need to have NUnit installed (http://www.nunit.org).
6This is commonly available in distribution package repositories.
6 7
7 > nant test 8When this is installed, run the command
8
9This will print out to the console the test state.
10
11On Windows: Please see the TESTING ON WINDOWS section below.
12 9
10 > nant test
13 11
14Also, every checkin will run tests that are kicked off by bamboo. 12Please see the TESTING ON WINDOWS section below for Windows instructions.
15Results are posted here: http://www.opensimulator.org:8085/ as well as
16to #opensim-dev IRC channel.
17
18== Writing Tests ==
19
20Tests are written to run under NUnit. For more information on NUnit
21please 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
32of the directory where the code you are testing resides. 23of the directory where the code you are testing resides.
33 24
34If you have added a new test assembly that hasn't existed before you 25If you have added a new test assembly that hasn't existed before you
35must list it in both ".nant/local.include" and ".nant/bamboo.build" 26must list it in both ".nant/local.include"
36for it to be accessible to Linux users and to the continuous 27for it to be accessible to Linux users and to the continuous
37integration system. 28integration system.
38 29
39
40=== The Gory Details ===
41The following is the original document which started off this
42document. It should probably be better integrated with the new info.
43
44==UPDATE==
45
46The text immediately following is an update to the testing documentation. The
47update is written on 2008.08.30 and is copied from an email to the opensim-dev
48mailing list[1]. The information below the update, beginning with the section
49titled TESTING, is still relevant, so please read this document in its
50entirety.
51
52Mike Mazur
53
54[1] https://lists.berlios.de/pipermail/opensim-dev/2008-August/002695.html
55
56"""
57The tests are contained in certain DLLs. At the time of writing, these DLLs
58have tests in them:
59
60OpenSim.Region.ScriptEngine.Common.Tests.dll
61OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests.dll
62OpenSim.Region.ScriptEngine.Shared.Tests.dll
63OpenSim.Framework.Tests.dll OpenSim.Region.CoreModules.dll
64OpenSim.Region.Physics.OdePlugin.dll[2]
65
66The 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
68inspect for tests.
69
70Currently Bamboo's[3] build file (.nant/bamboo.build) lists only those DLLs
71for nunit-console to use. However it would be equally correct to simply pass
72in all DLLs in bin/; those without tests are just skipped.
73
74The nunit-console command generates a file TestResults.txt by default. This is
75an XML file containing a listing of all DLLs inspected, tests executed,
76successes, failures, etc. If nunit-console is passed in all DLLs in bin/, this
77file 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
86Therefore it makes more sense to me to specify the DLLs when running
87nunit-console.
88
89[2] Note that OpenSim.Region.Physics.OdePlugin.dll is in bin/Physics/ and
90needs 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
96To use nunit testing on opensim code, you have a variety of methods. The 32To use nunit testing on opensim code, you have a variety of methods. The
97easiast methods involve using IDE capabilities to test code. Using 33easiast methods involve using IDE capabilities to test code. Using
98VS2005/2008 I recommend using the testing capabilities of Resarper(commercial) 34VS2005/2008 I recommend using the testing capabilities of Resharper(commercial)
99or TestDriven.Net(free). Both will recognize nunit tests within your 35or TestDriven.Net(free). Both will recognize nunit tests within your
100application and allow you to test them individually, or all at once, etc. You 36application and allow you to test them individually, or all at once, etc. You
101will also be able to step into debug mode into a test through these add-ins 37will also be able to step into debug mode into a test through these add-ins
@@ -133,6 +69,3 @@ Example
133 69
134nunit-console2 OpenSim.Framework.Tests.dll (on linux) 70nunit-console2 OpenSim.Framework.Tests.dll (on linux)
135nunit-console OpenSim.Framework.Tests.dll (on windows) 71nunit-console OpenSim.Framework.Tests.dll (on windows)
136
137For more information on testing contact the autor of this testing readme: Daedius Moskvitch ( daedius @@@@ daedius com)
138