Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Corona/Test"

(Corona Test Framework)
 
(6 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
[[Image:CoronaTestFramework.jpg]]
 
[[Image:CoronaTestFramework.jpg]]
  
===Test Suite===
+
=== Test Suite ===
 +
JUnit test cases are organize into ''Corona Test Suites''.  Corona provides its own test suites to provide compatibility between JUnit 3.8 and 4.1.  Corona's test suites either ''implement'' '''ITestSuite''' or ''extend'' '''AbstractTestSuite'''.
  
===Test Manager===
+
Once a Corona test suite has been created, it must be registered with Corona's Test Framework via '''org.eclipse.corona.test.suite''' extension point.  The test suite extension is used to define which ''test runner'' to use as well as the execution ''level''.
  
===Test Runner===
+
=== Test Manager ===
 +
The ''Test Manager'' is an OSGi service component that manages the execution of Corona test suites.  The ''Test Manager'' is responsible for running the test suites in the proper execution order (i.e. ''level'') using the appropriate ''test runner''. 
 +
 
 +
Test results are collected by the ''Test Manager'' and provided as an XML summary document.
 +
 
 +
=== Test Runner ===
 +
Corona's Test Framework can support many different test runners.  This allows the test execution environment to run both JUnit 3.8 and 4.1 test cases, as well as other custom test cases.  Each suite of tests is defined to be executed by a specific test runner.
 +
 
 +
''Test Runners'' are defined using the '''org.eclipse.corona.test.runner''' extension point.
 +
 
 +
Corona provides test runners for both JUnit 3.8 and JUnit 4.
 +
 
 +
=== Test Summary ===
 +
The ''Test Manager'' will collect test results from all of the test suites that were executed.  These test results are put into a ''Test Summary'' XML document.
 +
 
 +
=== Test Execution ===
 +
There are two ways to invoke execution of the Corona Test Framework: ''Test Application'' and OSGi console ''Test Commands''.
 +
 
 +
==== Test Application ====
 +
Corona's ''Test Application'' is an Eclipse application used to execute all Corona Test Suites.  It will interact with the  ''Test Manager'' to run all test suites and save the ''Test Summary'' to a file.
 +
 
 +
The ''Test Application'' can be used in a headless build environment to automate the execution of test cases.
 +
 
 +
==== Test Commands ====
 +
OSGi console commands are provided by Corona to allow a user interact with the test framework.  The following commands are provided:
 +
;testList:List all of defined test suites available for execution
 +
;testSuite:Run a specific Corona test suite
 +
;testAll:Run all Corona test suites
 +
 
 +
== Resources ==
 +
* [http://www.eclipse.org/corona/doc/Corona_Test_Framework.pdf Test Framework Presentation]
 +
* [http://rcpquickstart.wordpress.com/2007/06/20/unit-testing-plug-ins-with-fragments/ Unit Testing Plug-ins with Fragments]
  
===Test Summary===
 
 
[[Category: Corona]]
 
[[Category: Corona]]

Latest revision as of 09:48, 25 August 2008

Corona Test Framework

Corona's test framework is used to execute test cases organized into test suites. It provides a framework for registering JUnit v3.8 and v4 test suites and have them all executed within the same Eclipse runtime environment.

CoronaTestFramework.jpg

Test Suite

JUnit test cases are organize into Corona Test Suites. Corona provides its own test suites to provide compatibility between JUnit 3.8 and 4.1. Corona's test suites either implement ITestSuite or extend AbstractTestSuite.

Once a Corona test suite has been created, it must be registered with Corona's Test Framework via org.eclipse.corona.test.suite extension point. The test suite extension is used to define which test runner to use as well as the execution level.

Test Manager

The Test Manager is an OSGi service component that manages the execution of Corona test suites. The Test Manager is responsible for running the test suites in the proper execution order (i.e. level) using the appropriate test runner.

Test results are collected by the Test Manager and provided as an XML summary document.

Test Runner

Corona's Test Framework can support many different test runners. This allows the test execution environment to run both JUnit 3.8 and 4.1 test cases, as well as other custom test cases. Each suite of tests is defined to be executed by a specific test runner.

Test Runners are defined using the org.eclipse.corona.test.runner extension point.

Corona provides test runners for both JUnit 3.8 and JUnit 4.

Test Summary

The Test Manager will collect test results from all of the test suites that were executed. These test results are put into a Test Summary XML document.

Test Execution

There are two ways to invoke execution of the Corona Test Framework: Test Application and OSGi console Test Commands.

Test Application

Corona's Test Application is an Eclipse application used to execute all Corona Test Suites. It will interact with the Test Manager to run all test suites and save the Test Summary to a file.

The Test Application can be used in a headless build environment to automate the execution of test cases.

Test Commands

OSGi console commands are provided by Corona to allow a user interact with the test framework. The following commands are provided:

testList
List all of defined test suites available for execution
testSuite
Run a specific Corona test suite
testAll
Run all Corona test suites

Resources

Back to the top