Questions tagged [cedar-bdd]

BDD-style Objective-C testing framework.

Cedar is an open source, BDD-style, Objective-C testing framework. Primary uses are test driving iOS and OSX applications. Being it relies only on Foundation and C++11, it is also well-suited for use in other environments where these are available.

The project was built by and is actively maintained by Pivotal Labs.

15 questions
5
votes
1 answer

Test Core Data Application

How should I test the findByAttribute instance method I added to NSManagedObject? At first, I thought of programmatically creating an independent Core Data stack as demonstrated by Xcode's Core Data Utility Tutorial. And, in my search for that…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
4
votes
3 answers

no type named 'shared_ptr' in namespace 'std'

Hopefully this helps somebody else Trying to compile an iOS project with Cedar BDD kept failing with no type named 'shared_ptr' in namespace 'std' error message. It was obviously a C++ error but couldn't understand why the C++ library Xcode was…
bnduati
  • 601
  • 1
  • 8
  • 10
4
votes
1 answer

Error running 'Cedar' unit tests from command line

I'm using the cedar testing framework and trying to run the tests from command line. The build crashes with this error: Unresolved error Error Domain=NSCocoaErrorDomain Code=512 "The operation couldn’t be completed. (Cocoa error 512.)"…
AFraser
  • 996
  • 4
  • 13
  • 27
3
votes
1 answer

LoginViewController writing cedar specs

I would like to write test-cases for the login screen. I'm writing test cases for login action. The username and password should satisfy the minimum length 4. It should show alert view if the length is < 4 Want to write test cases for both cases <4…
Damodar
  • 707
  • 2
  • 10
  • 23
2
votes
1 answer

Setting up project that uses Cedar for tests, Objective-C Realm and is testing swift Realm models

I hope this question is seen and answered by someone from the Realm team I have a project that uses Cedar to write BDD style tests. I have a mixed project with Objective C and Swift files. Some of these swift files are for custom Realm models. I…
Sergey Katranuk
  • 1,162
  • 1
  • 13
  • 23
1
vote
0 answers

Cocoapod issues with swift/objc project and testting target

I'm working with a mostly OBJc project,Tests are done with Cedar. I've started including swift and am having issues with cocoapod frameworks in my test target Cocoapods version is 0.39.0 (upgrading to the beta gave me more issues so sticking with…
JDM
  • 883
  • 1
  • 8
  • 20
1
vote
0 answers

OHHTTPStubs with AFNetworking in Cedar

I am struggling to set up a simple stub of a network POST request. I have modeled as much as I can from the OHHTTPStubs docs and other resources online, but I think I must be missing something. I would like to see the stub called based on the…
Corbin
  • 152
  • 1
  • 10
1
vote
1 answer

Cedar - Checking that a method was called twice with different values

I'm trying to verify that a method gets called twice with specific values, but I can't seem to verify both calls, just the first. I have verified that the method is called twice and that the values are correct, but I'm not sure how to write the…
RileyE
  • 10,874
  • 13
  • 63
  • 106
1
vote
2 answers

Linker error with Cedar tests

To teach myself Objective C and Cocoa, I want to write a diff tool. I'm using the Cedar testing framework, and I can't for the life of me get my test bundle to build. XCode doesn't present me with any warnings until I hit 'run tests', when the…
Benjamin Hodgson
  • 42,952
  • 15
  • 108
  • 157
0
votes
0 answers

How to test http request block with cedar in IOS

I want to test a class named BookService with a method to get a list of book info. What should I do to coverage both success block and failure block ? Here is my method code: -(void)getRequestWithURL:(NSString *)urlStr withKey:(NSString *)keyWord…
陆飞鹏
  • 9
  • 1
0
votes
0 answers

Swift 3, Xcode 8- Test case project compilation errors

I have got a project from a company to develop where the original developers left. Project details: carthage for dependancy management Pivotal Cedar, Quick and Nimble for test case project The project was developed in Swift 2.0. I converted the…
shoan
  • 1,303
  • 15
  • 22
0
votes
0 answers

Pivotal Cedar Swift 3.0 compatibility

I have converted my app code from swift 2.0 to 3.0. I have Pivotal cedar framework in the app which I used for TDD. My app code is converted properly to swift 3.0, but not the test case code. Is Pivotal Cedar compatible with Swift 3.0? Kaustubh
shoan
  • 1,303
  • 15
  • 22
0
votes
1 answer

Testing the existence of a presentedViewController using Cedar

I am trying to test if a presented view controller exists when I have automated the tapping of a table row cell. When I attempt to test if the controller's presentedViewController is of a given type of class it always results to nil. I'm assuming…
PeqNP
  • 1,363
  • 15
  • 26
0
votes
2 answers

iOS testing controllers with Cedar

I'm trying to test a controller(s) with Cedar but can't really understand why it's not working. The controller never gets shown, viewDidLoad or viewDidAppear are never called. Is this something Cedar wasn't meant to do or just my…
Guu
  • 911
  • 1
  • 9
  • 14
0
votes
2 answers

how do I setup cedar for bdd testing of ios apps?

I'm trying to set up cedar and having difficulty getting it to work. I'm trying to follow the instructions on github. I'm using xcode 4.2. The first step I'm not sure about is this: "Create a Cocoa Touch "Application" target for your tests in your…
davidjnelson
  • 1,111
  • 12
  • 22