No description or website provided.
JavaScript CSS Objective-C Shell HTML Ruby C
Permalink
Failed to load latest commit information.
FitNesseRoot Make MacAcceptanceTests passing again Sep 16, 2016
MacSK migrate to SpecKit Aug 13, 2012
MacSpecs Convert SpecKit to OCDSpec2 Nov 8, 2013
ObjectiveCSlim.xcodeproj Add support for Swift Oct 7, 2016
ObjectiveCSlim.xcworkspace Updates for Xcode 8 Oct 7, 2016
ObjectiveCSlim Make MacAcceptanceTests passing again Sep 16, 2016
Pods Updates for Xcode 8 Oct 7, 2016
bin Make MacAcceptanceTests passing again Sep 16, 2016
cslim @ b170bb1 Update to the latest cslim Oct 7, 2016
iOSSpecs Make MacAcceptanceTests passing again Sep 16, 2016
travis Add Travis CI for iOSSpecs Nov 9, 2013
.gitignore Remove xcworkspace from gitignore Oct 7, 2016
.gitmodules Add Travis CI for iOSSpecs Nov 9, 2013
.rvmrc Convert SpecKit to OCDSpec2 Nov 8, 2013
.travis.yml Add Travis CI for iOSSpecs Nov 9, 2013
Count.h Updating example fixtures to use the latest features Feb 8, 2012
Count.m Updating example fixtures to use the latest features Feb 8, 2012
Default-568h@2x.png Updates Cocoapod schemes Nov 8, 2013
EchoFixture.h work on statement executor Dec 2, 2011
EchoFixture.m work on statement executor Dec 2, 2011
Fixtures.m Swap out statement executor Nov 6, 2011
Gemfile Convert SpecKit to OCDSpec2 Nov 8, 2013
Gemfile.lock Convert SpecKit to OCDSpec2 Nov 8, 2013
LICENSE added EPL license Mar 1, 2012
MacSpecs-Bridging-Header.h Add support for Swift Oct 7, 2016
Main.c first Oct 14, 2011
Math.h Updating example fixtures to use the latest features Feb 8, 2012
Math.m Updating Project for latests Xcode Aug 8, 2012
ObjAdderFixture.h Updating example fixtures to use the latest features Feb 8, 2012
ObjAdderFixture.m migrate to SpecKit Aug 13, 2012
ObjectiveCSlim-Info.plist Make MacAcceptanceTests passing again Sep 16, 2016
PageDriver.h work on statement executor Dec 2, 2011
PageDriver.m work on statement executor Dec 2, 2011
Podfile Make MacAcceptanceTests passing again Sep 16, 2016
Podfile.lock Updates for Xcode 8 Oct 7, 2016
README.markdown Update README Aug 16, 2012
SetUp.h work on statement executor Dec 2, 2011
SetUp.m work on statement executor Dec 2, 2011
TearDown.h work on statement executor Dec 2, 2011
TearDown.m work on statement executor Dec 2, 2011
TestQuery.h work on statement executor Dec 2, 2011
TestQuery.m Update cslim with support for multibyte characters Aug 17, 2012
Uncle.h work on statement executor Dec 2, 2011
Uncle.m migrate to SpecKit Aug 13, 2012
fitnesse-standalone.jar Update to latest fitnesse Aug 31, 2012

README.markdown

Using Objective C Slim

See here for installation/setup instructions: https://github.com/ericmeyer/OCSlim-Templates

What is Objective C Slim?

This provides a way to write acceptance tests for your iOS and other Objective C applications using Slim tables and fixtures written in Objective C.

http://fitnesse.org/FitNesse.UserGuide.SliM has more information about what Slim is.

Making Changes to Objective C Slim

https://github.com/dougbradbury/cslim

This project is an example project using the cslim project as a dependency via a git submodule. If you make changes/additions to Objective C Slim, make sure to push those to the cslim project. Also, new files should typically be added to the cslim submodule.

Running These Examples

Note: Some of the examples intentionally give errors or warnings.

  1. Clone this project.
  2. Run git submodule init
  3. Run git submodule update
  4. Open the project in Xcode.
  5. Run ./bin/StartFitnesse
  6. Open a browser to http://localhost:8080/CslimFirstExamples
  7. Click "Suite" near the top left corner.
  8. See results.

Getting Started with Tests for Xcode

Soon to be replaced with a template for an acceptance test target.

  1. Create a new project or open an existing project
  2. Checkout https://github.com/dougbradbury/cslim into your project.
  3. Create a new target and call it AcceptanceTests.
  4. Add all the header files from the following directories to the project. Make sure they are a included in the AcceptanceTests target.
    • include/Com
    • include/CSlim
  5. Add all the src files from the following directories to the project. Make sure they are a included in the AcceptanceTests target.
    • src/Com
    • src/CSlim
    • src/ExecutorObjectiveC
  6. Download fitnesse.jar into the root of your project.
  7. Start fitnesse and write some tests. See http://fitnesse.org/FitNesse.UserGuide.SliM for help in writing and running Slim tests.
  8. Write new fixtures in Xcode, making sure to add them to the AcceptanceTests target.
  9. Run the tests in fitnesse.

Currently, the target AcceptanceTests will not actually run the tests. Instead it just builds the fixtures.

Fitnesse Test Runner Options

Use this as a starting point for the contents of your Fitnesse page that is your top level suite. It has been copy pasted from http://localhost:8080/CslimFirstExamples?edit while fitnesse is running on your local machine.

!contents -R2 -g -p -f -h


!define TEST_SYSTEM {slim}
!define TEST_RUNNER {build/Debug/AcceptanceTests.app/Contents/MacOS/AcceptanceTests}
!define COMMAND_PATTERN {%m}
!define SLIM_VERSION {0.0}

Writing Fixtures

Fixture methods that take one argument expect an NSString Fixture methods that take more than one argument expect an NSArray of NSString's. All fixture methods return an NSString See ObjAdderFixture for an example of a decision table See Count for an example of a script table

Useful Methods

Converting Strings to number primitives:

  • [@"123" intValue];
  • [@"3.50" doubleValue];
  • [@"3.14" floatValue];

Converting to an NSString

  • From an NSNumber
    • NSNumber* number = [NSNumber numberWithInt: 1];
    • [number stringValue];
  • General case
    • [NSString stringWithFormat: @"%@, %@", @"Lastname", @"Firstname"];