diff options
author | Mike Mazur | 2008-08-30 01:38:41 +0000 |
---|---|---|
committer | Mike Mazur | 2008-08-30 01:38:41 +0000 |
commit | 766dded703f090160532ba2de5f74668cfdd52e6 (patch) | |
tree | a5f817da1dbf71f3ca3bdbe7caa72f7ce1cc3e59 | |
parent | Mantis#2084. Thank you kindly, HomerHorwitz for a patch that: (diff) | |
download | opensim-SC-766dded703f090160532ba2de5f74668cfdd52e6.zip opensim-SC-766dded703f090160532ba2de5f74668cfdd52e6.tar.gz opensim-SC-766dded703f090160532ba2de5f74668cfdd52e6.tar.bz2 opensim-SC-766dded703f090160532ba2de5f74668cfdd52e6.tar.xz |
Update TESTING.txt documentation.
Diffstat (limited to '')
-rw-r--r-- | TESTING.txt | 82 |
1 files changed, 75 insertions, 7 deletions
diff --git a/TESTING.txt b/TESTING.txt index 6e4999a..97bffe2 100644 --- a/TESTING.txt +++ b/TESTING.txt | |||
@@ -1,17 +1,86 @@ | |||
1 | ==UPDATE== | ||
2 | |||
3 | The text immediately following is an update to the testing documentation. The | ||
4 | update is written on 2008.08.30 and is copied from an email to the opensim-dev | ||
5 | mailing list[1]. The information below the update, beginning with the section | ||
6 | titled TESTING, is still relevant, so please read this document in its | ||
7 | entirety. | ||
8 | |||
9 | Mike Mazur | ||
10 | |||
11 | [1] https://lists.berlios.de/pipermail/opensim-dev/2008-August/002695.html | ||
12 | |||
13 | """ | ||
14 | The tests are contained in certain DLLs. At the time of writing, these DLLs | ||
15 | have tests in them: | ||
16 | |||
17 | OpenSim.Region.ScriptEngine.Common.Tests.dll | ||
18 | OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests.dll | ||
19 | OpenSim.Region.ScriptEngine.Shared.Tests.dll | ||
20 | OpenSim.Framework.Tests.dll OpenSim.Region.Environment.dll | ||
21 | OpenSim.Region.Physics.OdePlugin.dll[2] | ||
22 | |||
23 | The console command used to run the tests is `nunit-console` (or | ||
24 | `nunit-console2` on some systems). This command takes a listing of DLLs to | ||
25 | inspect for tests. | ||
26 | |||
27 | Currently Bamboo's[3] build file (.nant/bamboo.build) lists only those DLLs | ||
28 | for nunit-console to use. However it would be equally correct to simply pass | ||
29 | in all DLLs in bin/; those without tests are just skipped. | ||
30 | |||
31 | The nunit-console command generates a file TestResults.txt by default. This is | ||
32 | an XML file containing a listing of all DLLs inspected, tests executed, | ||
33 | successes, failures, etc. If nunit-console is passed in all DLLs in bin/, this | ||
34 | file bloats with lots of entries like this: | ||
35 | |||
36 | <test-suite name="/home/mike/source/workspace/bin/OpenSim.Grid.Communications.OGS1.dll" success="True" time="0.000" asserts="0"> | ||
37 | <results /> | ||
38 | </test-suite> | ||
39 | <test-suite name="/home/mike/source/workspace/bin/OpenSim.Region.ClientStack.dll" success="True" time="0.000" asserts="0"> | ||
40 | <results /> | ||
41 | </test-suite> | ||
42 | |||
43 | Therefore it makes more sense to me to specify the DLLs when running | ||
44 | nunit-console. | ||
45 | |||
46 | [2] Note that OpenSim.Region.Physics.OdePlugin.dll is in bin/Physics/ and | ||
47 | needs to be first copied to bin/ before nunit-console is executed. | ||
48 | [3] http://opensimulator.org:8085/ | ||
49 | """ | ||
50 | |||
1 | ==TESTING== | 51 | ==TESTING== |
2 | To use nunit testing on opensim code, you have a variety of methods. The easiast methods involve using IDE capabilities to test code. Using VS2005/2008 I recommend using the testing capabilities of Resarper(commercial) or TestDriven.Net(free). Both will recognize nunit tests within your application and allow you to test them individually, or all at once, etc. You will also be able to step into debug mode into a test through these add-ins enabling a developer to jump right in and see how a specific test-case/scenerio works. | 52 | To use nunit testing on opensim code, you have a variety of methods. The |
53 | easiast methods involve using IDE capabilities to test code. Using | ||
54 | VS2005/2008 I recommend using the testing capabilities of Resarper(commercial) | ||
55 | or TestDriven.Net(free). Both will recognize nunit tests within your | ||
56 | application and allow you to test them individually, or all at once, etc. You | ||
57 | will also be able to step into debug mode into a test through these add-ins | ||
58 | enabling a developer to jump right in and see how a specific | ||
59 | test-case/scenerio works. | ||
3 | 60 | ||
4 | Additionally, it is my understanding that sharpdevelop and monodevelop have their own nunit testing plugins within their IDE. Though I am not certain of their exact feature set or stability. | 61 | Additionally, it is my understanding that sharpdevelop and monodevelop have |
62 | their own nunit testing plugins within their IDE. Though I am not certain of | ||
63 | their exact feature set or stability. | ||
5 | 64 | ||
6 | == Using NUnit Directly == | 65 | == Using NUnit Directly == |
7 | The NUnit project is a very mature testing application. It can be obtained from www.nunit.org are via various package distrobutions for Linux. Please be sure to get a .Net 2.0 version of Nunit, as OpenSim makes use of .Net 2.0 functionality. | 66 | The NUnit project is a very mature testing application. It can be obtained |
67 | from www.nunit.org are via various package distrobutions for Linux. Please be | ||
68 | sure to get a .Net 2.0 version of Nunit, as OpenSim makes use of .Net 2.0 | ||
69 | functionality. | ||
8 | 70 | ||
9 | Nunit comes with 2 tools that will enable you to run tests from assembly inputs. Nunit-gui and nunit-console. NUnit-gui is a console that will let you view the execution of various tests within your assemblies and give visual indication of teir success or failure. This is a useful tool for those who lack IDE addins ( or lack IDEs at all ). | 71 | Nunit comes with 2 tools that will enable you to run tests from assembly |
72 | inputs. Nunit-gui and nunit-console. NUnit-gui is a console that will let | ||
73 | you view the execution of various tests within your assemblies and give visual | ||
74 | indication of teir success or failure. This is a useful tool for those who | ||
75 | lack IDE addins ( or lack IDEs at all ). | ||
10 | 76 | ||
11 | Nunit console allows you to execute the nunit tests of assemblies via console. Its output will show test failures and successes and a summary of what happened. This is very useful for a quick overview and/or automated testing. | 77 | Nunit console allows you to execute the nunit tests of assemblies via console. |
78 | Its output will show test failures and successes and a summary of what | ||
79 | happened. This is very useful for a quick overview and/or automated testing. | ||
12 | 80 | ||
13 | Windows | 81 | Windows |
14 | Windows version of nunit-console is by default .Net 2.0 if you downloaded the .Net 2.0 version of Nunit. Be sure to setup your PATH environment variable. | 82 | Windows version of nunit-console is by default .Net 2.0 if you downloaded the |
83 | .Net 2.0 version of Nunit. Be sure to setup your PATH environment variable. | ||
15 | 84 | ||
16 | Linux & OSX | 85 | Linux & OSX |
17 | On these operating systems you will have to use the command "nunit-console2" | 86 | On these operating systems you will have to use the command "nunit-console2" |
@@ -22,4 +91,3 @@ nunit-console2 OpenSim.Framework.Tests.dll (on linux) | |||
22 | nunit-console OpenSim.Framework.Tests.dll (on windows) | 91 | nunit-console OpenSim.Framework.Tests.dll (on windows) |
23 | 92 | ||
24 | For more information on testing contact the autor of this testing readme: Daedius Moskvitch ( daedius @@@@ daedius com) | 93 | For more information on testing contact the autor of this testing readme: Daedius Moskvitch ( daedius @@@@ daedius com) |
25 | |||