Skip to content
Browse files

Updating documentation. Add default init to FrankServer.

  • Loading branch information...
1 parent 6f3c8de commit ed356200ad531eea16f6f076c916890ed3526c6a @dlongmuir dlongmuir committed Nov 8, 2010
Showing with 112 additions and 34 deletions.
  1. +107 −11 README.md
  2. +0 −23 doc/adding_frank_to_a_project.md
  3. +1 −0 src/FrankServer.h
  4. +4 −0 src/FrankServer.m
View
118 README.md
@@ -1,22 +1,118 @@
+Frank
+=====
+
+An iPhone and iPad testing tool that uses UISpec's UIScript to
+remotely drive an App.
+
+
+Goals
+-----
+
+* Provide support for using Cucumber when developing an iOS app.
+* Use UIScript syntax to drive the app
+* Work on both the simulator and device
+* Provide supporting tools and techniques for supporting BDD and
+ regression testing
+
+
+Features
+--------
+
+* Embedded web server allows inspection of iOS GUI to ease the
+ difficulty in writing scripts
+* Record Cucumber and simulator runs to see how the UI is responding
+
+Installing Frank
+----------------
+(see section below "Your first Frankified App" for detailed steps)
+
+1. Duplicate your app target, creating a new "Frankified" target
+
+2. Create a Frank group in your project to hold the Frank source
+you'll be adding. Add the lib, src and frank_static_resources bundle
+to your Frankified target
+
+3. Add the CFNetwork.framework linked library to your Frankified target
+
+4. Add -ObjC flag to your "Other Linker Flags" settings, again in your
+Frankified target
+
+5. Add the code to launch Frank to the Frankified app. You can do this
+either by creating a whole new main.m just for testing with Frank or
+by using conditional compilation.
+
+To create a whole new main.m, duplicate your main.m file and add the
+Frank launching code to it. See the sample provided in
+Frank/main.m.sample. Be sure to use your new main.m in the Frankified
+target and continue to use your original main.m in your original
+target.
+
+6. Build and run. You might get a warning about allowing incoming
+connections depending on your firewall rules. Test out your install by
+connecting to the embedded Frank server using your browser at
+http://127.0.0.1:37265 . If everything has worked you'll see a simple
+html page entitled "Symbiote" along with some controls to interrogate
+the iOS app. The first time you compile, there will be many compiler
+warnings from the included libraries. These can be safely ignored.
+
+
+Writing Cucumber Steps
+----------------------
+
+
+
+Your first Frankified App
+-------------------------
+Here are some detailed steps on how to create your first Frankified app.
+
+1. Create your app! :-)
+For this tutorial, we can just use an Apple template app.
+
+
+
+Anything else?
+--------------
+
+See the <ruby> file for additional functions that may be helpful in
+your Cucumber scripts.
+
+
+Please help!
+------------
+
+We are still working on improving this tool. Please fork this repo and
+commit your changes. Feedback, suggestions and questions are welcome
+<tell how to here>.
+
+FAQ
+---
+
+* ** Why isn't Frank compiled as a static library?**
+
+ Something to do with UISpec functionality not completely working
+ when compiled as a static library. (Pete?)
+
+
+
+
+
+
+--- old doc from here down, document refactoring in progress
+
+
About
-----
-Frank is an iPhone/iPad UI testing tool. It combines UISpec with an embedded HTTP server. This means it can be driven externally by cucumber for example.
+Frank is an iPhone/iPad UI testing tool. It combines UISpec with an
+embedded HTTP server. This means it can be driven externally by
+cucumber for example.
[Check out Frank in action!](http://sl.thepete.net/frank_ea_demo) This short screencast shows a sample iPhone app being exercised in the iPhone simulator by a set of cucumber tests.
Architecture
----
![Frank Architecture Overview](http://github.com/moredip/frank/raw/master/doc/Frank%20Architecture.png)
-Usage
+Getting Started
-----
-
-At this point all you need to do to add Frank to an iPhad app is:
-
- * create a Frankified target by duplicating your normal target
- * add the Frank.a static library to that Frankified target
- * add a -ObjC flag to the linker settings (Other Linker Flags) for the Frankified target (see http://developer.apple.com/mac/library/qa/qa2006/qa1490.html for details)
- * add a dependency on apple's CFNetwork Framework
- * add the the static frank bundle to the project somewhere. Frank uses these files to provide the interactive Symbiote web app while your iPhone app is running
- * add a custom main.m file (a sample of which is included in the Frank repo) which boots the Frank server during iPhone app startup.
+Check out the [Getting Started with Frank](https://github.com/moredip/Frank/wiki/Getting-started-with-Frank) page on the github wiki!
View
23 doc/adding_frank_to_a_project.md
@@ -1,23 +0,0 @@
-# Step 1
-Cut a hole in a box.
-
-# Step 2
-Woah! Just kidding!
-
-# Step 1, for realz
-Add a 'MyApp - Frankified' target to your app by **duplicating your main target**
-
-# Step 2
-In Xcode add a Frank group to your project. Within the frank group add the frank src directory, the frank lib directory, and the frank_static_resources.bundle directory. These only need to be added to your new 'Frankified' target
-
-# Step 3
-Add CFNetwork framework
-
-# Step 4
-Create a custom version of main.m for your Frankified target. Do this by:
-* copy the main.m.sample file from the Frank distribution into your application source tree somewhere, renaming it to main.m (or some other name with a .m file extension)
-* In Xcode add that file to just the Frankified target
-* finding the original standard main.m for your app, and make sure it *is not* being included in your Frankified target
-
-# Step 5
-Build that sucka, fire it up in the simulator, and then point your browser at http://localhost:37265 and check you have the Frank symbiote at your command. Trying clicking 'Dump current DOM' to check that Frank is alive and kicking.
View
1 src/FrankServer.h
@@ -14,6 +14,7 @@
HTTPServer *_httpServer;
}
+- (id) initWithDefaultBundle;
- (id) initWithStaticFrankBundleNamed:(NSString *)bundleName;
- (BOOL) startServer;
View
4 src/FrankServer.m
@@ -41,6 +41,10 @@ void LogToMemory(NSString *format, ...) {
@implementation FrankServer
+- (id) initWithDefaultBundle {
+ return [self initWithStaticFrankBundleNamed: @"frank_static_resources"];
+}
+
- (id) initWithStaticFrankBundleNamed:(NSString *)bundleName
{
self = [super init];

0 comments on commit ed35620

Please sign in to comment.
Something went wrong with that request. Please try again.