Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Corona/Test
Contents
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.
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