90 likes | 326 Views
EclipseLink Testing. Testing Overview. Eclipse Build Machine Nightly Tests JPA (~1900 + ~800 JUnit tests) Native API (~7500 Native Framework tests) MOXy (~2300 + ~23500 JUnit tests) SDO (~4500 JUnit tests) DBWS (17 + 28 JUnit tests) Continuous Build Oracle QA Testing
E N D
Testing Overview • Eclipse Build Machine Nightly Tests • JPA (~1900 + ~800 JUnit tests) • Native API (~7500 Native Framework tests) • MOXy (~2300 + ~23500 JUnit tests) • SDO (~4500 JUnit tests) • DBWS (17 + 28 JUnit tests) • Continuous Build • Oracle QA Testing • VM Interoperability Testing (Sun, JRockit, IBM JDK) • Server Testing (WLS, GlassFish, Oracle AS, WAS, JBoss, Spring) • DB Testing (Multiple versions of: Oracle, MYSQL, Derby, PostGreSQL, H2, TimesTen DB2, Sybase, SQLServer, Datadirect etc.) • OS (Windows XP/2003/2008, Red Hat 4, OEL 4/5, Suse10) • Performance Testing • Code Coverage • TCK (JPA 1.0 and 2.0, JAXB, SDO)
eclipselink.jpa.test • JUnit 3 • Single Eclipse Project/ 15 jars • ~30 test models • Jars are used to isolate test models and allow “unlisted” classes to be discovered • Ant build required even if running within Eclipse • Weaving/No Weaving/Static Weaving
eclipselink.jpa.wdf.test • JUnit 4 • Tests donated by SAP • Some tests currently fail • Spec interpretation issues • EclipseLink bugs • http://wiki.eclipse.org/EclipseLink/Bugs/309681 • Contain some custom annotations that could be useful for other test frameworks • @Issue, @Bugzilla, @Skip, @ToBeInvestigated • Current VM crash issue when running on IBM VM at Eclipse. Appears to be an IBM VM bug.
eclipselink.core.test • Developed pre-JUnit as part of TopLink • Contains majority of O/R tests • ant test-core/ant test-core-srg • Test Browser • GUI Tool that allows individual tests to be run • ant test-browser from eclipselink.jpa.test
Server Testing • Both eclipselink.jpa.test and eclipselink.jpa.wdf.test can be run on server • Server framework wraps calls to tests in a session bean • eclipselink.jpa.test contains server config files • Oracle QA runs multiple combinations of Server, DB, OS, JDK, on a regular basis • Tests include application managed and container managed ems • http://wiki.eclipse.org/EclipseLink/Development/Testing/JPA
OSGi Testing • Automated test suite • Runs JPA tests • Tests “wrap” whole test framework in one OSGi bundle • Pre-gemini OSGi framework manually tested with examples • “Hello World” style Gemini tests available from Gemini committers
Testing Challenges • Resource Contention on Build Server • Build server shared with other projects • We run 40000 tests x 4 streams • Oracle firewall makes it difficult to move load to within Oracle • Multiple Frameworks • Core tests on Proprietary framework – too many tests to migrate • Two JPA Test frameworks • Developers need to know how to run multiple frameworks • Multiple Databases • Easy to write tests that break in a DB • Expected Failures due to differing support between DBs
Testing Challenges (2) • Server Testing Limitations • Server tests wrap other tests • Server test framework has different expectations. (e.g. Session bean has transaction limitations) • Weaving • Testing OSGi • Developing expertise • Contributed Code • Make it easy for contributers to add tests, run tests and share results • Finding appropriate model for regression test construction • 3rd Party bugs • e.g. JBoss weaving support