Code Monkey home page Code Monkey logo

gh-unit's Introduction

GHUnit Build Status Cocoa Pod Cocoa Pod License

GHUnit is a test framework for Mac OS X and iOS. It can be used standalone or with other testing frameworks like SenTestingKit or GTM.

Features

  • Run tests, breakpoint and interact directly with the XCode Debugger.
  • Run from the command line or via a Makefile.
  • Run tests in parallel.
  • Allow testing of UI components.
  • Capture and display test metrics.
  • Search and filter tests by keywords.
  • View logging by test case.
  • Show stack traces and useful debugging information.
  • Include as a framework in your projects
  • Determine whether views have changed (UI verification)
  • Quickly approve and record view changes
  • View image diff to see where views have changed

Install (iOS)

Install the GHUnit gem

$ gem install ghunit

Install the Tests target

This will edit your ProjectName.xcodeproj file and create a Tests target, scheme, and a sample test file.

$ ghunit install -n ProjectName

Add the Tests target to your Podfile

Create a new file named Podfile in the directory that contains the your .xcodeproj file, or edit it if it already exists.

# Podfile
platform :ios, '6.0'

target :Tests do
	pod 'GHUnit', '~> 0.5.9'
end

Install your project's pods. CocoaPods will then download and configure the required libraries for your project:

$ pod install

Note: If you don't have a Tests target in your project, you will get an error: "[!] Unable to find a target named Tests". If you named your test target something different, such as "ProjectTests" then the Podfile target line should look like: target :ProjectTests do instead.

You should use the .xcworkspace file to work on your project:

$ open ProjectName.xcworkspace

Install Command Line

$ ghunit install_cli -n ProjectName

Install ios-sim using homebrew:

$ brew install ios-sim

Now you can run tests from the command line:

$ ghunit run -n ProjectName

Add a test

To generate a test in your test target with name SampleTest:

$ ghunit add -n ProjectName -f SampleTest

Install (From Source)

iOS

cd Project-iOS && make

Add the GHUnitIOS.framework to your project

OS X

cd Project-MacOSX && make

Add the GHUnit.framework to your project

Documentation

iOS

GHUnit-IPhone-0.5.8

Mac OS X

GHUnit-0.5.8

gh-unit's People

Contributors

gabriel avatar x2on avatar johnboiles avatar pretz avatar precipice avatar bmelts avatar lippling avatar dfabulich avatar erkan-yilmaz avatar jarinteractive avatar jasonrm avatar jongary-twitter avatar jmoody avatar mflint avatar mickeyreiss avatar levous avatar ssheldon avatar wbyoung avatar jbenet avatar zbyhoo avatar

Watchers

陈嗣圣 avatar

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.