This document discusses UI testing in Xcode 7. It provides an example test for a successful user login. It explains the XCUIApplication and XCUIElement classes which represent the application and UI elements. XCUIElementQuery can be used to find elements. Interactions like tapping and typing are demonstrated. Setting up expectations and assertions for test results is covered. Tips discussed include handling interruptions, improving performance by disabling animations, and changing device orientation in tests.
The Tellurium Automated Testing Framework (Tellurium) is a UI module-based web automated testing framework built on top of Selenium. Here is a step by step guide to teach you how to create a New Tellurium Test project.
The Tellurium Automated Testing Framework (Tellurium) is a UI module-based web automated testing framework.
The Tellurium framework is written in Groovy and Java. The test cases can be written in Java, Groovy, or pure DSL. You do not need to know Groovy before you use it. Detailed Introduction, Frequent Asked Questions, and illustrative examples are provided. We expect and welcome your contributions.
Learn how to leverage functional concepts of Partial Application and Function Composition for Dependency Injection in C#. This is to achieve Simplicity.
The Tellurium Automated Testing Framework (Tellurium) is a UI module-based web automated testing framework built on top of Selenium. Here is a step by step guide to teach you how to create a New Tellurium Test project.
The Tellurium Automated Testing Framework (Tellurium) is a UI module-based web automated testing framework.
The Tellurium framework is written in Groovy and Java. The test cases can be written in Java, Groovy, or pure DSL. You do not need to know Groovy before you use it. Detailed Introduction, Frequent Asked Questions, and illustrative examples are provided. We expect and welcome your contributions.
Learn how to leverage functional concepts of Partial Application and Function Composition for Dependency Injection in C#. This is to achieve Simplicity.
An overview how to realize code generation of languages on the JVM that implement other class layouts than the Java programming languages. As an example, the inline-mock-maker for Mockito is discussed which supports languages like Kotlin that make any property final by default.
In JS: CLASS <=> Constructor FN
new FN() => FN() { this }
FN = CLASS (FN = FN, FN = DATA)
Objects
Prototype / __proto__
Inheritence
Rewriting / Augmenting
built in objects
XCUITest for iOS App Testing and how to test with XcodepCloudy
pCloudy is the most powerful cloud based App Testing Platform. It has the the most comprehensive set of Mobile Devices and Tools to Improve Quality of your App.
pCloudy provides single click access to 500+ Android and IOS devices directly from your browser. You can use these real Mobile Devices to click-and-perform Manual Testing and Automation Testing for your App. You can also Integrate pCloudy with CI for continuous Automation.
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"epamspb
Автоматизаторы старатются упростить рутинную работу ручных тестировщиков, но оказывается и работу автоматизатора можно улучшить. Сделать написание авто тестов проще, быстрее и с большим качеством.
Как этого добиться? Об этом я и хочу рассказать.
Мы поговорим про возможности Java 8, популярную библиотеку-плагин Lombok и мощный фреймворк для автоматизированного тестирования JDI.
This slides give you an overview of the technical challgens that Java EE application servers have faced to reinvent themselves. From monolithic to jigsaw puzzles, app servers are not the burden developpers use to use anymore
This is the support of a course to teach mainly Redux, and Redux with React for Java and C# programmers. It is the third part of the course to recycle programmers from desktop app programming to web app programming. This course covers from history of Redux, its origin, step by step what is a reducer, and later concepts like reducer splitting, action handling, async and many more.
You also can use repositories:
- https://github.com/drpicox/learn-redux-bytesting
- https://github.com/drpicox/learn-redux-zoo-bytesting
To improve your skills.
Migration process of mature iOS project from Objective-C to Swift based on OLX application. Good practices how to migrate project alongside with normal product development. At the end - about problems with mixed Objective-C and Swift projects with possible solutions.
E book introducing_microsoft_social_engagement_sourceImix Colombia
En un mundo social conectado, la interacción con los clientes puede darse en cualquier lugar y momento, y es vital para hacer que su negocio crezca. Microsoft Social Engagement pone eficaces herramientas para contenido social a disposición de sus equipos de ventas, marketing y servicio. Estas herramientas les permiten obtener una idea clara de la opinión que tiene la gente sobre su negocio y ponerse en contacto de forma proactiva con clientes, admiradores y críticos en los medios sociales.
An overview how to realize code generation of languages on the JVM that implement other class layouts than the Java programming languages. As an example, the inline-mock-maker for Mockito is discussed which supports languages like Kotlin that make any property final by default.
In JS: CLASS <=> Constructor FN
new FN() => FN() { this }
FN = CLASS (FN = FN, FN = DATA)
Objects
Prototype / __proto__
Inheritence
Rewriting / Augmenting
built in objects
XCUITest for iOS App Testing and how to test with XcodepCloudy
pCloudy is the most powerful cloud based App Testing Platform. It has the the most comprehensive set of Mobile Devices and Tools to Improve Quality of your App.
pCloudy provides single click access to 500+ Android and IOS devices directly from your browser. You can use these real Mobile Devices to click-and-perform Manual Testing and Automation Testing for your App. You can also Integrate pCloudy with CI for continuous Automation.
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"epamspb
Автоматизаторы старатются упростить рутинную работу ручных тестировщиков, но оказывается и работу автоматизатора можно улучшить. Сделать написание авто тестов проще, быстрее и с большим качеством.
Как этого добиться? Об этом я и хочу рассказать.
Мы поговорим про возможности Java 8, популярную библиотеку-плагин Lombok и мощный фреймворк для автоматизированного тестирования JDI.
This slides give you an overview of the technical challgens that Java EE application servers have faced to reinvent themselves. From monolithic to jigsaw puzzles, app servers are not the burden developpers use to use anymore
This is the support of a course to teach mainly Redux, and Redux with React for Java and C# programmers. It is the third part of the course to recycle programmers from desktop app programming to web app programming. This course covers from history of Redux, its origin, step by step what is a reducer, and later concepts like reducer splitting, action handling, async and many more.
You also can use repositories:
- https://github.com/drpicox/learn-redux-bytesting
- https://github.com/drpicox/learn-redux-zoo-bytesting
To improve your skills.
Migration process of mature iOS project from Objective-C to Swift based on OLX application. Good practices how to migrate project alongside with normal product development. At the end - about problems with mixed Objective-C and Swift projects with possible solutions.
E book introducing_microsoft_social_engagement_sourceImix Colombia
En un mundo social conectado, la interacción con los clientes puede darse en cualquier lugar y momento, y es vital para hacer que su negocio crezca. Microsoft Social Engagement pone eficaces herramientas para contenido social a disposición de sus equipos de ventas, marketing y servicio. Estas herramientas les permiten obtener una idea clara de la opinión que tiene la gente sobre su negocio y ponerse en contacto de forma proactiva con clientes, admiradores y críticos en los medios sociales.
Looking into the Future of Wealth Management - A Sawtooth Solutions White PaperRich Conley
Examining the future possibilities of a wealth advisory practice when advisors become more productive with a CRM focused business & operational functions are outsourced to the cloud
Diversity and Recruitment for the City of BoulderAlan Murdock
When the City of Boulder prioritized diversity recruitment managers realized they had a significant pipeline challenge. This presentation contains key elements of a diversity and recruitment strategy for the city.
It's a web site that's been especially created as a way to provide in-depth reviews and information concerning the PhenQ nutritional supplement. From where visitors will get their own hands on the first PhenQ supplement the web site also offers purchase hyperlinks to other site. Additionally, the website shares the latest promotions, discount offers and deals.
IMPACT INVESTING NIEUWS 1 APRIL 2017
MARKET: 0% rente accelerator voor impact investing?
ABNAMRO Mees Pierson & Triodos Bank IM gaan uit elkaar.
Charity Bonds: 185miljoen UK£ cum. in 1Q 2017.
Meer Robo advisors IN DE vs, dat willen wij ook!
Impact trends Fund: Bright New World.
IFC Social Bond Programme met lead: Essilor 1miljoen brillen voor de BotP in BRICs.
POLICY: Centrale Bank Singapore kondigt Greenbond Grantscheme voor emissiekosten.
TONIIC Framework linkt Sustainable Development Goals aan impact thema's & Adam legt institutionele bankers de investibility van impact investing uit.
HEALTH Impact Fund van UBS 500 US$ for new cancer cures en hun spagaat tussen Philanthropy & Impact Investing, SDG's & public equity investing, DIB's & de UBS Optimus Foundation for entrepreneurail philanthropy...
TBLI overzicht van Private Equity Impact Investing Platforms
CHARIs: Karen Maas Impact als criterium voor de ANBI status, Verre Bergen start Droom&Daad voor 010 Cultuur. ImpInv in Arts: Jan van Berkel GoedeDoelenNL/WWAV: 'do good & tell it'.
Accelerating Impact: Gates open access voor wetenschappelijke kennis: onderzoekers & uitgevers publicaties & onderliggende data.
Surprisingly, many Higher Education Institutions still do not use CRM software because they lack adequate knowledge about such systems. Read our blog to learn the benefits of CRM for Higher Education Institutions
SECURE & EFFICIENT AUDIT SERVICE OUTSOURCING FOR DATA INTEGRITY IN CLOUDSGyan Prakash
Cloud-based outsourced storage relieves the client’s load for storage management and maintenance by providing a comparably low-cost, scalable, location-independent platform. Though, the information that clients no longer have physical control of data specifies that they are facing a potentially formidable risk for missing or corrupted data. To avoid the security risks, inspection services are serious to ensure the integrity and availability of outsourced data and to achieve digital forensics and reliability on cloud computing. Provable data possession (PDP), which is a cryptographic method for validating the reliability of data without retrieving it at an untrusted server, can be used to realize audit services. In this project, profiting from the interactive zero-knowledge proof system, the construction of an interactive PDP protocol to prevent the fraudulence of prover (soundness property) and the leakage of verified data (zero knowledge property).To prove that our construction holds these properties based on the computation Diffie–Hellman assumption and the rewindable black-box knowledge extractor. An efficient mechanism on probabilistic queries and periodic verification is proposed to reduce the audit costs per verification and implement abnormal detection timely. Also, we present an efficient method for choosing an optimal parameter value to reduce computational overheads of cloud audit services.
La malattia di Alzheimer (Alzheimer Disease - AD) è la principale causa di demenza ed è una delle
patologie croniche più devastanti e prevalenti in individui anziani. Come riportato nel rapporto dell'OMS e Alzheimer Disease International, nel 2015, sono state calcolate in 46.800.000 le persone con demenza nel mondo, di cui più della metà con AD, ed è stimato un incremento di nove milioni e 900 mila casi ogni anno: un nuovo caso ogni 3,2 secondi. L’incidenza della demenza aumenta con l’età e, considerato il progressivo invecchiamento della popolazione, il numero dei soggetti affetti tende ad aumentare ogni anno; infatti, si prevedono 74,7 milioni di pazienti nel 2030 e 135,4 milioni nel 2050. Nello stesso rapporto del 2015, il costo annuo stimato in tutto il mondo per demenza è di $US 818.000.000.000: oltre l' 1% del prodotto interno lordo mondiale. Un costo così elevato testimonia l'enorme impatto che la demenza ha sulle condizioni socio-economiche in tutto il mondo. Questo significa che, se l’assistenza per la demenza fosse una nazione, sarebbe la diciottesima economia nel mondo e il suo valore economico supererebbe quello di aziende come Apple (742 miliardi) e Google (368 miliardi).
Secondo lo stesso rapporto in Italia attualmente le persone affette da demenza sono oltre 1.200.000 (di cui oltre 700.000 con malattia di Alzheimer) che diventeranno 1.609.000 nel 2030 e 2.272.000 nel 2050; si stima che nel 2015 i nuovi casi saranno 269.000 e i costi ammonterebbero a 37.6 miliardi di euro. Nel Lazio, nel 2012, sono state stimate in circa 71.000 le persone affette da demenza, di cui 28.000 affette da AD; l’incidenza per tutte le forme di demenza, applicata alla popolazione residente nel Lazio con più di 65 anni, è di circa 14.000 nuovi casi ogni anno.
С недавних пор, в России заблокировали показ моих презентаций - смотрите по ссылке на Google Drive https://drive.google.com/open?id=1sxauKbaCxpG_zgLnBUyJbK2lk5_pegCE
WinAppDriver - Windows Store Apps Test AutomationJeremy Kao
Introduce the background and initial implementation of WinAppDriver - WebDriver for Windows Applications, including desktop applications, store apps (formerly known as Metro-style apps).
Objective-C Crash Course for Web DevelopersJoris Verbogt
These are the slides of my SXSW 2010 Objective-C Crash Course for Web Developers.
The code samples (and the keynote document) can also be downloaded from http://workshop.verbogt.nl/
React Native for multi-platform mobile applicationsMatteo Manchi
Since its 2013 release, React has brought a new way to design UI components in the world wide web. The same foundamentals have been taken to another important environment in our contemporary world: the mobile application.
This month we'll see the philosophy behind React Native - learn once, write anywhere - and how this new framework helps new developers to build native apps using React.
This is a presentation about mobile apps testing using Appium. The presentation conrtains tips on comprehensive testing of apps written for various devices and platforms.
Presentation by Yaroslav Pernerovskyy (Lead Test Engineer, GlobalLogic, Kyiv), delivered at UA Mobile, November 22, 2014.
More details - http://uamobile.org
В этом докладе я хочу рассказать о том, что Obj-C/C++ — это расширение существующих C/C++. В данном докладе будут рассмотрены особенности языка, будет рассказано про управление памятью (retain/release vs. ARC vs. shared_ptr/unique_ptr), про Swift и почему он лучше или хуже Obj-C/C++.
3. UI TESTING IN XCODE 7
Example Test: Successful user login
1) tap my account button
2) tap log in button
3) tap & type e-mail
4) tap & type password
5) tap log in button
4. UI TESTING IN XCODE 7
Example Test: Successful user login
@interface Account : XCTestCase
@property (strong) TestUser *user;
@end
@implementation Account
- (void)setUp {
[super setUp];
[self createUser]; //we are creating test user account here, it will be used in all test cases
self.continueAfterFailure = NO;
}
- (void)tearDown {
[super tearDown];
}
- (void)testLogin_CredentialsAreValid_ShouldLogin {
}
8. UI TESTING IN XCODE 7
UIAccessibility identifiers
Unique identifiers allow recorder to use simpler queries
‣ Locale independent
‣ Ignored by Voice Over
9. UI TESTING IN XCODE 7
How to set UIAccessibility identifiers?
@protocol UIAccessibilityIdentification <NSObject>
@required
/*
A string that identifies the user interface element.
default == nil
*/
@property(nullable, nonatomic, copy) NSString *accessibilityIdentifier
NS_AVAILABLE_IOS(5_0);
@end
10. UI TESTING IN XCODE 7
We can choose from several options to find element
We should use more precise query, if our accessibility
identifier or label isn’t unique:
11. UI TESTING IN XCODE 7
Why not share our identifiers between app & test targets?
…and finally use user credentials created in setUp method.
15. UI TESTING IN XCODE 7
Element queries
XCUIElement
‣ title
‣ label
‣ value
‣ placeholderValue
‣ identifier
‣ selected
‣ frame
‣ …
/*! Returns a query for all descendants of the element matching the
specified type. */
- (XCUIElementQuery *)descendantsMatchingType:(XCUIElementType)type;
/*! Returns a query for direct children of the element matching the
specified type. */
- (XCUIElementQuery *)childrenMatchingType:(XCUIElementType)type;
16. UI TESTING IN XCODE 7
Element queries
XCUIElement
‣ title
‣ label
‣ value
‣ placeholderValue
‣ identifier
‣ selected
‣ frame
‣ …
/*! Returns a query for all descendants of the element matching the
specified type. */
- (XCUIElementQuery *)descendantsMatchingType:(XCUIElementType)type;
@property (readonly, copy) XCUIElementQuery *tables;
@property (readonly, copy) XCUIElementQuery *buttons;
@property (readonly, copy) XCUIElementQuery *staticTexts;
@property (readonly, copy) XCUIElementQuery *textFields;
@property (readonly, copy) XCUIElementQuery *secureTextFields;
@property (readonly, copy) XCUIElementQuery *textViews;
17. UI TESTING IN XCODE 7
Element queries
XCUIElement
‣ title
‣ label
‣ value
‣ placeholderValue
‣ identifier
‣ selected
‣ frame
‣ …
[element descendantsMatchingType:XCUIElementTypeButton];
element.buttons
26. UI TESTING IN XCODE 7
How to asset test results?
▸ We can use all variants of XCTAssert macro
▸ But more accurate for asynchronous UI are expectations
XCUIElement *loggedInLabel = app.tables.staticTexts[Identifier_Account_LoggedInLabel];
NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"];
[self expectationForPredicate:exists evaluatedWithObject:loggedInLabel handler:nil];
[self waitForExpectationsWithTimeout:15 handler:nil];
27. UI TESTING IN XCODE 7
Performance test
- (void)testLogin_CredentialsAreValid_ShouldLogin {
[self measureBlock:^{
//UITest code
}];
}
▸ Xcode executes each test 10 times and compare average execution
time with baseline (selected from previous results)
▸ Test will fail if new average has increased from baseline by 10% or
more, but it will ignore regressions of less than a tenth of a second
29. UI TESTING IN XCODE 7
Handle UI interruptions
▸ Setup interruptions monitor
[self addUIInterruptionMonitorWithDescription:@"Location Permission"
handler:^BOOL(XCUIElement *element) {
XCUIElement *button = alert.buttons[@"Allow"];
if (button.exists) {
[button tap];
return true;
}
return false;
}];
▸ Handlers are invoked in reverse order
until one of them return true
1 2
30. UI TESTING IN XCODE 7
Handle UI interruptions
▸ By default, XCode 7.2 will try to find &
tap elements matching predicate:
userTestingAttributes CONTAINS "cancel-button"
userTestingAttributes CONTAINS "default-button"
1 2
31. UI TESTING IN XCODE 7
Handle UI interruptions
▸ By default, XCode 7.2 will try to find &
tap elements matching predicate:
userTestingAttributes CONTAINS "cancel-button"
userTestingAttributes CONTAINS "default-button"
2▸ Do you prefer confirm button as first
choice? Add your own monitor:
NSPredicate *predicate = [NSPredicate predicateWithFormat:
@"userTestingAttributes CONTAINS "default-button""];
XCUIElement *button = [alert.buttons elementMatchingPredicate:predicate];
if (button.exists) {
[button tap];
return true;
}
32. UI TESTING IN XCODE 7
Typing in secure text field doesn’t work
▸ Workaround: Disconnect Hardware Keyboard in Simulator
▸ „Neither element or any descendant has keyboard focus”
error occurs when you are trying to type in secure UITextField
33. ▸ Instead, we should check if element is hittable:
UI TESTING IN XCODE 7
Why your test is not waiting for hidden elements?
▸ Hidden elements fulfil exists predicate:
[NSPredicate predicateWithFormat:@"exists == 1"]
[NSPredicate predicateWithFormat:@"hittable == 1"]
34. UI TESTING IN XCODE 7
How to detect that app is in test mode?
XCUIApplication * app = [[XCUIApplication alloc] init];
[app setLaunchArguments:@[@"UITESTS"]];
[app launch];
NSArray *arguments = [[NSProcessInfo processInfo] arguments];
if ([arguments containsObject:@"UITESTS"]) {
//Customize app for tests
}
▸ In test file:
▸ In application:
35. UI TESTING IN XCODE 7
How to speed up tests?
▸ Disable animations in AppDelegate:
NSArray *arguments = [[NSProcessInfo processInfo] arguments];
if ([arguments containsObject:@"UITESTS"]) {
[UIView setAnimationsEnabled:NO];
}
36. ▸ Waiting for element is one of the most cases in UI tests,
why not use convenient helper?
UI TESTING IN XCODE 7
Waiting for elements shortcuts
NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"];
[self expectationForPredicate:exists evaluatedWithObject:element handler:nil];
[self waitForExpectationsWithTimeout:15 handler:nil];
[self waitForElement:element];
[self waitForElement:button withTimeout:60];
37. ▸ Waiting for element is one of the most cases in UI tests,
why not use convenient helper?
UI TESTING IN XCODE 7
Waiting for elements shortcuts
NSPredicate *exists = [NSPredicate predicateWithFormat:@"hittable == 1"];
[self expectationForPredicate:exists evaluatedWithObject:element handler:nil];
[self waitForExpectationsWithTimeout:15 handler:nil];
[self waitForElementHittable:element];
[self waitForElementHittable:button withTimeout:60];
38. ▸ Waiting for element is one of the most cases in UI tests,
why not use convenient helper?
UI TESTING IN XCODE 7
Waiting for elements shortcuts
NSPredicate *exists = [NSPredicate predicateWithFormat:@"hittable == 1"];
[self expectationForPredicate:exists evaluatedWithObject:element handler:nil];
[self waitForExpectationsWithTimeout:15 handler:nil];
[self waitForElementHittable:element];
[self waitForElementHittable:button withTimeout:60];
https://github.com/dstranz/XCUITestsAdditions
pod "XCUITestsAdditions"
40. UI TESTING IN XCODE 7
Simulates the user pressing a physical button
[[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome];
[[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonVolumeUp];
[[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonVolumeDown];
▸ Home button
▸ Volume up
▸ Volume down
▸ Volume up & down doesn’t work on simulator
42. UI TESTING IN XCODE 7
How to reset simulator state before each test?
It’s not possible to force launching app on clean simulator
(rdar://22455111).
What are workarounds?
43. UI TESTING IN XCODE 7
How to reset simulator state before each test?
▸ If you are using CI, you can run xcrun simctl erase all
between each test cases
▸ You can clean NSUserDefaults and Keychain in
AppDelegate, when app is in UITests mode
▸ …or rollback changes in tearDown method
(for example logout user after login test)