94 |
07 Mar 05 |
nicklas |
1 |
/* |
94 |
07 Mar 05 |
nicklas |
$Id$ |
94 |
07 Mar 05 |
nicklas |
3 |
|
3675 |
16 Aug 07 |
jari |
Copyright (C) 2005 Samuel Andersson, Johan Enell, Nicklas Nordborg |
4889 |
06 Apr 09 |
nicklas |
Copyright (C) 2006 Johan Enell, Jari Häkkinen, Nicklas Nordborg |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Johan Enell, Nicklas Nordborg |
94 |
07 Mar 05 |
nicklas |
7 |
|
2304 |
22 May 06 |
jari |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
Available at http://base.thep.lu.se/ |
94 |
07 Mar 05 |
nicklas |
10 |
|
94 |
07 Mar 05 |
nicklas |
BASE is free software; you can redistribute it and/or |
94 |
07 Mar 05 |
nicklas |
modify it under the terms of the GNU General Public License |
4480 |
05 Sep 08 |
jari |
as published by the Free Software Foundation; either version 3 |
94 |
07 Mar 05 |
nicklas |
of the License, or (at your option) any later version. |
94 |
07 Mar 05 |
nicklas |
15 |
|
94 |
07 Mar 05 |
nicklas |
BASE is distributed in the hope that it will be useful, |
94 |
07 Mar 05 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
94 |
07 Mar 05 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
94 |
07 Mar 05 |
nicklas |
GNU General Public License for more details. |
94 |
07 Mar 05 |
nicklas |
20 |
|
94 |
07 Mar 05 |
nicklas |
You should have received a copy of the GNU General Public License |
4514 |
11 Sep 08 |
jari |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
94 |
07 Mar 05 |
nicklas |
23 |
*/ |
5384 |
13 Aug 10 |
nicklas |
24 |
import java.util.LinkedHashMap; |
94 |
07 Mar 05 |
nicklas |
25 |
import java.util.Map; |
94 |
07 Mar 05 |
nicklas |
26 |
|
94 |
07 Mar 05 |
nicklas |
27 |
public class TestAll |
94 |
07 Mar 05 |
nicklas |
28 |
{ |
94 |
07 Mar 05 |
nicklas |
29 |
|
94 |
07 Mar 05 |
nicklas |
30 |
public static void main(String[] args) |
94 |
07 Mar 05 |
nicklas |
31 |
{ |
5384 |
13 Aug 10 |
nicklas |
32 |
Map<String,Boolean> results = new LinkedHashMap<String,Boolean>(); |
94 |
07 Mar 05 |
nicklas |
33 |
TestUtil.checkArgs(args); |
94 |
07 Mar 05 |
nicklas |
34 |
TestUtil.begin(); |
94 |
07 Mar 05 |
nicklas |
35 |
|
94 |
07 Mar 05 |
nicklas |
// Authorization system |
411 |
15 Apr 05 |
enell |
37 |
results.put("TestGroup", TestGroup.test_all()); |
411 |
15 Apr 05 |
enell |
38 |
results.put("TestRole", TestRole.test_all()); |
411 |
15 Apr 05 |
enell |
39 |
results.put("TestUser", TestUser.test_all()); |
411 |
15 Apr 05 |
enell |
40 |
results.put("TestProject", TestProject.test_all()); |
94 |
07 Mar 05 |
nicklas |
41 |
|
94 |
07 Mar 05 |
nicklas |
// Access control system |
411 |
15 Apr 05 |
enell |
43 |
results.put("TestRoleKey", TestRoleKey.test_all()); |
411 |
15 Apr 05 |
enell |
44 |
results.put("TestProjectKey", TestProjectKey.test_all()); |
411 |
15 Apr 05 |
enell |
45 |
results.put("TestItemKey", TestItemKey.test_all()); |
5368 |
22 Jun 10 |
nicklas |
46 |
results.put("TestPermissionTemplate", TestPermissionTemplate.test_all()); |
94 |
07 Mar 05 |
nicklas |
47 |
|
239 |
23 Mar 05 |
nicklas |
// Settings, sessions and client |
411 |
15 Apr 05 |
enell |
49 |
results.put("TestClient", TestClient.test_all()); |
411 |
15 Apr 05 |
enell |
50 |
results.put("TestHelp", TestHelp.test_all()); |
411 |
15 Apr 05 |
enell |
51 |
results.put("TestGlobalDefaultSetting", TestGlobalDefaultSetting.test_all()); |
411 |
15 Apr 05 |
enell |
52 |
results.put("TestClientDefaultSetting", TestClientDefaultSetting.test_all()); |
411 |
15 Apr 05 |
enell |
53 |
results.put("TestUserDefaultSetting", TestUserDefaultSetting.test_all()); |
411 |
15 Apr 05 |
enell |
54 |
results.put("TestUserClientSetting", TestUserClientSetting.test_all()); |
411 |
15 Apr 05 |
enell |
55 |
results.put("TestSession", TestSession.test_all()); |
94 |
07 Mar 05 |
nicklas |
56 |
|
94 |
07 Mar 05 |
nicklas |
// Quota and files |
412 |
15 Apr 05 |
enell |
58 |
results.put("TestQuotaType", TestQuotaType.test_all()); |
411 |
15 Apr 05 |
enell |
59 |
results.put("TestQuota", TestQuota.test_all()); |
459 |
26 Apr 05 |
enell |
60 |
results.put("TestMimeType", TestMimeType.test_all()); |
470 |
26 Apr 05 |
enell |
61 |
results.put("TestPath", TestPath.test_all()); |
470 |
26 Apr 05 |
enell |
62 |
results.put("TestDirectory", TestDirectory.test_all()); |
5360 |
11 Jun 10 |
nicklas |
63 |
results.put("TestFileServer", TestFileServer.test_all()); |
496 |
29 Apr 05 |
enell |
64 |
results.put("TestFile", TestFile.test_all()); |
642 |
24 May 05 |
enell |
65 |
results.put("TestDiskUsage", TestDiskUsage.test_all()); |
3646 |
09 Aug 07 |
nicklas |
66 |
results.put("TestPackedFileExporter", TestPackedFileExporter.test_all()); |
94 |
07 Mar 05 |
nicklas |
67 |
|
5630 |
13 May 11 |
nicklas |
// Item types, Hardware, software, protocols |
5630 |
13 May 11 |
nicklas |
69 |
results.put("TestItemSubtype", TestItemSubtype.test_all()); |
590 |
13 May 05 |
enell |
70 |
results.put("TestHardware", TestHardware.test_all()); |
591 |
13 May 05 |
enell |
71 |
results.put("TestSoftware", TestSoftware.test_all()); |
579 |
12 May 05 |
enell |
72 |
results.put("TestProtocol", TestProtocol.test_all()); |
6990 |
02 Nov 15 |
nicklas |
73 |
results.put("TestKit", TestKit.test_all()); |
94 |
07 Mar 05 |
nicklas |
74 |
|
3586 |
20 Jul 07 |
nicklas |
// File parsing |
3586 |
20 Jul 07 |
nicklas |
76 |
results.put("TestFlatFileParser", TestFlatFileParser.test_all()); |
7677 |
27 Mar 19 |
nicklas |
77 |
results.put("TestExcelFunctions", TestExcelFunctions.test_all()); |
3586 |
20 Jul 07 |
nicklas |
78 |
|
94 |
07 Mar 05 |
nicklas |
// Biomaterials |
802 |
21 Jun 05 |
nicklas |
80 |
results.put("TestBioSource", TestBioSource.test_all()); |
802 |
21 Jun 05 |
nicklas |
81 |
results.put("TestSample", TestSample.test_all()); |
802 |
21 Jun 05 |
nicklas |
82 |
results.put("TestExtract", TestExtract.test_all()); |
5632 |
17 May 11 |
nicklas |
83 |
results.put("TestTag", TestTag.test_all()); |
5260 |
04 Mar 10 |
nicklas |
84 |
results.put("TestBioPlateType", TestBioPlateType.test_all()); |
4685 |
04 Dec 08 |
martin |
85 |
results.put("TestBioPlate", TestBioPlate.test_all()); |
5523 |
02 Dec 10 |
nicklas |
86 |
results.put("TestBioPlateEvent", TestBioPlateEvent.test_all()); |
94 |
07 Mar 05 |
nicklas |
87 |
|
3586 |
20 Jul 07 |
nicklas |
// Annotation types and annotations |
4541 |
22 Sep 08 |
nicklas |
89 |
results.put("TestQuantity", TestQuantity.test_all()); |
4541 |
22 Sep 08 |
nicklas |
90 |
results.put("TestUnit", TestUnit.test_all()); |
3586 |
20 Jul 07 |
nicklas |
91 |
results.put("TestAnnotationType", TestAnnotationType.test_all()); |
3586 |
20 Jul 07 |
nicklas |
92 |
results.put("TestAnnotationTypeCategory", TestAnnotationTypeCategory.test_all()); |
3586 |
20 Jul 07 |
nicklas |
93 |
results.put("TestAnnotation", TestAnnotation.test_all()); |
3586 |
20 Jul 07 |
nicklas |
94 |
results.put("TestAnnotationFlatFileImporter", TestAnnotationFlatFileImporter.test_all()); |
3586 |
20 Jul 07 |
nicklas |
95 |
|
94 |
07 Mar 05 |
nicklas |
// Reporters |
1682 |
02 Dec 05 |
nicklas |
97 |
results.put("TestReporterType", TestReporterType.test_all()); |
1682 |
02 Dec 05 |
nicklas |
98 |
results.put("TestReporter", TestReporter.test_all()); |
1682 |
02 Dec 05 |
nicklas |
99 |
results.put("TestReporterList", TestReporterList.test_all()); |
94 |
07 Mar 05 |
nicklas |
100 |
|
94 |
07 Mar 05 |
nicklas |
// Array LIMS -- Plates |
874 |
05 Jul 05 |
nicklas |
102 |
results.put("TestPlateGeometry", TestPlateGeometry.test_all()); |
874 |
05 Jul 05 |
nicklas |
103 |
results.put("TestPlateType", TestPlateType.test_all()); |
881 |
06 Jul 05 |
nicklas |
104 |
results.put("TestPlate", TestPlate.test_all()); |
881 |
06 Jul 05 |
nicklas |
105 |
results.put("TestPlateMapping", TestPlateMapping.test_all()); |
94 |
07 Mar 05 |
nicklas |
106 |
|
3820 |
12 Oct 07 |
nicklas |
// Experimental platforms and data file types |
3820 |
12 Oct 07 |
nicklas |
108 |
results.put("TestDataFileType", TestDataFileType.test_all()); |
3820 |
12 Oct 07 |
nicklas |
109 |
results.put("TestPlatform", TestPlatform.test_all()); |
3820 |
12 Oct 07 |
nicklas |
110 |
|
94 |
07 Mar 05 |
nicklas |
// Array LIMS -- Arrays |
739 |
09 Jun 05 |
nicklas |
112 |
results.put("TestArrayDesign", TestArrayDesign.test_all()); |
974 |
20 Jul 05 |
enell |
113 |
results.put("TestArrayBatch", TestArrayBatch.test_all()); |
1114 |
23 Aug 05 |
enell |
114 |
results.put("TestArraySlide", TestArraySlide.test_all()); |
94 |
07 Mar 05 |
nicklas |
115 |
|
5642 |
26 May 11 |
nicklas |
// Physical bioassays and raw data |
5642 |
26 May 11 |
nicklas |
117 |
results.put("TestPhysicalBioAssay", TestPhysicalBioAssay.test_all()); |
5685 |
04 Aug 11 |
nicklas |
118 |
results.put("TestDerivedBioAssay", TestDerivedBioAssay.test_all()); |
1121 |
24 Aug 05 |
nicklas |
119 |
results.put("TestRawBioAssay", TestRawBioAssay.test_all()); |
94 |
07 Mar 05 |
nicklas |
120 |
|
94 |
07 Mar 05 |
nicklas |
// Misc |
411 |
15 Apr 05 |
enell |
122 |
results.put("TestSessionControl", TestSessionControl.test_all()); |
1701 |
09 Dec 05 |
nicklas |
123 |
results.put("TestContext", TestContext.test_all()); |
411 |
15 Apr 05 |
enell |
124 |
results.put("TestDbControl", TestDbControl.test_all()); |
6739 |
17 Feb 15 |
nicklas |
125 |
results.put("TestItemList", TestItemList.test_all()); |
833 |
28 Jun 05 |
nicklas |
126 |
results.put("TestNews", TestNews.test_all()); |
833 |
28 Jun 05 |
nicklas |
127 |
results.put("TestMessage", TestMessage.test_all()); |
5022 |
26 Jun 09 |
nicklas |
128 |
results.put("TestAnyToAny", TestAnyToAny.test_all()); |
5039 |
10 Aug 09 |
nicklas |
129 |
results.put("TestChangeHistory", TestChangeHistory.test_all()); |
833 |
28 Jun 05 |
nicklas |
130 |
results.put("TestXMLUtil", TestXMLUtil.test_all()); |
803 |
21 Jun 05 |
samuel |
131 |
results.put("TestParameterType", TestParameterType.test_all()); |
1343 |
15 Sep 05 |
nicklas |
132 |
results.put("TestJarClassLoader", TestJarClassLoader.test_all()); |
1578 |
08 Nov 05 |
nicklas |
133 |
results.put("TestJep", TestJep.test_all()); |
6372 |
06 Dec 13 |
nicklas |
134 |
results.put("TestMACalculator", TestMACalculator.test_all()); |
5188 |
09 Nov 09 |
nicklas |
135 |
results.put("TestEncoderDecoder", TestEncoderDecoder.test_all()); |
5193 |
27 Nov 09 |
nicklas |
136 |
results.put("TestBfs", TestBfs.test_all()); |
2209 |
03 May 06 |
nicklas |
137 |
results.put("TestDbInfo", TestDbInfo.test_all()); |
3062 |
15 Jan 07 |
nicklas |
138 |
results.put("TestPresets", TestPresets.test_all()); |
3264 |
23 Apr 07 |
enell |
139 |
results.put("TestNumberFormat", TestNumberFormat.test_all()); |
7624 |
07 Mar 19 |
nicklas |
140 |
results.put("TestCharsetDetector", TestCharsetDetector.test_all()); |
5319 |
20 Apr 10 |
nicklas |
141 |
results.put("TestMetadata", TestMetadata.test_all()); |
94 |
07 Mar 05 |
nicklas |
142 |
|
1778 |
17 Jan 06 |
enell |
// Plugins, jobs |
1778 |
17 Jan 06 |
enell |
144 |
results.put("TestPluginType", TestPluginType.test_all()); |
1778 |
17 Jan 06 |
enell |
145 |
results.put("TestPluginDefinition", TestPluginDefinition.test_all()); |
1778 |
17 Jan 06 |
enell |
146 |
results.put("TestPluginConfiguration", TestPluginConfiguration.test_all()); |
1778 |
17 Jan 06 |
enell |
147 |
results.put("TestJob", TestJob.test_all()); |
2648 |
19 Sep 06 |
nicklas |
148 |
results.put("TestJobAgent", TestJobAgent.test_all()); |
4372 |
04 Jul 08 |
nicklas |
149 |
results.put("TestItemImporter", TestItemImporter.test_all()); |
1778 |
17 Jan 06 |
enell |
150 |
results.put("TestReporterFlatFileImporter", TestReporterFlatFileImporter.test_all()); |
1778 |
17 Jan 06 |
enell |
151 |
results.put("TestReporterMapFlatFileImporter", TestReporterMapFlatFileImporter.test_all()); |
1778 |
17 Jan 06 |
enell |
152 |
results.put("TestPlateFlatFileImporter", TestPlateFlatFileImporter.test_all()); |
1778 |
17 Jan 06 |
enell |
153 |
results.put("TestRawDataFlatFileImporter", TestRawDataFlatFileImporter.test_all()); |
1793 |
19 Jan 06 |
enell |
154 |
results.put("TestPrintMapFlatFileImporter", TestPrintMapFlatFileImporter.test_all()); |
4239 |
22 Apr 08 |
nicklas |
155 |
results.put("TestGalExporter", TestGalExporter.test_all()); |
3471 |
11 Jun 07 |
nicklas |
156 |
results.put("TestDirty", TestDirty.test_all()); |
3626 |
03 Aug 07 |
nicklas |
157 |
results.put("TestIlluminaImporter", TestIlluminaImporter.test_all()); |
5759 |
26 Sep 11 |
nicklas |
158 |
results.put("TestGtfInputStream", TestGtfInputStream.test_all()); |
5764 |
27 Sep 11 |
nicklas |
159 |
results.put("TestGtfImporters", TestGtfImporters.test_all()); |
1778 |
17 Jan 06 |
enell |
160 |
|
1470 |
14 Oct 05 |
nicklas |
// Experiments |
1555 |
02 Nov 05 |
nicklas |
162 |
results.put("TestExtraValueType", TestExtraValueType.test_all()); |
2576 |
23 Aug 06 |
nicklas |
163 |
results.put("TestFormula", TestFormula.test_all()); |
1470 |
14 Oct 05 |
nicklas |
164 |
results.put("TestExperiment", TestExperiment.test_all()); |
4232 |
17 Apr 08 |
nicklas |
165 |
|
4232 |
17 Apr 08 |
nicklas |
// Complex tests |
7837 |
28 Aug 20 |
nicklas |
167 |
results.put("TestSourceItemTransformer", TestSourceItemTransformer.test_all()); |
5228 |
03 Feb 10 |
nicklas |
168 |
results.put("TestGenericOverview", TestGenericOverview.test_all()); |
5228 |
03 Feb 10 |
nicklas |
169 |
|
5228 |
03 Feb 10 |
nicklas |
// Analysis test |
5228 |
03 Feb 10 |
nicklas |
171 |
TestAnalyzeUtil.setupExperiment(); |
5228 |
03 Feb 10 |
nicklas |
172 |
results.put("TestBasicAnalysis", TestBasicAnalysis.test_all()); |
5974 |
17 Feb 12 |
nicklas |
173 |
results.put("TestReporterCloneTemplate", TestReporterCloneTemplate.test_all()); |
5228 |
03 Feb 10 |
nicklas |
174 |
results.put("TestIntensityCalculatorPlugin", TestIntensityCalculatorPlugin.test_all()); |
5228 |
03 Feb 10 |
nicklas |
175 |
results.put("TestLowessNormalization", TestLowessNormalization.test_all()); |
5228 |
03 Feb 10 |
nicklas |
176 |
results.put("TestMedianRatioNormalization", TestMedianRatioNormalization.test_all()); |
5233 |
04 Feb 10 |
nicklas |
177 |
results.put("TestBaseFileExporterImporter", TestBaseFileExporterImporter.test_all()); |
5233 |
04 Feb 10 |
nicklas |
178 |
results.put("TestBfsExporterImporter", TestBfsExporterImporter.test_all()); |
4232 |
17 Apr 08 |
nicklas |
179 |
results.put("TestBase1PluginExecuter", TestBase1PluginExecuter.test_all()); |
5319 |
20 Apr 10 |
nicklas |
180 |
results.put("TestExternalProgramExecutor", TestExternalProgramExecutor.test_all()); |
5228 |
03 Feb 10 |
nicklas |
181 |
TestAnalyzeUtil.cleanupExperiment(); |
1470 |
14 Oct 05 |
nicklas |
182 |
|
94 |
07 Mar 05 |
nicklas |
183 |
int failures = 0; |
94 |
07 Mar 05 |
nicklas |
184 |
for (Map.Entry<String,Boolean> entry : results.entrySet()) |
94 |
07 Mar 05 |
nicklas |
185 |
{ |
94 |
07 Mar 05 |
nicklas |
186 |
if (!entry.getValue()) |
94 |
07 Mar 05 |
nicklas |
187 |
{ |
94 |
07 Mar 05 |
nicklas |
188 |
System.out.println(entry.getKey() + " FAILED"); |
94 |
07 Mar 05 |
nicklas |
189 |
failures++; |
94 |
07 Mar 05 |
nicklas |
190 |
} |
94 |
07 Mar 05 |
nicklas |
191 |
} |
94 |
07 Mar 05 |
nicklas |
192 |
if (failures == 0) |
94 |
07 Mar 05 |
nicklas |
193 |
{ |
358 |
04 Apr 05 |
nicklas |
194 |
System.out.println("++All "+(results.size())+" tests successful!"); |
94 |
07 Mar 05 |
nicklas |
195 |
} |
94 |
07 Mar 05 |
nicklas |
196 |
else |
94 |
07 Mar 05 |
nicklas |
197 |
{ |
94 |
07 Mar 05 |
nicklas |
198 |
System.out.println("++"+failures + " tests failed!"); |
94 |
07 Mar 05 |
nicklas |
199 |
System.out.println("++"+(results.size()-failures) + " tests succeeded!"); |
94 |
07 Mar 05 |
nicklas |
200 |
} |
94 |
07 Mar 05 |
nicklas |
201 |
System.out.print("++Cleaning up. Please wait..."); |
94 |
07 Mar 05 |
nicklas |
202 |
TestUtil.stop(); |
94 |
07 Mar 05 |
nicklas |
203 |
System.out.println("done!"); |
94 |
07 Mar 05 |
nicklas |
204 |
} |
94 |
07 Mar 05 |
nicklas |
205 |
|
94 |
07 Mar 05 |
nicklas |
206 |
} |
94 |
07 Mar 05 |
nicklas |
207 |
|