Here is the setup instructions for running junits for
the broker, domain, and data managers. I added the instruction as a
comment in the top level junit (AllTests) as well.
1.
Install TPTP 4.4.0.3 all-in-one package.
2.
Install COSMOS SDK on top of the TPTP/eclipse install.
3.
extract the following projects from CVS:
org.eclipse.cosmos/tests/org.eclipse.cosmos.dc.framework.test
org.eclipse.cosmos/tests/org.eclipse.cosmos.rm.repository.tests
org.eclipse.cosmos/tests/org.eclipse.cosmos.rm.validation.tests
org.eclipse.cosmos/resource-modeling/org.eclipse.cosmos.rm.repository
org.eclipse.cosmos/resource-modeling/org.eclipse.cosmos.rm.validation
org.eclipse.cosmos/examples/org.eclipse.cosmos.samples.cmdbf.services
4.
Start domain and broker and data managers:
Install
the COSMOS Demo from the COSMOS donwload page. Install and configure the
demo application as documented at http://wiki.eclipse.org/COSMOS_DEMO_i8.
5.
Start the Tomcat server on port 8080 (default)
6.
Start data manager OSGi container. Use port 8081 (default).
7.
Start the junit test (AllTests.testsuite)
_________________________
Hubert Leung
IBM Toronto Lab
hkyleung@xxxxxxxxxx
905-413-3382
QA is facing issues while running the Junits
(in Windows).
We
started with the Data Collection part.
Steps
followed while testing them:
-------------------------------------------------
1.
Downloaded eclipse and all other
dependent libraries based on wiki page
http://wiki.eclipse.org/COSMOSDataCollectorEnvironment#Download_Dependencies
2.
Checked out all projects from
cosmos/data-collection and resolved few compilation issues and library
dependencies
3.
Checked out all tests from
tests/data-Collection
4.
Bought up tomcat running on port
8080
5.
Registered broker with domain using
COSMOS command line client
6.
Bought up all Data Managers running
outside eclipse (using cosmos-demo\DataManagers\startup.bat)
7.
Finally, executed JUnits one at
time.
Issues
with:
-------------------
ManagementDomainTests.java / DataBrokerTests.java /
ClientTests.java
-----------------------------------------------------------------------------------------------------------------
testManagementDomainClient started...
org.apache.muse.ws.addressing.soap.SoapFault:
[ID = 'DestinationUnreachable'] There is no resource available at the given
EPR:
<wsa:EndpointReference xmlns:wsa="
http://www.w3.org/2005/08/addressing">
<wsa:Address>
http://domsr01-xp:8080/cosmos/services/org.eclipse.cosmos.dc.runtime.osgi.OSGiRuntimeHost
</wsa:Address>
<wsa:ReferenceParameters>
<muse-wsa:ResourceId
xmlns:muse-wsa="http://ws.apache.org/muse/addressing
"
wsa:IsReferenceParameter="true" xmlns:wsa="http://www.w3.org/2005/08/addressing
">RuntimeIdentifierValue</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsa:EndpointReference>
-----------
testDataBrokerClient started...
org.apache.muse.ws.addressing.soap.SoapFault:
[ID = 'DestinationUnreachable'] There is no resource available at the given
EPR:
<wsa:EndpointReference xmlns:wsa="
http://www.w3.org/2005/08/addressing">
<wsa:Address>
http://domsr01-xp:8080/cosmos/services/org.eclipse.cosmos.dc.runtime.osgi.OSGiRuntimeHost</wsa:Address>
<wsa:ReferenceParameters>
<muse-wsa:ResourceId
xmlns:muse-wsa="http://ws.apache.org/muse/addressing
"
wsa:IsReferenceParameter="true" xmlns:wsa="http://www.w3.org/2005/08/addressing
">RuntimeIdentifierValue</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsa:EndpointReference>
org.apache.muse.ws.addressing.soap.SoapFault:
[ID = 'DestinationUnreachable'] There is no resource available at the given
EPR:
-------
<wsa:EndpointReference xmlns:wsa="
http://www.w3.org/2005/08/addressing">
<wsa:Address>
http://155.35.13.194:8080/cosmos/services/org.eclipse.cosmos.dc.local.registry.SQLProviderRegistry
</wsa:Address>
<wsa:ReferenceParameters>
<muse-wsa:ResourceId
xmlns:muse-wsa="http://ws.apache.org/muse/addressing
"
wsa:IsReferenceParameter="true" xmlns:wsa="http://www.w3.org/2005/08/addressing
">Resource_1</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsa:EndpointReference>
AssemblyTests/CollectionTests/QueryTests/SQLProviderRegistryTests
---------------------------------------------------------------------------------------------------------------
java.lang.RuntimeException
: [ID = 'NoDataResource'] The resource 'muse.xml' does
not exist or is not in the classpath.
at
org.apache.muse.core.AbstractEnvironment.getDataResourceStream(AbstractEnvironment.java:250
)
at
org.apache.muse.core.AbstractEnvironment.getDocument(AbstractEnvironment.java:328
)
at org.apache.muse.core.platform.AbstractIsolationLayer.initialize(
AbstractIsolationLayer.java:151)
at
org.eclipse.cosmos.dc.tests.runtime.SQLProviderRegistryTests.setUp(SQLProviderRegistryTests.java:65
)
at
junit.framework.TestCase.runBare(TestCase.java:128
)
at
junit.framework.TestResult$1.protect(TestResult.java:106
)
at
junit.framework.TestResult.runProtected(TestResult.java:124
)
at
junit.framework.TestResult.run(TestResult.java:109
)
at
junit.framework.TestCase.run(TestCase.java:120
)
at
junit.framework.TestSuite.runTest(TestSuite.java:230
)
at
junit.framework.TestSuite.run(TestSuite.java:225
)
WSDMBindingTests.java/ WSDMBindingUtilTests.java
/WSDMCustomCapabilityTests.java / WSDMNotificationTests.java
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
java.lang.RuntimeException
: [ID = 'NoDataResource'] The resource 'muse.xml' does
not exist or is not in the classpath.
at
org.apache.muse.core.AbstractEnvironment.getDataResourceStream(AbstractEnvironment.java:250
)
at
org.apache.muse.core.AbstractEnvironment.getDocument(AbstractEnvironment.java:328
)
at
org.eclipse.cosmos.dc.tests.wsdm.binding.WSDMBindingTests.setUp(WSDMBindingTests.java:76
)
at
junit.framework.TestCase.runBare(TestCase.java:128
)
at
junit.framework.TestResult$1.protect(TestResult.java:106
)
at
junit.framework.TestResult.runProtected(TestResult.java:124
)
at
junit.framework.TestResult.run(TestResult.java:109
)
at
junit.framework.TestCase.run(TestCase.java:120
)
at
junit.framework.TestSuite.runTest(TestSuite.java:230
)
at
junit.framework.TestSuite.run(TestSuite.java:225
)
QA
requires the http://wiki.eclipse.org/COSMOSDataCollectorEnvironment#Download_Dependencies
page
to be
updated so that our Eclipse environment
is correct
apart from the approaches to run the above JUnits.
Regards
Shivashankari
Team
Lead
India Technology Center
"If bugs were people then you would be
China"_______________________________________________
cosmos-dev mailing list
cosmos-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cosmos-dev