Comments (6)
Wat?
Why do you mention me?!?!?!
Why don't you mention @octodog for example?!
31.01.12 15:03, letsdev пишет:
Hi,
I found it much easier to create a IntegrationTestAppDelegate that inherits from my apps delegate and add something like this:
#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;
}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 clearly like this variant better for the sake of the complete separation between tests and production code.
What do you think?
Reply to this email directly or view it on GitHub:
#109
from kif.
Wat?
31.01.12 15:05, implementation пишет:
Wat?
Why do you mention me?!?!?!
Why don't you mention @octodog for example?!31.01.12 15:03, letsdev пишет:
Hi,
I found it much easier to create a IntegrationTestAppDelegate that inherits from my apps delegate and add something like this:
#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;
}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 clearly like this variant better for the sake of the complete separation between tests and production code.
What do you think?
Reply to this email directly or view it on GitHub:
#109
Reply to this email directly or view it on GitHub:
#109 (comment)
from kif.
Wat?! I never intended to mention one of you guys. All the @ things in my post are just source code.
Very nice user name :D So you always get a mail when ANYONE on github posts objective-c code in an issue? Great :D
from kif.
It was a joke ;)
Use triple backticks to highlight code properly.
Like this
31.01.12 15:27, letsdev пишет:
Wat?! I never mentioned one of you guys. No idea what you're talking bout. All the @ things in my post are just source code.
Reply to this email directly or view it on GitHub:
#109 (comment)
from kif.
ok: you just get messages if a stupid github noob like me posts objective-c code :)
from kif.
That's a clever solution. I can't believe I never saw it before.
Anyway, this issue is out of date due to KIF not using this runner approach anymore. Closing.
from kif.
Related Issues (20)
- KIF types each character twice HOT 1
- tapView() not working on SwiftUI views in Xcode 12 with KIF 3.8.6 HOT 3
- Xcode 13.4: NSFunctionExpression with selector is forbidden. HOT 11
- KIF-based UI tests crashes in Xcode 13.4 HOT 2
- Question: Does KIF require a mac? HOT 5
- Xcode 14 "Failed to select from Picker" HOT 6
- iOS16 press on keyboard doesn't work HOT 5
- KIF causes exception on using WKWebView HOT 2
- KIF with SwiftUI element HOT 2
- Tappable SwiftUI view that is not tapped by KIF HOT 3
- How to tap on system photo picker #help-wanted HOT 1
- Problems with async test HOT 6
- Way to use Quick6 Nimble11 with KIF UI testing framework
- Screen edge pan gesture is not recognized HOT 8
- [Question/Help] How to write E2E UI Integrations tests? HOT 2
- Is KIF real rendering? HOT 2
- iOS 17 - Entering text using a KIFUITestActor into a text field is broken HOT 2
- [Requirement] Privacy manifest for new sensitive APIs HOT 2
- Black screenshots on test failures on ios 17. HOT 6
- Possibility of intergrating with Swift Test HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kif.