SlideShare a Scribd company logo
© 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.
#WWDC15
Continuous Integration and 

Code Coverage in Xcode
Matt Moriarity Xcode Engineer
Developer Tools
Session 410
Agenda
What is Xcode Server
What's new in Xcode 7
Code coverage
Extending Xcode Server
Demos
What Is Xcode Server
What Is Xcode Server
Continuous integration
What Is Xcode Server
Continuous integration
Enhances collaboration and improves
software quality
What Is Xcode Server
Continuous integration
Enhances collaboration and improves
software quality
Builds and tests projects on a schedule
What Is Xcode Server
Continuous integration
Enhances collaboration and improves
software quality
Builds and tests projects on a schedule
Easy to set up with Xcode and OS X Server
What Is Xcode Server
Continuous integration
Enhances collaboration and improves
software quality
Builds and tests projects on a schedule
Easy to set up with Xcode and OS X Server
Deep integration with Xcode
What Is Xcode Server
Terminology
What Is Xcode Server
Terminology
Scheme
Recipe for building
your project
What Is Xcode Server
Terminology
Scheme
Recipe for building
your project
Bot
Analyze, build, test, and
archive on a schedule
What Is Xcode Server
Terminology
Integration
A single run

of a bot
Scheme
Recipe for building
your project
Bot
Analyze, build, test, and
archive on a schedule
New in Xcode Server
Better bot editing
New in Xcode Server
Choosing repositories and branches
New in Xcode Server
Source control security
New in Xcode Server
Updated reports
New in Xcode Server
Updated reports
New in Xcode Server
Improved issue tracking
Continuous Integration and Code Coverage in Xcode
Continuous Integration and Code Coverage in Xcode
Continuous Integration and Code Coverage in Xcode
Continuous Integration and Code Coverage in Xcode
Continuous Integration and Code Coverage in Xcode
New in Xcode Server
Xcode 7 features
New in Xcode Server
Xcode 7 features
User Interface Testing
New in Xcode Server
Xcode 7 features
On Demand Resources
New in Xcode Server
Xcode 7 features
Code Coverage
Code Coverage
Code Coverage
A tool for measuring the value of tests
Code Coverage
A tool for measuring the value of tests
Shows which code is exercised by unit tests
Code Coverage
A tool for measuring the value of tests
Shows which code is exercised by unit tests
Exposes areas of your code that 

are untested
Code Coverage
Code Coverage
Tightly integrated with LLVM
Counts each expression that is executed
Code Coverage
Hierarchical coverage report
Code Coverage
In the editor
Code Coverage
In Xcode Server
Code Coverage
Multiple devices
Continuous Integration and Code Coverage in Xcode
Continuous Integration and Code Coverage in Xcode
Code Coverage
Coverage trends
Continuous Integration and Code Coverage in Xcode
Continuous Integration and Code Coverage in Xcode
Continuous Integration and Code Coverage in Xcode
Demo
Code coverage in Xcode
Eric Dudiak Xcode Engineer
Extending Xcode Server
Extending Xcode Server
Triggers
Extending Xcode Server
Triggers
Custom actions:Email notifications or scripts
Extending Xcode Server
Triggers
Custom actions:Email notifications or scripts
Use your language of choice
• Include a #! in your script, otherwise Bash is assumed
Extending Xcode Server
Triggers
Custom actions:Email notifications or scripts
Use your language of choice
• Include a #! in your script, otherwise Bash is assumed
Before and after integrations run
Extending Xcode Server
Triggers
Custom actions:Email notifications or scripts
Use your language of choice
• Include a #! in your script, otherwise Bash is assumed
Before and after integrations run
Gated on the result of the integration
Extending Xcode Server
Environment variables in triggers
XCS Always set to 1, use to detect Xcode Server
XCS_BOT_NAME The name of the current bot
XCS_BOT_ID The ID of the current bot
XCS_INTEGRATION_NUMBER The sequential number of the current integration
XCS_INTEGRATION_ID The ID of the current integration
XCS_INTEGRATION_RESULT The overall result of the integration
XCS_SOURCE_DIR Location where your project’s code was checked out
XCS_OUTPUT_DIR Location where logs and assets for the integration are stored
XCS_DERIVED_DATA_DIR Location where derived data is stored for this bot
XCS_PRODUCT Path to an .ipa or .app, if the bot produced one
XCS_(TYPE)_COUNT Number of issues of each type (error, warning, failed test, etc.)
XCS_(TYPE)_CHANGE Change in number of issues from previous integration
Extending Xcode Server
Environment variables in triggers
XCS Always set to 1, use to detect Xcode Server
XCS_BOT_NAME The name of the current bot
XCS_BOT_ID The ID of the current bot
XCS_INTEGRATION_NUMBER The sequential number of the current integration
XCS_INTEGRATION_ID The ID of the current integration
XCS_INTEGRATION_RESULT The overall result of the integration
XCS_SOURCE_DIR Location where your project’s code was checked out
XCS_OUTPUT_DIR Location where logs and assets for the integration are stored
XCS_DERIVED_DATA_DIR Location where derived data is stored for this bot
XCS_PRODUCT Path to an .ipa or .app, if the bot produced one
XCS_(TYPE)_COUNT Number of issues of each type (error, warning, failed test, etc.)
XCS_(TYPE)_CHANGE Change in number of issues from previous integration
XCS Always set to 1, use to detect Xcode Server
XCS_BOT_NAME The name of the current bot
XCS_BOT_ID The ID of the current bot
XCS_INTEGRATION_NUMBER The sequential number of the current integration
XCS_INTEGRATION_ID The ID of the current integration
XCS_INTEGRATION_RESULT The overall result of the integration
XCS_SOURCE_DIR Location where your project’s code was checked out
XCS_OUTPUT_DIR Location where logs and assets for the integration are stored
XCS_DERIVED_DATA_DIR Location where derived data is stored for this bot
XCS_PRODUCT Path to an .ipa or .app, if the bot produced one
XCS_(TYPE)_COUNT Number of issues of each type (error, warning, failed test, etc.)
XCS_(TYPE)_CHANGE Change in number of issues from previous integration
Extending Xcode Server
Environment Variables in Triggers
Extending Xcode Server
Extending Xcode Server
Open standards
Extending Xcode Server
Open standards
• Secure communication over HTTPS
Extending Xcode Server
Open standards
• Secure communication over HTTPS
• REST pattern of resources and actions
Extending Xcode Server
Open standards
• Secure communication over HTTPS
• REST pattern of resources and actions
• Data exchanged using JSON
Extending Xcode Server
Open standards
• Secure communication over HTTPS
• REST pattern of resources and actions
• Data exchanged using JSON
Compatible with most scripting languages
Extending Xcode Server
API example:bots
GET https://my-server:20343/api/bots

{

"count": 3,

"results": [{

"_id": "2787279335349c6fad1f8c0477eaf3df",

"name": "CoffeeBoard Bot",

"configuration": {

"builtFromClean": 0,

"schemeName": "CoffeeBoard",

"performsAnalyzeAction": true,

"performsTestAction": true,

"performsArchiveAction": true,

"exportsProductFromArchive": false,

"triggers": [],

"scheduleType": 2,
Extending Xcode Server
API example:integrations
Extending Xcode Server
API example:integrations
GET .../bots/2787279335349c6fad1f8c0477eaf3df/integrations

Extending Xcode Server
API example:integrations
GET .../bots/2787279335349c6fad1f8c0477eaf3df/integrations

{

"count": 30,

"results: [{

"_id": "93040d36151067716da6ff05a20032bc",

"bot": { ... },

"number": 23,

"currentStep": "completed",

"result": "build-errors",

"buildResultSummary": {

"errorCount": 3,

"errorChange": -1,

"warningCount": 11,

"warningChange": 0,

Extending Xcode Server
API example:integrating a bot
Extending Xcode Server
API example:integrating a bot
POST .../bots/2787279335349c6fad1f8c0477eaf3df/integrations



Extending Xcode Server
API example:integrating a bot
POST .../bots/2787279335349c6fad1f8c0477eaf3df/integrations



{

"_id": "93040d36151067716da6ff05a20032bc",

"bot": { ... },

"number": 23,

"currentStep": "pending"

}
Extending Xcode Server
API example:integrating a bot
POST .../bots/2787279335349c6fad1f8c0477eaf3df/integrations

{ "shouldClean": true }

{

"_id": "93040d36151067716da6ff05a20032bc",

"bot": { ... },

"number": 23,

"currentStep": "pending"

}
Demo
Extending Xcode Server
Eric Dudiak Xcode Engineer
Extending Xcode Server
Available endpoints
GET /bots List bots on server
POST /bots Create a new bot
GET /bots/(id) Retrieve a bot by ID
PATCH /bots/(id) Update a bot’s configuration
GET /bots/(id)/integrations Get the most recent integrations for a bot
POST /bots/(id)/integrations Enqueue a new integration
GET /integrations List integrations on server
GET /integrations/(id) Retrieve an integration by ID
GET /integrations/(id)/commits List the commits included in an integration
GET /integrations/(id)/issues List the build issues produced by an integration
GET /devices List devices connected to server
GET /repositories List hosted repositories on server
POST /repositories Create a new hosted repository
Summary
Xcode Server improvements
New testing features
Code coverage
Triggers
Xcode Server API
More Information
Xcode Server and Continuous Integration Guide
http://developer.apple.com/library
Apple Developer Forums
http://developer.apple.com/forums
Stefan Lesser
Swift Evangelist
slesser@apple.com
Related Sessions
UI Testing in Xcode Presidio Wednesday 11:00AM
Continuous Integration with Xcode 6 WWDC 2014
Related Lab
Testing and Continuous Integration Developer Tools Lab B Thursday 1:30PM
Continuous Integration and Code Coverage in Xcode
Ad

More Related Content

What's hot (20)

Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In Action
Hazem Saleh
 
tut0000021-hevery
tut0000021-heverytut0000021-hevery
tut0000021-hevery
tutorialsruby
 
Test Complete
Test CompleteTest Complete
Test Complete
RomSoft SRL
 
Whats newxcode
Whats newxcodeWhats newxcode
Whats newxcode
Pragati Singh
 
QA Fest 2018. Adam Stasiak. React Native is Coming – the story of hybrid mobi...
QA Fest 2018. Adam Stasiak. React Native is Coming – the story of hybrid mobi...QA Fest 2018. Adam Stasiak. React Native is Coming – the story of hybrid mobi...
QA Fest 2018. Adam Stasiak. React Native is Coming – the story of hybrid mobi...
QAFest
 
iOS Development at Scale @Chegg
iOS Development at Scale @CheggiOS Development at Scale @Chegg
iOS Development at Scale @Chegg
GalOrlanczyk
 
CDI In Real Life
CDI In Real LifeCDI In Real Life
CDI In Real Life
Antoine Sabot-Durand
 
Xcode 6 release_notes
Xcode 6 release_notesXcode 6 release_notes
Xcode 6 release_notes
Jigar Maheshwari
 
Visual Studio 2015 and the Next .NET Framework
Visual Studio 2015 and the Next .NET FrameworkVisual Studio 2015 and the Next .NET Framework
Visual Studio 2015 and the Next .NET Framework
Sasha Goldshtein
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
Nalin Goonawardana
 
Midas - on-the-fly schema migration tool for MongoDB.
Midas - on-the-fly schema migration tool for MongoDB.Midas - on-the-fly schema migration tool for MongoDB.
Midas - on-the-fly schema migration tool for MongoDB.
Dhaval Dalal
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX Ecosystem
Andres Almiray
 
TestersChoice_plug-in_tutorial
TestersChoice_plug-in_tutorialTestersChoice_plug-in_tutorial
TestersChoice_plug-in_tutorial
Lee Seungjong
 
Azure rev002
Azure rev002Azure rev002
Azure rev002
Rich Helton
 
API workshop: Deep dive into Java
API workshop: Deep dive into JavaAPI workshop: Deep dive into Java
API workshop: Deep dive into Java
Tom Johnson
 
[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action
Hazem Saleh
 
Testing with test_complete
Testing with test_completeTesting with test_complete
Testing with test_complete
binuiweb
 
API Documentation -- Presentation to East Bay STC Chapter
API Documentation -- Presentation to East Bay STC ChapterAPI Documentation -- Presentation to East Bay STC Chapter
API Documentation -- Presentation to East Bay STC Chapter
Tom Johnson
 
Android develop guideline
Android develop guidelineAndroid develop guideline
Android develop guideline
Kan-Han (John) Lu
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 Overview
Richard Giles
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In Action
Hazem Saleh
 
QA Fest 2018. Adam Stasiak. React Native is Coming – the story of hybrid mobi...
QA Fest 2018. Adam Stasiak. React Native is Coming – the story of hybrid mobi...QA Fest 2018. Adam Stasiak. React Native is Coming – the story of hybrid mobi...
QA Fest 2018. Adam Stasiak. React Native is Coming – the story of hybrid mobi...
QAFest
 
iOS Development at Scale @Chegg
iOS Development at Scale @CheggiOS Development at Scale @Chegg
iOS Development at Scale @Chegg
GalOrlanczyk
 
Visual Studio 2015 and the Next .NET Framework
Visual Studio 2015 and the Next .NET FrameworkVisual Studio 2015 and the Next .NET Framework
Visual Studio 2015 and the Next .NET Framework
Sasha Goldshtein
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
Nalin Goonawardana
 
Midas - on-the-fly schema migration tool for MongoDB.
Midas - on-the-fly schema migration tool for MongoDB.Midas - on-the-fly schema migration tool for MongoDB.
Midas - on-the-fly schema migration tool for MongoDB.
Dhaval Dalal
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX Ecosystem
Andres Almiray
 
TestersChoice_plug-in_tutorial
TestersChoice_plug-in_tutorialTestersChoice_plug-in_tutorial
TestersChoice_plug-in_tutorial
Lee Seungjong
 
API workshop: Deep dive into Java
API workshop: Deep dive into JavaAPI workshop: Deep dive into Java
API workshop: Deep dive into Java
Tom Johnson
 
[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action
Hazem Saleh
 
Testing with test_complete
Testing with test_completeTesting with test_complete
Testing with test_complete
binuiweb
 
API Documentation -- Presentation to East Bay STC Chapter
API Documentation -- Presentation to East Bay STC ChapterAPI Documentation -- Presentation to East Bay STC Chapter
API Documentation -- Presentation to East Bay STC Chapter
Tom Johnson
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 Overview
Richard Giles
 

Similar to Continuous Integration and Code Coverage in Xcode (18)

Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Ajeet Singh Raina
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Tim Burks
 
DevNation
DevNation DevNation
DevNation
jwi11iams
 
KKBOX WWDC17 Xcode IDE - Hardy
KKBOX WWDC17  Xcode IDE - HardyKKBOX WWDC17  Xcode IDE - Hardy
KKBOX WWDC17 Xcode IDE - Hardy
Liyao Chen
 
Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4
Manoj Ellappan
 
MongoDB World 2018: Tutorial - Got Dibs? Building a Real-Time Bidding App wit...
MongoDB World 2018: Tutorial - Got Dibs? Building a Real-Time Bidding App wit...MongoDB World 2018: Tutorial - Got Dibs? Building a Real-Time Bidding App wit...
MongoDB World 2018: Tutorial - Got Dibs? Building a Real-Time Bidding App wit...
MongoDB
 
Ajax toolkit framework
Ajax toolkit frameworkAjax toolkit framework
Ajax toolkit framework
Sunil Kumar
 
AWS CodeStar - AWS TelAviv Summit 2017
AWS CodeStar - AWS TelAviv Summit 2017  AWS CodeStar - AWS TelAviv Summit 2017
AWS CodeStar - AWS TelAviv Summit 2017
Tara Walker
 
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe DevelopmentEclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
DevOps.com
 
2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta
Daniel Fisher
 
Coding Naked 2023
Coding Naked 2023Coding Naked 2023
Coding Naked 2023
Caleb Jenkins
 
Evolution of VS code Java ecosystem
Evolution of VS code Java ecosystemEvolution of VS code Java ecosystem
Evolution of VS code Java ecosystem
Adi Polak
 
Erich Gamma at SpringOne Platform 2017
Erich Gamma at SpringOne Platform 2017Erich Gamma at SpringOne Platform 2017
Erich Gamma at SpringOne Platform 2017
VMware Tanzu
 
DevOps para Open Source com Azure DevOps
DevOps para Open Source com Azure DevOpsDevOps para Open Source com Azure DevOps
DevOps para Open Source com Azure DevOps
Emmanuel Gomes Brandão
 
Coding Naked
Coding NakedCoding Naked
Coding Naked
Caleb Jenkins
 
Vijay Oscon
Vijay OsconVijay Oscon
Vijay Oscon
vijayrvr
 
Busy developer-html5-javaee7
Busy developer-html5-javaee7Busy developer-html5-javaee7
Busy developer-html5-javaee7
Geertjan Wielenga
 
Tooling and DevOps for the Hybrid Cloud with Azure and Azure Stack
Tooling and DevOps for the Hybrid Cloud with Azure and Azure StackTooling and DevOps for the Hybrid Cloud with Azure and Azure Stack
Tooling and DevOps for the Hybrid Cloud with Azure and Azure Stack
Microsoft Tech Community
 
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Ajeet Singh Raina
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Tim Burks
 
KKBOX WWDC17 Xcode IDE - Hardy
KKBOX WWDC17  Xcode IDE - HardyKKBOX WWDC17  Xcode IDE - Hardy
KKBOX WWDC17 Xcode IDE - Hardy
Liyao Chen
 
Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4
Manoj Ellappan
 
MongoDB World 2018: Tutorial - Got Dibs? Building a Real-Time Bidding App wit...
MongoDB World 2018: Tutorial - Got Dibs? Building a Real-Time Bidding App wit...MongoDB World 2018: Tutorial - Got Dibs? Building a Real-Time Bidding App wit...
MongoDB World 2018: Tutorial - Got Dibs? Building a Real-Time Bidding App wit...
MongoDB
 
Ajax toolkit framework
Ajax toolkit frameworkAjax toolkit framework
Ajax toolkit framework
Sunil Kumar
 
AWS CodeStar - AWS TelAviv Summit 2017
AWS CodeStar - AWS TelAviv Summit 2017  AWS CodeStar - AWS TelAviv Summit 2017
AWS CodeStar - AWS TelAviv Summit 2017
Tara Walker
 
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe DevelopmentEclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
DevOps.com
 
2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta
Daniel Fisher
 
Evolution of VS code Java ecosystem
Evolution of VS code Java ecosystemEvolution of VS code Java ecosystem
Evolution of VS code Java ecosystem
Adi Polak
 
Erich Gamma at SpringOne Platform 2017
Erich Gamma at SpringOne Platform 2017Erich Gamma at SpringOne Platform 2017
Erich Gamma at SpringOne Platform 2017
VMware Tanzu
 
DevOps para Open Source com Azure DevOps
DevOps para Open Source com Azure DevOpsDevOps para Open Source com Azure DevOps
DevOps para Open Source com Azure DevOps
Emmanuel Gomes Brandão
 
Vijay Oscon
Vijay OsconVijay Oscon
Vijay Oscon
vijayrvr
 
Busy developer-html5-javaee7
Busy developer-html5-javaee7Busy developer-html5-javaee7
Busy developer-html5-javaee7
Geertjan Wielenga
 
Tooling and DevOps for the Hybrid Cloud with Azure and Azure Stack
Tooling and DevOps for the Hybrid Cloud with Azure and Azure StackTooling and DevOps for the Hybrid Cloud with Azure and Azure Stack
Tooling and DevOps for the Hybrid Cloud with Azure and Azure Stack
Microsoft Tech Community
 
Ad

Recently uploaded (20)

Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Ad

Continuous Integration and Code Coverage in Xcode

  • 1. © 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. #WWDC15 Continuous Integration and 
 Code Coverage in Xcode Matt Moriarity Xcode Engineer Developer Tools Session 410
  • 2. Agenda What is Xcode Server What's new in Xcode 7 Code coverage Extending Xcode Server Demos
  • 3. What Is Xcode Server
  • 4. What Is Xcode Server Continuous integration
  • 5. What Is Xcode Server Continuous integration Enhances collaboration and improves software quality
  • 6. What Is Xcode Server Continuous integration Enhances collaboration and improves software quality Builds and tests projects on a schedule
  • 7. What Is Xcode Server Continuous integration Enhances collaboration and improves software quality Builds and tests projects on a schedule Easy to set up with Xcode and OS X Server
  • 8. What Is Xcode Server Continuous integration Enhances collaboration and improves software quality Builds and tests projects on a schedule Easy to set up with Xcode and OS X Server Deep integration with Xcode
  • 9. What Is Xcode Server Terminology
  • 10. What Is Xcode Server Terminology Scheme Recipe for building your project
  • 11. What Is Xcode Server Terminology Scheme Recipe for building your project Bot Analyze, build, test, and archive on a schedule
  • 12. What Is Xcode Server Terminology Integration A single run
 of a bot Scheme Recipe for building your project Bot Analyze, build, test, and archive on a schedule
  • 13. New in Xcode Server Better bot editing
  • 14. New in Xcode Server Choosing repositories and branches
  • 15. New in Xcode Server Source control security
  • 16. New in Xcode Server Updated reports
  • 17. New in Xcode Server Updated reports
  • 18. New in Xcode Server Improved issue tracking
  • 24. New in Xcode Server Xcode 7 features
  • 25. New in Xcode Server Xcode 7 features User Interface Testing
  • 26. New in Xcode Server Xcode 7 features On Demand Resources
  • 27. New in Xcode Server Xcode 7 features Code Coverage
  • 29. Code Coverage A tool for measuring the value of tests
  • 30. Code Coverage A tool for measuring the value of tests Shows which code is exercised by unit tests
  • 31. Code Coverage A tool for measuring the value of tests Shows which code is exercised by unit tests Exposes areas of your code that 
 are untested
  • 33. Code Coverage Tightly integrated with LLVM Counts each expression that is executed
  • 44. Demo Code coverage in Xcode Eric Dudiak Xcode Engineer
  • 47. Extending Xcode Server Triggers Custom actions:Email notifications or scripts
  • 48. Extending Xcode Server Triggers Custom actions:Email notifications or scripts Use your language of choice • Include a #! in your script, otherwise Bash is assumed
  • 49. Extending Xcode Server Triggers Custom actions:Email notifications or scripts Use your language of choice • Include a #! in your script, otherwise Bash is assumed Before and after integrations run
  • 50. Extending Xcode Server Triggers Custom actions:Email notifications or scripts Use your language of choice • Include a #! in your script, otherwise Bash is assumed Before and after integrations run Gated on the result of the integration
  • 51. Extending Xcode Server Environment variables in triggers XCS Always set to 1, use to detect Xcode Server XCS_BOT_NAME The name of the current bot XCS_BOT_ID The ID of the current bot XCS_INTEGRATION_NUMBER The sequential number of the current integration XCS_INTEGRATION_ID The ID of the current integration XCS_INTEGRATION_RESULT The overall result of the integration XCS_SOURCE_DIR Location where your project’s code was checked out XCS_OUTPUT_DIR Location where logs and assets for the integration are stored XCS_DERIVED_DATA_DIR Location where derived data is stored for this bot XCS_PRODUCT Path to an .ipa or .app, if the bot produced one XCS_(TYPE)_COUNT Number of issues of each type (error, warning, failed test, etc.) XCS_(TYPE)_CHANGE Change in number of issues from previous integration
  • 52. Extending Xcode Server Environment variables in triggers XCS Always set to 1, use to detect Xcode Server XCS_BOT_NAME The name of the current bot XCS_BOT_ID The ID of the current bot XCS_INTEGRATION_NUMBER The sequential number of the current integration XCS_INTEGRATION_ID The ID of the current integration XCS_INTEGRATION_RESULT The overall result of the integration XCS_SOURCE_DIR Location where your project’s code was checked out XCS_OUTPUT_DIR Location where logs and assets for the integration are stored XCS_DERIVED_DATA_DIR Location where derived data is stored for this bot XCS_PRODUCT Path to an .ipa or .app, if the bot produced one XCS_(TYPE)_COUNT Number of issues of each type (error, warning, failed test, etc.) XCS_(TYPE)_CHANGE Change in number of issues from previous integration
  • 53. XCS Always set to 1, use to detect Xcode Server XCS_BOT_NAME The name of the current bot XCS_BOT_ID The ID of the current bot XCS_INTEGRATION_NUMBER The sequential number of the current integration XCS_INTEGRATION_ID The ID of the current integration XCS_INTEGRATION_RESULT The overall result of the integration XCS_SOURCE_DIR Location where your project’s code was checked out XCS_OUTPUT_DIR Location where logs and assets for the integration are stored XCS_DERIVED_DATA_DIR Location where derived data is stored for this bot XCS_PRODUCT Path to an .ipa or .app, if the bot produced one XCS_(TYPE)_COUNT Number of issues of each type (error, warning, failed test, etc.) XCS_(TYPE)_CHANGE Change in number of issues from previous integration Extending Xcode Server Environment Variables in Triggers
  • 56. Extending Xcode Server Open standards • Secure communication over HTTPS
  • 57. Extending Xcode Server Open standards • Secure communication over HTTPS • REST pattern of resources and actions
  • 58. Extending Xcode Server Open standards • Secure communication over HTTPS • REST pattern of resources and actions • Data exchanged using JSON
  • 59. Extending Xcode Server Open standards • Secure communication over HTTPS • REST pattern of resources and actions • Data exchanged using JSON Compatible with most scripting languages
  • 60. Extending Xcode Server API example:bots GET https://my-server:20343/api/bots
 {
 "count": 3,
 "results": [{
 "_id": "2787279335349c6fad1f8c0477eaf3df",
 "name": "CoffeeBoard Bot",
 "configuration": {
 "builtFromClean": 0,
 "schemeName": "CoffeeBoard",
 "performsAnalyzeAction": true,
 "performsTestAction": true,
 "performsArchiveAction": true,
 "exportsProductFromArchive": false,
 "triggers": [],
 "scheduleType": 2,
  • 61. Extending Xcode Server API example:integrations
  • 62. Extending Xcode Server API example:integrations GET .../bots/2787279335349c6fad1f8c0477eaf3df/integrations

  • 63. Extending Xcode Server API example:integrations GET .../bots/2787279335349c6fad1f8c0477eaf3df/integrations
 {
 "count": 30,
 "results: [{
 "_id": "93040d36151067716da6ff05a20032bc",
 "bot": { ... },
 "number": 23,
 "currentStep": "completed",
 "result": "build-errors",
 "buildResultSummary": {
 "errorCount": 3,
 "errorChange": -1,
 "warningCount": 11,
 "warningChange": 0,

  • 64. Extending Xcode Server API example:integrating a bot
  • 65. Extending Xcode Server API example:integrating a bot POST .../bots/2787279335349c6fad1f8c0477eaf3df/integrations
 

  • 66. Extending Xcode Server API example:integrating a bot POST .../bots/2787279335349c6fad1f8c0477eaf3df/integrations
 
 {
 "_id": "93040d36151067716da6ff05a20032bc",
 "bot": { ... },
 "number": 23,
 "currentStep": "pending"
 }
  • 67. Extending Xcode Server API example:integrating a bot POST .../bots/2787279335349c6fad1f8c0477eaf3df/integrations
 { "shouldClean": true }
 {
 "_id": "93040d36151067716da6ff05a20032bc",
 "bot": { ... },
 "number": 23,
 "currentStep": "pending"
 }
  • 68. Demo Extending Xcode Server Eric Dudiak Xcode Engineer
  • 69. Extending Xcode Server Available endpoints GET /bots List bots on server POST /bots Create a new bot GET /bots/(id) Retrieve a bot by ID PATCH /bots/(id) Update a bot’s configuration GET /bots/(id)/integrations Get the most recent integrations for a bot POST /bots/(id)/integrations Enqueue a new integration GET /integrations List integrations on server GET /integrations/(id) Retrieve an integration by ID GET /integrations/(id)/commits List the commits included in an integration GET /integrations/(id)/issues List the build issues produced by an integration GET /devices List devices connected to server GET /repositories List hosted repositories on server POST /repositories Create a new hosted repository
  • 70. Summary Xcode Server improvements New testing features Code coverage Triggers Xcode Server API
  • 71. More Information Xcode Server and Continuous Integration Guide http://developer.apple.com/library Apple Developer Forums http://developer.apple.com/forums Stefan Lesser Swift Evangelist [email protected]
  • 72. Related Sessions UI Testing in Xcode Presidio Wednesday 11:00AM Continuous Integration with Xcode 6 WWDC 2014
  • 73. Related Lab Testing and Continuous Integration Developer Tools Lab B Thursday 1:30PM