Latest 0.1.1
Homepage https://github.com/Seachaos/Snape_iOS
License MIT
Platforms ios 7.0, requires ARC
Authors

CI Status
Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

Snape_iOS is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "Snape_iOS"

Example

Implement UISnapeDelegate in your class

Then Code for init snape (example):

snape = [UISnape new];
[self.view addSubview:snape];
snape.frame = self.view.frame;
snape.delegate = self;

When snape ready, will run delegate method:

- (void)snapeReadyForTest:(UISnape *)snape

Can use for HTTP test or some thing, example for HurryPorter HTTP test:

[snape test:@"Post Test" code:^UISnapeTestResult(UISnape *s, SnapeTaskObject *task, NSString *jobId){
    HurryPorter *porter = [[HurryPorter alloc] init];
    [porter makeRequest:^NSDictionary*(HurryPorter *porter){
        return @{@"First Name":@"Hurry",
                 @"Last Name":@"Porter"};
    } onSuccess:^void HUP_PARAM_SUCCESS{
        NSLog(@"success resp:%@", raw);
        NSLog(@"json is:%@", dict);
        [task success];
    } onFailed:^void HUP_PARAM_FAILED{
        NSLog(@"failed resp:%@", raw);
        [task failed];
    } url:@"http://www.myandroid.tw/test/post.php"];
    return WAIT_FOR_RESULT;
}];

Author

Seachaos, [email protected]

License

Snape_iOS is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Snape_iOS",
    "version": "0.1.1",
    "summary": "A test framework with UI",
    "description": "It' can be do test or some need network test in UI.",
    "homepage": "https://github.com/Seachaos/Snape_iOS",
    "license": "MIT",
    "authors": {
        "Seachaos": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Seachaos/Snape_iOS.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "Snape_iOS": [
            "Pod/Assets/*.png",
            "Pod/Assets/*.html"
        ]
    }
}

Pin It on Pinterest

Share This