FWABSplitTest


@interface FWABSplitTest : NSObject

AB分离测试类

  • 测试名称

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull name;
  • 默认版本

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) FWABVersion *_Nonnull defaultVersion;
  • 随机数仓库

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) id<FWABRandomRepository> _Nonnull randomRepository;
  • 初始化方法,指定随机数仓库

    Declaration

    Objective-C

    - (nonnull instancetype)initWithName:(NSString *_Nonnull)name
                          defaultVersion:(FWABVersion *_Nonnull)defaultVersion
                        randomRepository:
                            (id<FWABRandomRepository> _Nonnull)randomRepository;
  • 初始化方法,使用默认UserDefaults随机数仓库

    Declaration

    Objective-C

    - (nonnull instancetype)initWithName:(NSString *_Nonnull)name
                          defaultVersion:(FWABVersion *_Nonnull)defaultVersion;
  • 添加版本并指定权重

    Declaration

    Objective-C

    - (void)addVersion:(FWABVersion *_Nonnull)version weight:(double)weight;
  • 设置随机数

    Declaration

    Objective-C

    - (void)setRandomNumber:(NSInteger)randomNumber;
  • 移除随机数

    Declaration

    Objective-C

    - (void)removeRandomNumber;
  • 运行测试

    Declaration

    Objective-C

    - (void)run;
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  • Unavailable

    -init is unavailable

    Undocumented

    Declaration

    Objective-C

    + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");