Inherits from NSObject
Conforms to GHTest
GHTestCaseLogWriter
Declared in GHTest.h
GHTest.m

Overview

Default test implementation with a target/selector pair.

  • Tests a target and selector
  • Notifies a test delegate
  • Keeps track of status, running time and failures
  • Stores any test specific logging

Tasks

Other Methods

Other Methods

JUnitXML Methods

  • – JUnitXML

    Return test results in JUnit XML format for external parsing use (such as a Continuous Integration system like Jenkins).

Properties

log

Messages logged during this test run

@property (readonly, strong, nonatomic) NSArray *log

Return Value

Messages logged during this test run

Declared In

GHTest.h

Class Methods

testWithTarget:selector:

Create autoreleased test with target/selector.

+ (id)testWithTarget:(id)target selector:(SEL)selector

Parameters

target

Target (usually a test case)

selector

Selector (usually a test method)

Declared In

GHTest.h

Instance Methods

JUnitXML

Return test results in JUnit XML format for external parsing use (such as a Continuous Integration system like Jenkins).

- (NSString *)JUnitXML

Declared In

GHTest+JUnitXML.h

cancel

Cancel the test.

- (void)cancel

Declared In

GHTest.h

disabledCount

The number of disabled tests

- (NSInteger)disabledCount

Return Value

The number of disabled tests

Declared In

GHTest.h

initWithIdentifier:name:

Create test with identifier, name.

- (id)initWithIdentifier:(NSString *)identifier name:(NSString *)name

Parameters

identifier

Unique identifier

name

Name

Declared In

GHTest.h

initWithTarget:selector:

Create test with target/selector.

- (id)initWithTarget:(id)target selector:(SEL)selector

Parameters

target

Target (usually a test case)

selector

Selector (usually a test method)

Declared In

GHTest.h

log:testCase:

Log message.

- (void)log:(NSString *)message testCase:(id)testCase

Parameters

message

Message

testCase

Test case

Declared In

GHTest.h

reset

Reset the test.

- (void)reset

Declared In

GHTest.h

run:

Run the test.

- (void)run:(GHTestOptions)options

Parameters

options

Options

Declared In

GHTest.h

setDisabled:

Whether test is disabled.

- (void)setDisabled:(BOOL)disabled

Declared In

GHTest.h

setException:

Exception that occurred.

- (void)setException:(NSException *)exception

Declared In

GHTest.h

setHidden:

Whether test is hidden.

- (void)setHidden:(BOOL)hidden

Declared In

GHTest.h

stats

Test stats.

- (GHTestStats)stats

Declared In

GHTest.h