Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated test coverage #11

Closed
SteveFortune opened this issue Mar 10, 2014 · 5 comments
Closed

Automated test coverage #11

SteveFortune opened this issue Mar 10, 2014 · 5 comments
Milestone

Comments

@SteveFortune
Copy link
Member

We need some sort of automated coverage so that we can detect regressions caused by external PRs easily.

@SteveFortune
Copy link
Member Author

Need to determine how we are going to do automated test coverage. Maybe we could use a framework like KIF to run scenario tests on the Test App ?

We could also test the delegate logic using traditional unit tests and mocking the pan gesture recogniser.

@SteveFortune SteveFortune changed the title Test coverage Automated test coverage Apr 5, 2014
@SteveFortune
Copy link
Member Author

Can confirm that KIF supports Drag and Drop gestures, not sure how effective this will be. trying it out now.

@SteveFortune
Copy link
Member Author

See branch improvement-11-automated-test-coverage for progress. I am starting to implemented some integration tests for the TestApp.

SteveFortune added a commit that referenced this issue Apr 5, 2014
SteveFortune added a commit that referenced this issue Apr 5, 2014
… navigation methods into 1 method that accepts the example case number and chooses the case's controller's tab button accessibillity label for from a config arry
SteveFortune added a commit that referenced this issue Apr 5, 2014
SteveFortune added a commit that referenced this issue Apr 5, 2014
SteveFortune added a commit that referenced this issue Jun 13, 2014
@SteveFortune
Copy link
Member Author

UPDATE branch improvement-11-automated-test-coverage no longer represents the progress of the issue. I have decided to refactor the codebase for #28 to make it more unit test-able instead of covering the framework indirectly via functional test cases for the Example app. This branch is still in the repo incase we want to reference it in the future.

SteveFortune added a commit that referenced this issue Sep 14, 2014
SteveFortune added a commit that referenced this issue Sep 14, 2014
…tinued implementing the new handling logic
@SteveFortune SteveFortune added this to the 2.0.0 milestone Sep 18, 2014
SteveFortune added a commit that referenced this issue Sep 19, 2014
…aggable if they don't have a drag data source
SteveFortune added a commit that referenced this issue Sep 19, 2014
SteveFortune added a commit that referenced this issue Sep 19, 2014
…d outside of any of the arena's collections
SteveFortune added a commit that referenced this issue Sep 19, 2014
…mport statement from the gesture coordinator spec
SteveFortune added a commit that referenced this issue Sep 19, 2014
SteveFortune added a commit that referenced this issue Nov 15, 2014
…re because of the assignment of the given array literal.

I'd assumed when calling andReturn, the value passed was retained / copied / managed by the framework but it seems that it isn't reliable held in memory. There is no bad access for example, if I declare the array as a variable like so:

    NSArray* recognizers = @[panGestureRecognizer]
    OCMStub([superview gestureRecognizers]).andReturn(recognizers);

because its autoreleased at the end of the block. For now I've opted just to add gesture recognizers via the defined interface in UIView - seems much simpler
SteveFortune added a commit that referenced this issue Nov 15, 2014
…ess interdependant

There are multiple nested describe blocks, each with beforeEach blocks setting up an configuring additional mock objects. Its now at the point where these tests are no longer clear and hard to maintain. Refactoring
SteveFortune added a commit that referenced this issue Nov 15, 2014
SteveFortune added a commit that referenced this issue Nov 15, 2014
…le and less dependent of implicit beforEach setup
SteveFortune added a commit that referenced this issue Nov 15, 2014
…ed how to change the design going forward
SteveFortune added a commit that referenced this issue Nov 15, 2014
…ns if the dragDataSource is nil because the language defines this behaviour for us (returns NO for BOOl methods). Its redundant to test this
SteveFortune added a commit that referenced this issue Nov 15, 2014
SteveFortune added a commit that referenced this issue Nov 16, 2014
SteveFortune added a commit that referenced this issue Nov 16, 2014
According the OCMock docs, protocol mocks work in the same way as class mocks and therefore have the same limitations when it comes to mocking the same protcol multiple times at once. We've worked around that my partially mocking an instance of a class that implements that protocol. I'm not 100% sure whether partially mocking 2 instances of the same class as once has the same limitations (the docs seems a bit ambiguous).

Also removed unnecessary property in the I3TableView
SteveFortune added a commit that referenced this issue Nov 16, 2014
SteveFortune added a commit that referenced this issue Nov 16, 2014
…ds and refactored rearrange tests to pass. Note that now, the collection for the 'stopping a valid drop' tests is set up with a draggingItemView
SteveFortune added a commit that referenced this issue Nov 16, 2014
SteveFortune added a commit that referenced this issue Nov 16, 2014
SteveFortune added a commit that referenced this issue Nov 16, 2014
…scribe block again.

This time we've ensured that only mocked dependencies that are absolutely required across all of the drag / drop tests are
set up in the top level describe block. Before, there were all sorts of dependencies that were stubbed, restubbed, overwritten
and dependent on the class implementation. Now we have cleaner subsets of drag / drop tests
SteveFortune added a commit that referenced this issue Nov 16, 2014
SteveFortune added a commit that referenced this issue Nov 16, 2014
SteveFortune added a commit that referenced this issue Nov 16, 2014
…plementations are delcared in .m files instead of all in the .h file. Moved all drag data source fixtures into 1 pair of .h / .m files
SteveFortune added a commit that referenced this issue Nov 16, 2014
…ses and implemented tests for the renderer to ensure that on rearrange, the exchanging clone view clones the exchange view immediately
SteveFortune added a commit that referenced this issue Nov 16, 2014
… Now to build some working examples as functional / acceptance tests
SteveFortune added a commit that referenced this issue Nov 16, 2014
…h the example case. Also see comments of #28 for a recently discovered limitation
@SteveFortune
Copy link
Member Author

Closing this issue now. All new unit tests for the first iteration of BetweenKit pass. All further production code should be covered with tests. At the moment I'm trying to force myself to adopt TDD so BetweenKit classes should have unit tests. We also need some functional examples (maybe next phase?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant