Giter Site home page Giter Site logo

ios-workerbee's Introduction

โš ๏ธ This repo is obsolete. It was used for Couchbase Lite 1.x testing.

Couchbase Lite Workflow Test App

This iOS app is a shell for long-running workflow tests of the Couchbase Lite framework.

Getting Started

These instructions assume you are familiar with how to make an iOS app. Please follow them fully and in order the first time you build.

If you have questions or get stuck or just want to say hi, please visit the Mobile Couchbase group on Google Groups.

Prerequisite: Xcode 4.3 or later with the SDK for iOS 6 or later.

Building The App

Download or clone the repository

Clone the repo with git:

git clone [email protected]:couchbaselabs/iOS-WorkerBee.git

Get the framework

This project isn't quite standalone; it links against the Couchbase Lite framework, which it expects to find in the Frameworks subfolder. Build that framework, or download a precompiled build, and copy or symlink the iOS version of CouchbaseLite.framework into Frameworks.

Open the Xcode project

open 'Worker Bee.xcodeproj'

Build and run the app

  1. Select the appropriate destination (an iOS device or simulator) from the pop-up menu in the Xcode toolbar.
  2. Click the Run button.

Once in the app, you'll see a list of available tests. Tap the on/off switch next to a test to start or stop it. (Some tests stop automatically, some run forever till you stop them.)

To see more info about a test, tap its name to navigate to its page. This will show the test's log output. You can also start and stop the test from this page. The test will keep running whether you're on its page or not.

Test output is saved to the app's Documents directory. If you're running on a real device, you can access this directory by tethering the device, selecting it in iTunes, going to the Apps tab, scrolling down to the File Sharing list, then selecting "Worker Bee" in the list. In the simulator, you can look in the Xcode console output for lines starting with ** OPENING to see the paths to the log files.

Adding Your Own Tests

Just create a new subclass of BeeCouchTest. Read API docs for that class and its parent BeeTest to see what you can do, and look at the existing tests for inspiration.

Generally you'll override -setUp, set a heartbeatInterval, and override -heartbeat to perform periodic activity. The framework takes care of creating a fresh database for you to work with.

Uploading Test Results

Test results are saved into a local Couchbase Lite database and can be replicated to a remote database server. This is very useful for collecting and analyzing data from multiple devices.

To enable replication, open TestListController.m, uncomment the definition of kUpstreamSavedTestDatabaseURL, and set its value to the URL of the database to upload to. This can be the Couchbase Sync Gateway, or any CouchDB-compatible database. (It does need to allow anonymous push replication, unless you want to extend SavedTestRun.m to support authentication.)

License

Released under the Apache license, 2.0.

Background pattern images are from subtlepatterns.com, released under a Creative Commons Attribution 3.0 Unported License.
Bee icon is 19th-century clip art, public domain.

Copyright 2011-2013, Couchbase, Inc.

ios-workerbee's People

Contributors

snej avatar lichenyang2 avatar ashvindersingh avatar pasin avatar borrrden avatar kevm avatar

Stargazers

Alin Mechenici avatar Vinod Vishwakarma avatar Zachary Gramana avatar mayulu avatar Arvind Subramanian avatar Claudia Doppioslash avatar

Watchers

Hideki Itakura avatar  avatar Thuan Nguyen avatar Richard Smedley avatar Matthew D. Groves avatar Denis Rosa avatar Venkat avatar Leo Schuman avatar  avatar Aaron avatar Jeffry Morris avatar mayulu avatar Charles Dixon avatar Priya Rajagopal avatar Chris Harris avatar Jake Rawsthorne avatar  avatar Dmitrii Chechetkin avatar James Cloos avatar Donald Scott avatar  avatar  avatar Hod Greeley avatar Subhashni Balakrishnan avatar Dipti Borkar avatar  avatar Artem Stemkovski avatar  avatar  avatar Clarence J M Tauro avatar Sandip Nandi avatar Jasdeep Jaitla avatar  avatar  avatar James Nocentini avatar Marks Polakovs avatar Tai  avatar Rohinton Kazak avatar  avatar Jaekwon Park avatar  avatar  avatar Mike Goldsmith avatar Ali Alsuliman avatar Jack Harper avatar Rob Hedgpeth avatar Sarath Kumar Sivan avatar Fabrice Leray avatar Elliot Scribner avatar Amy Kurtzman avatar  avatar Fujio Turner avatar  avatar  avatar Cyrus Hanlon avatar Matt Hall avatar Gilda avatar Arun Vijayraghavan avatar  avatar Richard Ponton avatar Brian Downs avatar  avatar Daniel James avatar Adam S Levy avatar Daniel Nicholson avatar Parag Agarwal avatar  avatar James H avatar  avatar  avatar  avatar  avatar James Powenski avatar Phil Stott avatar Naitik Shah avatar  avatar Anji avatar  avatar David Maier avatar Andrew Reslan avatar Arunkumar Senthilnathan avatar  avatar Jesse Roberson avatar  avatar Balakumaran G avatar Austin Gonyou avatar Hussain Towaileb avatar  avatar Isaac Lowe avatar Ashwin avatar Adam Fraser avatar Murtadha Hubail avatar Roi Katz avatar  avatar Karim Meliani avatar Daniel Ma avatar  avatar  avatar Vijay Girish avatar Korrigan Clark avatar

ios-workerbee's Issues

Conflict errors

When running https://github.com/couchbaselabs/iOS-WorkerBee.git on the Performance_Testing_2 branch, with the Tests / Test8_DocRevisions.m test, @march44 and I are seeing errors like:

---- 3/12/14, 12:56:24 PM STARTED
1 bytes
Created 1 documents
Starting Test
!!! Failed to Update doc
ERROR: Error Domain=CBLHTTP Code=409 "409 conflict" UserInfo=0x8d6bab0 {NSLocalizedFailureReason=conflict, NSLocalizedDescription=409 conflict}
---- 3/12/14, 12:56:25 PM STOPPED
(Elapsed time: 1.005 sec)

we saw the same issue in the Android port of the performance tests, and the cause seems to be "improper" usage of updating documents within a transaction.

@snej can you read through https://github.com/couchbase/couchbase-lite-android/issues/220 and give your thoughts if this seems like this should work, or if couchbase lite is being used improperly here? Also we might think about updating the docs for runInTransaction to document this as a "gotcha" to watch out for.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.