Questions tagged [gh-unit]

GHUnit is a test framework for Objective-C, Mac OS X 10.5 and above and iPhone 3.x and above. It can be used standalone or with other testing frameworks like SenTestingKit or GTM.

GHUnit is a test framework for Objective-C, Mac OS X 10.5 and above and iPhone 3.x and above. It can be used standalone or with other testing frameworks like SenTestingKit or GTM.

62 questions
2
votes
2 answers

GHUnit crashes when running assertion in callback block instead of showing error on front end

Using any assertion in a callback makes the GH-Unit app crash. Assertions work fine elsewhere. There is a similar question here: Why does a false assertion in async test in GHUnit crash the app instead of just failing the test? But I don't…
James Zaghini
  • 3,895
  • 4
  • 45
  • 61
2
votes
1 answer

iphone: cannot link gh-unit target to app target, cannot execute binary file

this is a question that tries to accomplish what this tutorial offers with a GHUnit Test Target. Its about linking a test target to the source target so that you dont have to manually include the source files in the test target. The following is an…
dgrandes
  • 1,187
  • 2
  • 14
  • 28
2
votes
1 answer

Is it possible to determine the execution order of GHUnit test methods?

This must sound like a severe case of the GIYF-itis, but I can't find anything useful out there. It looks like test methods in GHUnit are executed in alphabetical order. I am all for it that every test case/class should be testable on its own, but I…
epologee
  • 11,229
  • 11
  • 68
  • 104
2
votes
3 answers

GHUnit runs in Simulator but not on iPhone

So I have been playing with GHUnit today, and have some nice tests which run just fine in the similator in XCode4. When I run them on the iPhone itself I get the following error: 'Unable to instantiate the UIApplication delegate instance. No class…
iandotkelly
  • 9,024
  • 8
  • 48
  • 67
2
votes
1 answer

GHAssertThrowsSpecific cannot find type NSRangeException

I'm using Xcode 4 and GHUnit to write some unit tests for the first time. All the advice appears to suggest going with GHUnit and not OCUnit. I have a custom collection object called 'myList', and passing a message to get the selection at index:-1.…
iandotkelly
  • 9,024
  • 8
  • 48
  • 67
2
votes
2 answers

GHUnit Code Coverage on iPhone

I've recently been learning how to write Unit Tests using GHUnit for the iPhone. However, I have no idea on how to set up code coverage to work with this, via xCode 4. The googletubes have (somehow) not been particularly helpful in this matter.
Andrew Natoli
  • 627
  • 5
  • 9
2
votes
1 answer

Unit testing : ViewController has no segue with identifier : "segue id"

I want to test below method : - (void)myMethod { self.contact = nil; [self performSegueWithIdentifier:@"segue id" sender:self]; } This is what I do in test class : - (void)testMyMethod { // Call method to test [testClass…
Geek
  • 8,280
  • 17
  • 73
  • 137
2
votes
0 answers

GHUnit target: failed to attach to process

I have a GHUnit test target, TestGH, which I'd like to use to test classes in my application, TestApp. I'm using Xcode 4.5 and trying to run TestGH on iPad 6.0 Simulator. I believe I've configured the TestGH build correctly in the Build Settings and…
2
votes
1 answer

Unit test for NSManagedObject [GHUnit]

I am Java developer and I used to test my Java entity as POJO. Now, with Obj-C, I would like to do the same for my entity that inherit from NSManagedObject (I use CoreData for the persistence). For example I would like to test my Customer entity as…
ragu89
  • 335
  • 7
  • 22
2
votes
1 answer

GHUnit gives allocate_pages() error after conversion to ARC in iOS Project

I've recently converted my iOS project to ARC. I have two targets in my project. One is the application itself, and the other is a set of GHUnit tests. I have approximately 200 tests that do quite a lot of work in terms of creating and modifying…
Chris Grant
  • 2,463
  • 23
  • 27
1
vote
1 answer

GHUnit: HTTPS REST tests are always failing on CLI

I'm doing a project where I must to do iOS apps auto-testing, and all that iOS apps have GHUnit as testing Framework. This apps have some REST HTTP and HTTPS tests that give us expected results if we run that tests on the iOS devices or iOS…
cristiangm
  • 23
  • 1
  • 6
1
vote
0 answers

GHUnit testing against an application that uses a library

I'm trying to build some GHUnit tests based on an iOS application I have which uses ProtocolBuffers, accessed as a library. I've run into lots of linker problems which I've slowly killed off by adding the source files from the application to the…
hocker
  • 688
  • 6
  • 18
1
vote
2 answers

Unit Testing with GHUnit

I am new to iPhone Development. I have integrated the framework GHUnitIOS to Test my application. but I haven't found documentation about how to implement Unit testing (it's my first time in Unit Testing). Can someone can help me to begin with…
izan
  • 727
  • 2
  • 11
  • 22
1
vote
1 answer

GHUnitIOS Build error

I have been trying to get gh-unit working in an iOS project and I am getting a weird build error. I am using the 4.2 iOS SDK and XCode 3.2.5. I followed this tutorial: http://4arrowsmedia.com/2010/09/ghunit-setup/ And I am getting the same build…
obxdenied
  • 11
  • 2
1
vote
0 answers

GHUnit sumbols for arm64 missing

I try to run GHUnit on the device and receive the following compile error. ld: warning: directory not found for option '-L/Users/gtaskos/Documents/Projects/My/SDKs/My iOS SDK/My-iOS/Pods/build/Debug-iphoneos' ld: warning: ignoring file…
George Taskos
  • 8,324
  • 18
  • 82
  • 147