Can anyone suggest an efficient strategy in unit testing smartfoxserver extensions? I'm interested in the latest 2x version.
Related
I have been involved in doing web automation and Android automation testing. Currently we are looking for any iPhone functional testing tool which will help us to reduce the number of hours for regression testing. We are looking for an open source tool like Selenium or Robotium, where test cases are easier to write and implement.
If you wait until iOS 5 is released, I am sure you will find a component in Instruments that will do just what you want.
Non open source option could be SeeTest from experitest. It support both Android and iOS.
These days there are a number of projects to automate testing for native applications, including iphones. These two are the ones i see first on github searches.
https://github.com/TestingWithFrank/Frank
https://github.com/ios-driver/ios-driver
I remember there must be more but i do not recall their names
I'm planning to write couple applications for iPhone and wonder if there are any Unit Testing and Code Coverage Frameworks for Objective-C?
For unit testing iPhone apps there is OCTest or Googles iPhoneUnitTesting
For a mocking framework you can use OCMock. Here is the guide to getting it to work with the iPhone.
GCov can be used for code coverage.
Does anyone know of any xUnit testing frameworks for the Mac OS, more specifically for the iPhone OS? I've seen a couple online, google-toolbox-for-mac & objcUnit, but they don't seem to have had any development on them for a long time.
Are there any Objective-C developers out there that perform unit testing and if you do what tools do you use?
gh-unit is a great framework and is actively maintained. it has a GUI.
ocunit is bundled with Xcode.
XcodeUnitTestGUI which is fairly immature, but works and provides a GUI for ocunit based tests (disclaimer -- this is my project).
OCUnit (shipped with Xcode) is a full xUnit-style testing framework that is integrated with Xcode (failures show up as linked build errors) and works on the iPhone and OS X. The Google Toolbox for Mac provides additional functionality (including UI testing and gcov support) on top of OCUnit. I'm not sure where you got the idea that it's not under active development. The last change was only 4 days ago (at the time of this post). For a mock framework, check out OCMock, an OCUnit-integrated mocking library (you may find that Objective-C's dynamic nature makes unit testing in general and mocking in particular much easier than expected by those accustomed to C/C++/C#/Java).
Believe it or not, Objective-C developers do do unit testing.
UnitTest++ is a very light weight, but powerful unit testing framework that I like a lot. It's site is: http://unittest-cpp.sourceforge.net/.
I've written a blog article about integrating it into an iPhone development environment, for more information you can see here: http://acornheroes.com/?p=152
Hope this helps.
I agree that OCUnit is a great xUnit tool. Integration with Xcode is solid, and it works well with OCMock. It's also hard to overstate the value of Apple being committed to the code — there is certainly room for improvement, but it's solid and still maintained. Xcode also integrates pretty nicely with gcov, a GNU tool for instrumenting code coverage. A few links...
http://cocoaheads.byu.edu/resources/unit-testing-cocoa
http://cocoaheads.byu.edu/resources/unit-testing-and-code-coverage-xcode
http://chanson.livejournal.com/182472.html
To back up Barry, yes, lots of Objective-C developers do unit testing, including inside Apple. (Just ask #bbum about CoreData unit tests...) For examples of what you can do, feel free to raid my side project:
http://dysart.cs.byu.edu/CHDataStructures/ (API documentation)
http://dysart.cs.byu.edu/CHDataStructures/coverage/source/ (coverage report)
http://dysart.cs.byu.edu/chsvn/CHDataStructures/ (browse Subversion)
Do I need special libraries for this, or can I just create a huge class that trys to instantiate every object of my project and test all the methods in there? How's that done in theory?
Googling "unit testing iPhone" gives this excellent link as the first hit:
To sum up, Google Toolbox provides a good infrastructure for unit testing on iPhone.
If you're targeting iPhone OS 2.2 or later, you can use the version of OCUnit that's bundled with Xcode. There's a good blog article by Kailoa Kadano about this on Mobile Orchard. OCUnit is a unit testing framework that's similar to the well known JUnit framework from the Java world.
You can always do "poor man's unit testing" by creating a simple test program that uses the assert() macro in the C header assert.h or the NSAssert() macros in Cocoa/Cocoa-touch. That's not a horrible way to get started doing unit testing, but I'd really recommend looking at OCUnit or another unit testing framework eventually.
Which ever way you structure your unit tests, you'll want to create a separate target in your Xcode project to build and run the tests.
GHUnit is awesome.
I really love Kiwi: BDD (RSpec) for iPhone & iPad.
For a comprehensive answer, check out
iOS Tests/Specs TDD/BDD and Integration & Acceptance Testing.
I just sat in on a seminar about developing apps for the iPhone. The speaker told me that there is NOTHING available for writing unit tests or functional tests for your iPhone software.
Is this true? Is there really no testing story for the iPhone as of now?
Yes you can do unit testing, I hope the seminar didn't cost too much.
Do OCUnit and OCMock work on the iPhone SDK?
Not true. Before SDK 2.2 there wasn't an official Apple sanctionned unit testing support, but they've since added OCUnit support, which is documented on the Apple website.
Do OCUnit and OCMock work on the iPhone SDK?
Google provides a great toolkit (Google Toolbox for Mac)
http://code.google.com/p/google-toolbox-for-mac/wiki/iPhoneUnitTesting
I think Google's is a bit more complete because you can also do some functionnal user interface tests.
Hope that helps.
Others have pointed out the available options, but I'll point out that even if there weren't any unit-testing frameworks available, there is nothing preventing you from rolling your own. Unit test frameworks aren't that complicated, so lack of one is no excuse.
No, this is not true. As of iPhone SDK 2.2, OCUnit works fine. In addition there are other open-source unit test libraries you can use with the iPhone.
http://developer.apple.com/tools/unittest.html
Sen:te (the creator of the testing framework included with Xcode) explains how to use OCUnit with an iPhone project: http://www.sente.ch/s/?p=535&lang=en.
Gorilla Logic has just open sourced FoneMonkey, a true record/playback functional testing tool for the iPhone that works with OCUnit.
You can learn more at http://www.gorillalogic.com/fonemonkey.