Platformsios 8.0, osx 10.10

CI Status


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


Scoper is designed with Swift 4 API in mind


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

pod 'Scoper'


Scoper API is designed to be familiar for everybody who tried BDD testing frameworks like Kiwi or Quick

Use Scoper by creating Scope instances and scheduling them via TestRunner

Basic usage:

let scope = DefaultScope.Builder()
    .name("My scope")
    .testCase { context, completion in
        // run worker instructions here

Builder for Scope has following methods:

name – to set human-readable name for scope

options – to set measurement and logging options for scope, TestOptions struct

before – block to execute before the scope

beforeEach – block to execute before each worker run for each test case

after – block to execute after the scope

afterEach – block to execute after each worker run for each test case

testCase – to append test case

nestedScope – to add nested scope


Despite there’re shorthand methods for creating TestCase, it has it’s own functional builder:

name – to set human-readable name for worker

async – to set whether worker is expected to work asynchronously. completion() should be called in worker in this
case. Default value is false

worker – worker block

numberOfRuns – to set number of runs. Default value is 10

timeout – to set timeout value for worker. It is measured from calling worker until call of completion. Default value is 60s

entryPointQueue – to set entry point queue for worker. Default is DispatchQueue.main


TestOptions values:

runTime – measure worker run time
cpuTime – measure CPU usage of measured process
hostCpuTime – measure CPU usage of target device
memoryFootprint – measure memory usage of worker
diskUsage – measure disk reads and writes of process
frameRate – measure device frame rate (on iOS)
logProgress – use logging of each scope / worker start and complete
logResults – log performance results
basic – runTime, logProgress and logResults
complete – all options included

More usage examples can be found here and here


Petro Korienev, [email protected]


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

Latest podspec

    "name": "Scoper",
    "version": "0.1.2",
    "summary": "Scoper is a microframework for performance testing",
    "description": "Scoper is a microframework cragted for performance testing purposes.nWith help of very few basic types it provides powerful DSL for declarativendescription of performance testing suite. Unlike XCTest works on physical iOS devices",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "soxjke": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.2"
    "social_media_url": "",
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    "swift_version": "4.0",
    "source_files": "Scoper/Classes/**/*"

Pin It on Pinterest

Share This