GHTestGroup Class Reference
| Inherits from | NSObject |
| Conforms to | GHTestDelegate GHTestGroup |
| Declared in | GHTestGroup.h GHTestGroup.m |
Overview
A collection of tests (or test groups).
A test group is a collection of idGHTest, that may represent a set of test case methods.
For example, if you had the following GHTestCase.
@interface FooTest : GHTestCase {}
- (void)testFoo;
- (void)testBar;
@end
The GHTestGroup would consist of and array of GHTest: FooTest#testFoo, FooTest#testBar, each test being a target and selector pair.
A test group may also consist of a group of groups (since GHTestGroup conforms to GHTest), and this might represent a GHTestSuite.
Tasks
Other Methods
-
childrenproperty -
parentproperty -
– initWithName:delegate: -
– initWithTestCase:delegate: -
– initWithTestCase:selector:delegate: -
+ testGroupFromTestCase:delegate: -
– addTestCase: -
– addTestGroup: -
– addTests: -
– addTest: -
– shouldRunOnMainThread -
– hasEnabledChildren -
– failedTests -
– runInOperationQueue:options:
Other Methods
Properties
Class Methods
testGroupFromTestCase:delegate:
Create test group from a test case.
+ (GHTestGroup *)testGroupFromTestCase:(id)testCase delegate:(id<GHTestDelegate>)delegateParameters
- testCase
Test case, could be a subclass of SenTestCase or GHTestCase
- delegate
Delegate, notifies of test start and end
Return Value
New test group
Declared In
GHTestGroup.hInstance Methods
addTest:
Add test to this group.
- (void)addTest:(id<GHTest>)testParameters
- test
Test to add
Declared In
GHTestGroup.haddTestCase:
Add a test case (or test group) to this test group.
- (void)addTestCase:(id)testCaseParameters
- testCase
Test case, could be a subclass of SenTestCase or GHTestCase
Declared In
GHTestGroup.haddTestGroup:
Add a test group to this test group.
- (void)addTestGroup:(GHTestGroup *)testGroupParameters
- testGroup
Test group to add
Declared In
GHTestGroup.haddTests:
Add tests to this group.
- (void)addTests:(NSArray *)testsParameters
- tests
Tests to add
Declared In
GHTestGroup.hfailedTests
Get list of failed tests.
- (NSArray *)failedTestsReturn Value
Failed tests
Declared In
GHTestGroup.hhasEnabledChildren
YES if we have any enabled chilren, NO if all children have been disabled.
- (BOOL)hasEnabledChildrenReturn Value
YES if we have any enabled chilren, NO if all children have been disabled.
Declared In
GHTestGroup.hinitWithName:delegate:
Create an empty test group.
- (id)initWithName:(NSString *)name delegate:(id<GHTestDelegate>)delegateReturn Value
New test group
Declared In
GHTestGroup.hinitWithTestCase:delegate:
Create test group from a test case.
- (id)initWithTestCase:(id)testCase delegate:(id<GHTestDelegate>)delegateParameters
- testCase
Test case, could be a subclass of SenTestCase or GHTestCase
- delegate
Delegate, notifies of test start and end
Return Value
New test group
Declared In
GHTestGroup.hinitWithTestCase:selector:delegate:
Create test group from a single test.
- (id)initWithTestCase:(id)testCase selector:(SEL)selector delegate:(id<GHTestDelegate>)delegateParameters
- testCase
Test case, could be a subclass of SenTestCase or GHTestCase
- selector
Test to run
- delegate
Delegate, notifies of test start and end
Declared In
GHTestGroup.hrunInOperationQueue:options:
Run in operation queue. Tests from the group are added and will block until they have completed.
- (void)runInOperationQueue:(NSOperationQueue *)operationQueue options:(GHTestOptions)optionsParameters
- operationQueue
If nil, then runs as is
- options
Options
Declared In
GHTestGroup.hshouldRunOnMainThread
Whether the test group should run on the main thread. Call passes to test case instance if enabled.
- (BOOL)shouldRunOnMainThreadDeclared In
GHTestGroup.htest:didLog:source:
Test logged a message.
- (void)test:(id<GHTest>)test didLog:(NSString *)message source:(id<GHTest>)sourceParameters
- test
Test
- didLog
Message
- source
If tests are nested, than source corresponds to the originator of the delegate call
Declared In
GHTest.htestDidEnd:source:
Test ended.
- (void)testDidEnd:(id<GHTest>)test source:(id<GHTest>)sourceParameters
- test
Test
- source
If tests are nested, than source corresponds to the originator of the delegate call
Declared In
GHTest.h