[
https://jira.jboss.org/jira/browse/DNA-48?page=com.atlassian.jira.plugin....
]
Randall Hauch commented on DNA-48:
----------------------------------
Added an initial set of JUnit test case classes under
"org.jboss.dna.graph.connectors.test" (in the test source) that provide a
foundation for writing simple unit test classes for a connector, since almost all of the
test logic can be inherited. Right now the tests include the WritableConnectorTest and
ReadableConnectorTest abstract classes. To use these to test a particular connector, the
connector developer would create subclass these abstract classes, implementing the two
abstract methods (one sets up the RepositorySource instance, and the other initializes the
repository content to prepare for the tests). All test methods are inherited from the
abstract classes, so with minimal effort a connector developer can easily provide a series
of (standard) benchmark functionality tests to ensure the connector is behaving correctly.
It is likely that the connector developer will want to create additional tests. There is
a common abstract base class for the WritableConnectorTest and ReadableConnectorTest
classes, and this common base class performs all the set up and initialization of the
repository source. So by extending this class, a custom connector test case class can
test the repository using any methods.
As part of this effort, I also added "package-info.java" files for each package
in the "org.jboss.dna.graph" project. These package-level JavaDocs should help
developers understand how to use the JBoss DNA Graph API. including how to write and test
a custom connector.
Finally, I changed the test cases in the JPA connector to use this test harness.
Development and testing kit for federation connectors
-----------------------------------------------------
Key: DNA-48
URL:
https://jira.jboss.org/jira/browse/DNA-48
Project: DNA
Issue Type: Feature Request
Components: Connectors, Federation, Testing
Reporter: Randall Hauch
Assignee: Randall Hauch
Priority: Minor
Fix For: 0.5
Developing federation connectors will require some documentation and test harnesses that
simplifies the task of creating and testing connectors. This should include unit- and
integration-level tests, and ways of running these tests as regression tests. Ideally
this would also include a way to execute performance tests.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira