public class

ApptimizeTestInfo

extends Object
java.lang.Object
   ↳ com.apptimize.ApptimizeTestInfo

Class Overview

Information about a single Apptimize A/B test that this device is enrolled in.

Summary

Public Constructors
ApptimizeTestInfo(String testName, Long testId, ApptimizeTestType testType, String enrolledVariantName, long enrolledVariantId, Date testStartedDate, Date testEnrolledDate, boolean participated, int cycle, int currentPhase, int participationPhase, String userId, String anonymousUserId)
Create a new ApptimizeTestInfo data class.
Public Methods
String getAnonymousUserId()
ApptimizeTestType getApptimizeTestType()
int getCurrentPhase()
Returns the current phase of this test.
String getCustomerUserId()
int getCycle()
Returns the cycle of this test.
long getEnrolledVariantId()
String getEnrolledVariantName()
int getParticipationPhase()
Returns the phase in which the last participation occurred for this test.
Date getTestEnrolledDate()
Returns the java.util.Date this device was enrolled into this A/B test.
Long getTestId()
Returns the java.lang.Long ID of the Apptimize A/B test.
String getTestName()
Date getTestStartedDate()
Returns the java.util.Date this Apptimize test was started.
boolean userHasParticipated()
Returns whether the user has participated in this test since enrollment.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ApptimizeTestInfo (String testName, Long testId, ApptimizeTestType testType, String enrolledVariantName, long enrolledVariantId, Date testStartedDate, Date testEnrolledDate, boolean participated, int cycle, int currentPhase, int participationPhase, String userId, String anonymousUserId)

Create a new ApptimizeTestInfo data class.

Parameters
testName The name of the test
testId The unique id of the test
testType The type of test
enrolledVariantName The name of the variant the user is enrolled in
enrolledVariantId The unique id of the varient the user is enrolled in
testStartedDate The date the test started
testEnrolledDate The date the user became enrolled
participated A flag indicating if the user has participated in the test yet
cycle The current cycle of the test
currentPhase The current phase of the test
participationPhase The phase which the user first participated in
userId The userId of the enrolled user (may be null)
anonymousUserId The anonymous id of the enrolled user

Public Methods

public String getAnonymousUserId ()

Returns
  • The java.lang.String anonymous user id of the user enrolled in the Apptimize A/B test.

public ApptimizeTestType getApptimizeTestType ()

Returns

public int getCurrentPhase ()

Returns 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 a test's allocations have been changed). The phase does not reset when a test is restarted.

Returns
  • The int ID of the current phase of this test.

public String getCustomerUserId ()

Returns
  • The current customer-specified java.lang.String ID of the user enrolled in the Apptimize A/B test. This may be null if there is no customer specified ID.

public int getCycle ()

Returns the cycle of this test. This is 1 if it's the initial test run, and increments by 1 each time the test is restarted.

Returns
  • The int ID of the cycle of this test.

public long getEnrolledVariantId ()

Returns
  • The long ID of the variant of this test that this device is enrolled in.

public String getEnrolledVariantName ()

Returns
  • The java.lang.String name of the variant of this test that this device is enrolled in.

public int getParticipationPhase ()

Returns the phase in which the last participation occurred for this test.

Returns
  • The int ID of the participation phase of this test.

public Date getTestEnrolledDate ()

Returns the java.util.Date this device was enrolled into this A/B test. Note that unlike the return value for getTestStartedDate() , 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.

Returns
  • The java.util.Date this device was enrolled into this A/B test.

public Long getTestId ()

Returns the java.lang.Long ID of the Apptimize A/B test. Note that this value can be null if recently upgrading from an older version of the Apptimize SDK that did not support this method.

Returns
  • The java.lang.Long ID of the Apptimize A/B test.

public String getTestName ()

Returns
  • The java.lang.String name of the Apptimize A/B test.

public Date getTestStartedDate ()

Returns the java.util.Date this Apptimize test was started. Note that this is the time as reported by Apptimize's servers and is not affected by changes in the device's clock.

Returns
  • The java.util.Date this Apptimize test was started.

public boolean userHasParticipated ()

Returns whether the user has participated in this test 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.

Returns
  • the java.lang.Boolean indicating whether the user has participated in this test