- Should contain all necessary information (variables, methods, etc.) to run the test.
- Shall contain
run
method to start the test case execution. - (?) Should provide live log.
- Shall contain methods to assert and check entities.
- Assert shall cause test fail immediately.
- Check method shall:
- store failed result,
- continue test execution,
- Both methods shall update
TestVerdict
accordingly each call.
- Shall contain
TestVerdict
. - Shall contain checks and assertions results.
- Should provide test output.
- Should run
TestCase
in an isolated environment. - Shall create instance of the
TestCase
. - Shall create instance of the
TestResult
. - Should bind
TestCase
andTestResult
, i.e. create communication channel between them. - Should destroy
TestCase
after its run to release resources.
- Shall group
TestCase
. - (?) Should provide possibility to sort, prioritize test cases.
- (?) Shall provide mechanism for getting test cases one by one (like pop from stack).
- Shall locate test cases, group them to
TestSuite
and pass toTestRunner
.
- Should be possibility to extend base classes like
TestCase
. - Should be possibility to parametrize
TestCase
. - Should be possibility to run tests in parallel.
- If test case fails, test result should be collected anyway.
- How the output of the test case should be handled?
- Printed to the stdout / not printed
- Stored / not stored
- Can inherit from
TestCase
and write tests.run
method of the test case is used to start the test. Checker
class is implemented as a mixin forTestCase
class. It contains all need methods to check and assert entities.AssertionFail
can be used to fail the test. For now it is up toChecker
to report test results toTestResult
instance.TestRunner
is a static class. It can run a test case via itsrun
method. It invokes next steps:- Creates
TestResult
instance. - Creates
TestCase
instance. - Runs
TestCase
on the place. - Destroys
TestCase
after run. - Collects
TestResult
s and returns them.
- Creates
- User is responsible for stdout and stderr. User can configure any logger. Any "significant" action is considered an event and shall be stored in test results.
- Implement api for checker: on_check, on_passed, on_failed...
- Implement "between" comparison.
- (?) Modify traceback-s to show only line where comparison is fired.
- Implement text test writer.
- Improve exception info logging.