# ApptimizeTestInfo

    @protocol ApptimizeTestInfo <NSObject>

Information about a single A/B test or feature flag this device is enrolled in.

- `-testName`

  #### Declaration

  Objective-C

      - (nonnull NSString *)testName;

  Swift

      func testName() -> String

  #### Return Value

  The name of the test.

- `-enrolledVariantName`

  #### Declaration

  Objective-C

      - (nonnull NSString *)enrolledVariantName;

  Swift

      func enrolledVariantName() -> String

  #### Return Value

  The name of the variant of the test that this device is enrolled in.

- `-testID`

  #### Declaration

  Objective-C

      - (nonnull NSNumber *)testID;

  Swift

      func testID() -> NSNumber

  #### Return Value

  The unique numeric ID of the test.

- `-enrolledVariantID`

  #### Declaration

  Objective-C

      - (nonnull NSNumber *)enrolledVariantID;

  Swift

      func enrolledVariantID() -> NSNumber

  #### Return Value

  The unique numeric ID of the currently enrolled test variant.

- `-testStartedDate`

  Note: this is the time as reported by Apptimize’s servers and is not affected by changes in the device’s clock.

  #### Declaration

  Objective-C

      - (nonnull NSDate *)testStartedDate;

  Swift

      func testStartedDate() -> Date

  #### Return Value

  The date this Apptimize test was started.

- `-testEnrolledDate`

  Note: unlike the return value for `testStartedDate`, this is the time as reported by the device, and not the time as reported by Apptimize’s server. This difference is relevant if the device’s clock is inaccurate.

  #### Declaration

  Objective-C

      - (nonnull NSDate *)testEnrolledDate;

  Swift

      func testEnrolledDate() -> Date

  #### Return Value

  The date this device was enrolled into this test.

- `-cycle`

  #### Declaration

  Objective-C

      - (nonnull NSNumber *)cycle;

  Swift

      func cycle() -> NSNumber

  #### Return Value

  The cycle ID of this test. This is 1 if it’s the initial test run, and increments by 1 each time the test is restarted or for if a non-proportional allocation change is made.

- `-currentPhase`

  #### Declaration

  Objective-C

      - (nonnull NSNumber *)currentPhase;

  Swift

      func currentPhase() -> NSNumber

  #### Return Value

  The current phase of this test. This is 1 if the test has not been modified since creation, and increments by 1 each time the test is modified (such as when the test’s allocations have been changed). The phase ID does not reset when a test is restarted.

- `-participationPhase`

  #### Declaration

  Objective-C

      - (nonnull NSNumber *)participationPhase;

  Swift

      func participationPhase() -> NSNumber

  #### Return Value

  The first phase in which this device participated in this test for this cycle. If this test has not been participated in during this cycle, this value will be 0.

- `-userHasParticipated`

  Returns whether the user has participated in this test in this cycle since enrollment.

  - For code block tests, this indicates that a codeblock has been executed for this test.
  - For visual tests, this indicates that at least one changed element has been seen.

  - For dynamic variable tests, this indicates that the value of a variable has been queried.

  #### Declaration

  Objective-C

      - (BOOL)userHasParticipated;

  Swift

      func userHasParticipated() -> Bool

  #### Return Value

  Returns YES if the user has participated in this test, or NO if they have not.

- `-userID`

  #### Declaration

  Objective-C

      - (nullable NSString *)userID;

  Swift

      func userID() -> String?

  #### Return Value

  The user id of the currently enrolled user. If the user has not been set then the anonymous user id is used.

- `-anonymousUserID`

  #### Declaration

  Objective-C

      - (nonnull NSString *)anonymousUserID;

  Swift

      func anonymousUserID() -> String

  #### Return Value

  The anonymous user id currently assigned to this apptimize instance.

- `-experimentType`

  #### Declaration

  Objective-C

      - (ExperimentType)experimentType;

  Swift

      func experimentType() -> ExperimentType

  #### Return Value

  The experiment type this test info represents.

© 2025 Apptimize Inc.. All rights reserved. (Last updated: 2025-10-10)

Generated by jazzy ♪♫ v0.14.3, a Realm project.