Git Product home page Git Product logo

kif's People

Contributors

aodawa avatar asafkorem avatar asarazan avatar blakewatters avatar bnickel avatar brightredchilli avatar brunomazzo avatar dave-perry avatar deepakkumarsharma-tudip avatar dostrander avatar efirestone avatar fitzmaz avatar harleyjcooper avatar hiltonc avatar jmkk avatar joemasilotti avatar justinseanmartin avatar kenji21 avatar ksuther avatar maryamaffinityclick avatar mikelupo avatar mthole avatar mwwhite avatar pbartolome avatar phatmann avatar plu avatar puls avatar steipete avatar zachmargolis avatar zradke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kif's Issues

Clearly separate Tests from Production Code (improved setup)

Hi,

I better liked to create a IntegrationTestAppDelegate that inherits from my apps delegate and add looks somewhat like this instead of putting that stuff into my production codes app delegate:

#import "IntegrationTestsAppDelegate.h"
#import "MyTestController.h"

@implementation IntegrationTestsAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [super application:application didFinishLaunchingWithOptions:launchOptions];

    [[MyTestController sharedInstance] startTestingWithCompletionBlock:^{
        // Exit after the tests complete so that CI knows we're done
        exit([[MyTestController sharedInstance] failureCount]);
    }]; 

    return YES;
}

@end

Doing it this way has the following advantages:

  • Clean separation of the actual apps target and the integration tests target
  • No need for the additional Preprocessor Macro RUN_KIF_TESTS

Disadvantages:

  • You also need to implement a separate main for the Integration Tests that could look like this:
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "IntegrationTestsAppDelegate.h"

int main(int argc, char *argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([IntegrationTestsAppDelegate class]));
    }
}

I personally like this variant better for the sake of the complete separation between tests and production code.

What do you think?

timeout check doesn't allow for debug/breakpoints

I'll have a think about this, but fundamentally if you want to step through a test to inspect stuff in the debugger (useful for both finding issues and also exploring your objects while building tests) the timeout check has a problem if you stop on a breakpoint for more than 10 seconds!

Eg. I put a breakpoint in _performTestStep: to iterate a step at a time.

Ideally you can introspect if code has resumed from a breakpoint and deduct from timer, but I'm not sure if that's possible with either gdb or lldb. Or perhaps there's a gdb injection we can do to reset counter or something.

Example project "Testable" does not compile

A fresh clone of KIF and latest stable Xcode 4 (4A2002a). Building target Integration tests with iPhone Simulator set gives the following error:

Ld "build/Debug-iphonesimulator/Testable (Integration Tests).app/Testable (Integration Tests)" normal i386
    cd /Users/emil/Dropbox/Developer/appr/iphone/KIF/Documentation/Examples/Testable
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/emil/Dropbox/Developer/appr/iphone/KIF/Documentation/Examples/Testable/build/Debug-iphonesimulator -L/Users/emil/Dropbox/Developer/appr/iphone/KIF/Documentation/Examples/Testable -F/Users/emil/Dropbox/Developer/appr/iphone/KIF/Documentation/Examples/Testable/build/Debug-iphonesimulator -filelist "/Users/emil/Dropbox/Developer/appr/iphone/KIF/Documentation/Examples/Testable/build/Testable.build/Debug-iphonesimulator/Integration Tests.build/Objects-normal/i386/Testable (Integration Tests).LinkFileList" -mmacosx-version-min=10.6 -ObjC -Xlinker -objc_abi_version -Xlinker 2 -lKIF -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/emil/Dropbox/Developer/appr/iphone/KIF/Documentation/Examples/Testable/build/Debug-iphonesimulator/Testable (Integration Tests).app/Testable (Integration Tests)"

ld: library not found for -lKIF
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

Also tried opening Frameworks/KIF.xcodeproj and building for simulator first, but no difference.

Cannot find/tap table view delete "widget"

I'm attempting to tap the red circle with the line through it that is part of the delete table row style. The accessibility inspector clearly shows it to be an element labeled "Delete", but KIF is unable to find it. Am i missing something?

picking photo fails (image-specific, timing-specific)

This issue is (unfortunately) not consistently reproducible. I have several screens in an application that are completely identical, and it will reproduce for some and not for others. Perhaps it is a race condition or is timing-related. I am not sure that it can be fixed without a reproducing test case, but I wanted to document it in case others ran into it.

I placed this picture into my camera roll by using "Save Image" in Safari.

Then I would show the media picker and call + (NSArray *)stepsToChoosePhotoInAlbum:(NSString *)albumName atRow:(NSInteger)row column:(NSInteger)column;.

My log would show:

[DEBUG] 2012-01-10 01:42:06.918 appKIF[95955:15503] PASS (0.01s): Select the "Saved Photos" photo album

[DEBUG] 2012-01-10 01:42:07.436 appKIF[95955:15503] PASS (0.52s): Wait for media picker view controller to be pushed.

At this point, the program would terminate. No crash log would be written, and nothing is shown in the console. ios-sim shows an exit code of 0.

At first, my suspicion was that something odd was going on in the hit test where the thumbnail is tapped. Being essentially donut-shaped, it's possible that the line is doing a hit test back to the view behind the photo picker.

However, a white image fails to show the same behavior.

I have uploaded a video in case it sheds any light on the matter. A frame-by-frame analysis of the exit is most peculiar. It appears that the status bar unloads first, followed by a return to Springboard, followed by a slide gesture, followed by Springboard getting stuck in-between two home screens. There is nothing either in my application or in its test suite that would obviously produce such behavior. The steps that follow selecting the photo are waiting for the appearance of views, so the test cannot be progressing silently farther.

After replacing that picture with an arbitrary photo, the issue goes away.

This is one of the strangest bugs I have ever seen.

Crash in KIFTestStep

I followed the instructions in the Readme to setup KIF in my project. When I try to run the target with a simple test in iOS 4.3 Simulator, the App crashes at line 70 of KIFTestStep:

step.executionBlock = executionBlock;

Any ideas what may cause this problem?

UITouch Additions not available in iOS6 beta

Instance variables are not exposed in iOS 6 for UITouch

// Create a fake tap touch
_tapCount = 1;
_locationInWindow = point;
_previousLocationInWindow = _locationInWindow;

UIView *hitTestView = [window hitTest:_locationInWindow withEvent:nil];

_window = [window retain];
_view = [hitTestView retain];
_gestureView = [hitTestView retain];
_phase = UITouchPhaseBegan;
_touchFlags._firstTouchForView = 1;
_touchFlags._isTap = 1;
_timestamp = [NSDate timeIntervalSinceReferenceDate];

"Use Current Location" AlertView dismissal

I read the discussion you had with gorbster in this post
#52

I've tried using Gorbsters post but I'm still determined to get it to work via stepToTapViewWithAccessibilityLabel.

For whatever reason it can't find the OK button on the alertview when CoreLocation is used.

Can we take on-demand screenshots?

According to your site, "Set KIF_SCREENSHOTS to the full path to a folder on your computer to have KIF output a screenshot of your app as it appears when any given step fails".

However, sometimes we want to take on-demand screenshots in the tests. Can we do this in KIF?

Thanks.

How to press the "Go/Done/Return/Search" button on UIKeyboard

Maybe I'm just daft and missing something-- but what is the preferred way to finalize input into a textfield after having entered text?

It looks like the code will attempt to interpret \n or \r as "Return" and do the right thing, but very often the button has some other text, which would cause this to fail.

subviewWithClassNameOrSuperClassNamePrefix is marked as deprecated

I don't understand what is the reason why subviewWithClassNameOrSuperClassNamePrefix is marked as deprecated. Under the covers it calls subviewsWithClassNameOrSuperClassNamePrefix, which returns an array rather than the first instance of a designated class. It simply puts a nice convenient wrapper around the function to get the first element in the array.

Is it because the keepers of the code, simply don't want to upkeep the subviewWithClassNameOrSuperClassNamePrefix function?

There's plenty of functions that behave in a similar manner in the Objective C library. One example off the top of my head is for functions indexPathForSelectedRow, and indexPathsForSelectedRows for UITableView's.

Crash on [elementStack addObject:subelement];

I have a step that taps Cancel button on UISearchBar right after a step that taps the clear button has been tapped. KIF looks for the given view in the

[UIView(KIFAdditions) accessibilityElementMatchingBlock:]

method.
Line 160 is the place where exception is thrown - seems that

UIAccessibilityElement *subelement = [element accessibilityElementAtIndex:accessibilityElementIndex];

method returns nil objects, which is then inserted into an array - this obviously causes a crash. Adding a simple check if the object is not nil resolves the issue.

if (subelement) {
[elementStack addObject:subelement];
}

Can we take on-demand screenshots?

According to your site, "Set KIF_SCREENSHOTS to the full path to a folder on your computer to have KIF output a screenshot of your app as it appears when any given step fails".

However, sometimes we want to take on-demand screenshots in the tests. Can we do this in KIF?

Thanks.

Can we do verification in other ways besides checking the UI element

Since KIF tests are written in objc and running on the device, can we do verification in other ways besides checking the UI element? For example, when click a search button, the app will send a request to the server and get some response. Can we check the response directly instead of checking if the response is showing on the UI?

Thanks.

Unable to tap delete confirmation button is table view.

I have the following steps defined in a scenario testing a table view:

    [scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Edit" traits:UIAccessibilityTraitButton]];
    [scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Delete McDonalds" traits:UIAccessibilityTraitButton]];
    [scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Confirm Deletion for McDonalds" traits:UIAccessibilityTraitButton]];

The first two steps will pass without issue (assuming the table view is properly configured). The problem is the third step. It cannot find the confirmation deletion control (these are all standard iOS controls, no customization). Accessibility is enabled for the item, but after digging through the code, the problem seems to be that the hitTest:withEvent: method for the coordinates will always return a UIViewControllerWrapperView object rather than the button control itself.

It's important to note that it can find the button by accessibility label. The proper UIAccessibilityElement is found. But when it tries to determine if it isTappable, it will perform a hitTest: on the window and always return that wrapper view class instead of the button control.

I've chocked it up to probably being some security protection on iOS's part so that you can't automate the deletion of items, but perhaps y'all can dig deeper and figure out what is really going on. Or perhaps think of a workaround by overriding some private API's.

Supported iOS versions?

Hi,

When I run my tests in iOS 4.2 and earlier, I get crashes due to a deallocated UINavigationItem receiving a message:

-[UINavigationItem safeValueForKey:]: message sent to deallocated instance 0x11afab80

The stack trace is:

 0 CoreFoundation ___forwarding___
 1 CoreFoundation _CF_forwarding_prep_0
 2 UIKit -[UINavigationItemButtonViewAccessibility(SafeCategory) accessibilityTraits]
 3 UIAccessibility -[NSObject(NSObjectAccessibility) accessibilityAttributeValue:]
 4 UIAccessibility _copyAttributeValueCallback
 5 AXRuntime _AXXMIGCopyAttributeValue
 6 AXRuntime _XCopyAttributeValue
 7 AXRuntime mshMIGPerform
 8 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
 9 CoreFoundation __CFRunLoopDoSource1
10 CoreFoundation __CFRunLoopRun
11 CoreFoundation CFRunLoopRunSpecific
12 CoreFoundation CFRunLoopRunInMode
13 GraphicsServices GSEventRunModal
14 GraphicsServices GSEventRun
15 UIKit UIApplicationMain
16 MyApp Functional Tests main [myapp]/main.m:14
17 MyApp Functional Tests start

in iOS 4.3 and later, this doesn't happen. I believe, because this is happening in the accessibility code, that it's coming from KIF - though I'm happy to be corrected. My question is: what versions is KIF supposed to support? If it's 4.3 and later, then could you update the front page to say so?

UIAlertView dismissal in non-portrait orientations

I'm running into issues with UIAlertViews not being dismissible in device orientations other than UIDeviceOrientationPortrait. If the device is in UIDeviceOrientationPortrait, I can easily dismiss the alert with:

[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Dismiss"];

However, this doesn't work for any other orientation, including UIDeviceOrientationPortraitUpsideDown.

The problem seems to be that _UIAlertOverlayWindow always considers itself in regular portrait orientation.

So the -convertRect:toView: call on the UIThreePartButton's window in +stepToTapViewWithAccessibilityLabel:value:traits: returns a frame with bogus coordinates and an inverted size, which is never a tappable point.

I've got a workaround for this by ensuring that the -convertRect:toView: happens on an application window with a windowLevel of UIWindowLevelNormal, i.e. always doing the -convertRect:toView: in the application's "main" window. But I wanted to see if anyone else could confirm this issue.

I have a sample project at http://dl.dropbox.com/u/33175/LandscapeAlert-KIF.zip - if you run the project in different simulator orientations, you should see the issue.

-Brian

write tests using macruby

Just wondering whether you guys had thought about making the test suite compatible with macruby or how hard that would be?

Support for fuzzy matching (using Hamcrest)

How open would you be to a pull request that added Hamcrest support?

By way of example, I often only want to specify the important bits of my UI, not necessarily all of the details. If I'm checking a failed login, and I display the message "Could not sign in. Please check username and password.", I'd be happy to just check for the first part.

What I really want is:

[KIFTestStep stepToWaitForViewWithAccessibilityLabel:@"Message" value:containsString(@"Could not sign in") traits:UIAccessibilityTraitStaticText]

I'd be happy to work on this.

stepToTapScreenAtPoint has no effect.

Hi,

I am have placed the button at 141,92 coordinates and trying to tap at the button using stepToTapScreenAtPoint method. When i ran the code it does not perform tap/click at the button. The log says that it tapped at the 141,92 but the button has no effect on the simulator.

I know the KIF framework works with the accessibility tags, how to pass the co-ordinate values to the methods. It would be good if someone shares the design document on the KIF framework and its functionality

If required I can share the test app to check this issue.

Autocomplete not working for KIF-related methods

In Xcode 4, autocomplete seems to fail frequently with KIF-related methods. As far as I can tell, I've set up my project exactly as described in the README†. Syntax coloring works just fine, and tests compile and run as expected. I simply can't get autocomplete to recognize methods from the KIF headers. (KIF class names autocomplete just fine.)

I've found this to be the case both in my own project (set up per the README with a successfully running test), and in the "Testable" sample project.

Here's a specific example. My KIFTestController subclass header, EDTestController.h:

#import <Foundation/Foundation.h>
#import "KIFTestController.h"

@interface EDTestController : KIFTestController {
}

@end

EDTestController.m

#import "EDTestController.h"
#import "KIFTestScenario+EDAdditions.h"

@implementation EDTestController

- (void)initializeScenarios;
{
    [self addScenario:[KIFTestScenario scenarioToTestKIFIsWorking]]; // Syntax coloring & functionality works fine

    [self addSc  // <<< Hitting 'esc' here shows "No completions"
}

@end

† The README seems to offer conflicting instructions regarding Header Search Paths...could this be the source of the problem? Specifically, the text says, "To do this, add the KIF directory to the "Header Search Paths" build setting. Start by selecting the "Build Settings" tab of the project settings,..." which seems to imply that the project should be selected, not the Integration Tests target. Meanwhile, the screenshot shows the Integration Tests target selected, rather than the Testable project. I followed the screenshot.

Regular expression for "label with"

I think it would be helpful if stepToTapViewWithAccessibilityLabel used a regular expression rather than an exact match. That way it could account for dynamic labels that have dynamic values.

For instance.... stepToTapViewWithAccessibilityLabel:"\price: $[0-9]*"

Buttons and cells no longer tappable after a device build including KIF library

My team is currently using a home built framework to run iOS automation but we were having trouble running our automation on the device. We came across the KIF framework and it has resolved the problem as our automation is running on the device however, certain buttons and cells are no longer tappable when KIF library is included in the build path. We did a build w/o KIF library and a device build with the KIF library and all the buttons are tappable w/0 KIF library. Any suggestions on why this is happening or how to fix it?

i386 undefined symbols

I am not sure what is going on but I have the KIF framework installed with CocoaPods. When I build the example in the README I receive this error:

Undefined symbols for architecture i386:
  "_CGPointZero", referenced from:
      +[KIFTestStep _displacementForSwipingInDirection:] in libPods-ViaResponseTests.a(KIFTestStep.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any ideas why this is happening? I tried adding the quartzcore.framework even though I was pretty sure this wouldn't fix it and as I suspected it didn't.

Unable to get tests to run.

Hi! I have setup KIF and test scenarios/steps. However, as I run it,
it seems to have started the test, but doesn't really run.

I got message like

2012-01-05 12:17:19.620 Automation[51944:6a03] BEGIN KIF TEST RUN: 1
scenarios
2012-01-05 12:17:19.620 Automation[51944:6a03]

2012-01-05 12:17:19.621 Automation[51944:6a03]

2012-01-05 12:17:19.621 Automation[51944:6a03] BEGIN SCENARIO 1/1 (3
steps)
2012-01-05 12:17:19.622 Automation[51944:6a03] First Test
2012-01-05 12:17:19.622 Automation[51944:6a03]

And then nothing after that. Doesn't report success/failure or test
ends. And simulator doesn't show any action. Setting debugging break
point seems to suggests that it gets to the this point in
KIFTestController

  • (void)_scheduleCurrentTestStep;
    {
    [self performSelector:@selector(_delayedScheduleCurrentTestStep)
    withObject:nil afterDelay:0.01f];

}

But after that, it just finishes. I set a break point at
delayedScheduleCurrentTestStep method and it looks like it never gets
invoked. If I try to call [self _performTestStep:self.currentStep]
directly then it will crash due to a weblock issue.

Any clue on what I missed? Any help is appreciated. Thanks.

Steps not being initialized for skipped scenarios

In our KIF tests, we make heavy use of reusing scenarios as a building block for another scenario. For example, we might have a scenario scenarioHomeScreenShowsLoginScreenWhenLoginButtonPressed. Our tests of the login functionality, e.g. scenarioLoginScreenShowsRegisterScreenWhenRegisterButtonPressed would then call this method and add some more steps to it. However, say we wanted to only run the tests for the login screen, so we'd set KIF_SCENARIO_FILTER to something like "Test that the login screen". However, because skippedByFilter for scenarioHomeScreenShowsLoginScreenWhenButtonPressed is true, its _initializeStepsIfNeeded method doesn't bother initializing its steps array, so when we try to add steps to scenarioHomeScreenShowsLoginScreenWhenLoginButtonPressed, it ends up not working properly - addStep does nothing, and addStepsFromArray blows up. It seems to me like _initializeStepsIfNeeded shouldn't be doing this check of skippedByFilter, but it might just be that we're not using KIF in the way it was intended. It would be good to hear someone's thoughts.

(tl;dr - Using a skipped scenario inside a non-skipped scenario doesn't seem to work.)

stepToTapScreenAtPoint has no effect.

Hi,

I am have placed the button at 141,92 coordinates and trying to tap at the button using stepToTapScreenAtPoint method. When i ran the code it does not perform tap/click at the button. The log says that it tapped at the 141,92 but the button has no effect on the simulator.

I know the KIF framework works with the accessibility tags, how to pass the co-ordinate values to the methods. It would be good if someone shares the design document on the KIF framework and its functionality

If required I can share the test app to check this issue.

Documentation should recommend applicationDidBecomeActive

Due to [REDACTED] (rhymes with "hoary chord"), a window may not be available on didFinishLaunchingWithOptions, the recommended injection point for KIF. As a result, the _isAccessibilityInspectorEnabled check incorrectly reports that the accessibility inspector is not enabled, even if it is.

Proposed resolution:

  1. Add an assertion in _isAccessibilityInspectorEnabled (or earlier in the workflow) to check for the presence of a valid window and report a reasonable error message
  2. Update the documentation to reflect a recommended injection point of applicationDidBecomeActive

Landscape orientation + stepToTapScreenAtPoint

Hi,

first of all: great library, makes testing really fun!

Unfortunately, the "stepToTapScreenAtPoint" doesn't work when used in landscape mode. I've got an iPad app and I would like to test landscape behaviour with the stepToTapScreenAtPoint-functionality, but it seems like the UIWindow-hittest always calculates in portrait mode, so the desired view is never found...

I've got no idea how the solution could look like, unfortunately...

Continuous Integration (JENKINS)

I am having trouble using Waxsim to launch KIF tests from Jenkins. I have written a script which compiles my tests and uses waxsim to launch the simulator. The script works great from my workstation but fails to launch the tests when executed from a Jenkins job. I get the following error in the waxsim output:

*Session failed to start. Simulator session timed out. *

Here is a post to the google group from someone having the same problem:
https://groups.google.com/group/kif-framework/browse_thread/thread/26d1b257c6aa30b6

The reason I am opening this issue is because the 'Continuous Integration' section in your README.md implies that you have this working in some sort of continuous integration system. I am assuming it has something to do with the Jenkins user the process is running under. I am hoping you are using Jenkins as well and can provide some hints.

KIF won't compile under iOS 6

I am getting a lot of compile errors in UITouch-KIFAdditions.m
This started happening once I've updated to the lastest version of XCode.

Any pointers on how to fix this?

Tappable elements broken in iOS5

Given the NDA, there are obvious limits to the detail that we can discuss this here, but in short, I'm having trouble running my scenarios against the iOS5 simulator which work fine in iOS4.

All of my button taps are failing with:

Error Domain=KIFTest Code=0 "The element with accessibility label Sign In is not tappable" UserInfo=0xdf27f20 {NSLocalizedDescription=The element with accessibility label Sign In is not tappable}

Looking at the code I can't see anything obvious.

The reason I'd like to use the iOS5 simulator is that it supports StoreKit and I'm trying to test some of my in-app purchase scenarios.

False-positive taps on UITableView when scrollEnabled is NO

Given a UITableView with scrollEnabled == NO, scenarios that try to create more than stepToTapViewWithAccessibilityLabel will be unsuccessful after the first test step. The second stepToTapViewWithAccessibilityLabel will be recorded as a PASS in the logs, but the row will not have actually been 'tapped.'

I've uploaded a simple project that illustrates this test case: https://github.com/sethew/TestForKIF

It's unclear why setting scrollEnabled = NO should matter, but it may be due to how the touch events KIF creates are handled by UIKit.

Install instructions don't work for legacy build location

If your default preference under Locations -> Derived Data -> Advanced is to use the Legacy build location (which places the build in the project directory), the published instructions don't allow you to actually compile the integration test project without receiving a linker error.

Proposed fix is to mention this in the documentation. I changed my Derived Data build location to "Unique" and that resolved the issue. This may be one of the reasons why so many people are encountering this issue: #44

support for replacing/extending existing logging mechanism

Wondering if you guys are working on supporting an easy mechanism for others to log the results of a test run in their own format. The main use case would be to output the test results in a junit xml format and then your CI environment (ie hudson,jenkins) can easily pick up the junit xml and report your results nicely within hudson.

I can put together an initial implementation of such a feature but I'm not a strong objective C developer so I'm going to do the easiest thing which is to allow others to override the following methods from the KIFTestController:

  • (NSFileHandle *)_logFileHandleForWriting;
  • (void)_logTestingDidStart;
  • (void)_logTestingDidFinish;
  • (void)_logDidStartScenario:(KIFTestScenario *)scenario;
  • (void)_logDidSkipScenario:(KIFTestScenario *)scenario;
  • (void)_logDidSkipAddingScenarioGenerator:(NSString *)selectorString;
  • (void)_logDidFinishScenario:(KIFTestScenario *)scenario duration:(NSTimeInterval)duration
  • (void)_logDidFailStep:(KIFTestStep *)step duration:(NSTimeInterval)duration error:(NSError *)error;
  • (void)_logDidPassStep:(KIFTestStep *)step duration:(NSTimeInterval)duration;

and that way you can easily create output the results in whatever format you want while still calling the super.xxx method so that things log to the console as before.

I can also extract those methods in to their own class KIFTestReporter and then have the base implementation which just logs to the console and in the KIFTestController allow the user to register additional reporters that respect the same interface.

Let me know what you think is the best approach, before I fork and start hacking

Test drag a view

KIF test can't test drag a view left/right or up/down.
I used method (void)dragFromPoint:(CGPoint)startPoint toPoint:(CGPoint)endPoint; to create new step but it 's not possible.

Testing Facebook Connect Button

I'm not sure there is a way to do this but in order to test my login procedure, I need Facebook Connect for authentication. The problem is that FB Connect bounces the user through Safari on the simulator (or the Facebook app on the device) and once this happens, it doesn't look like there is a way for KIF to automate button presses in the app that the user gets bounced to.

Is there any way to make this work? My fallback is to hardcode my FB access token for testing purposes but this of course leaves one big area of my app untested: login/authentication.

find an element by the structrue

Can we find an element by the structure instead of the label?
The structure is like:
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[0]

Since not every element has its label.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.