-1

is there any way to apply script or test cases in Objective C so that it will tell more about the application behavior and create some log automatically?

ekant
  • 177
  • 1
  • 1
  • 9
  • possible duplicate of [What is the best way to unit test Objective-C code?](http://stackoverflow.com/questions/33207/what-is-the-best-way-to-unit-test-objective-c-code) – John Riselvato Feb 19 '14 at 16:07

1 Answers1

1

Take a look at Kiwi, its great BDD unit testing.

https://github.com/allending/Kiwi


Taken from the Github Page

The idea behind Kiwi is to have tests that are more readable than what is possible with the bundled test framework.

Tests (or rather specs) are written in Objective-C and run within the comfort of Xcode to provide a test environment that is as unobtrusive and seamless as possible in terms of running tests and error reporting.

Specs look like this:

describe(@"Team", ^{
    context(@"when newly created", ^{
        it(@"should have a name", ^{
            id team = [Team team];
            [[team.name should] equal:@"Black Hawks"];
        });

        it(@"should have 11 players", ^{
            id team = [Team team];
            [[[team should] have:11] players];
        });
    });
});
Oliver Atkinson
  • 7,820
  • 31
  • 43