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
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
Code Coverage
Coverage trends
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

More Related Content

What's hot

Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In ActionHazem 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 @CheggGalOrlanczyk
 
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 FrameworkSasha Goldshtein
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin 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 EcosystemAndres Almiray
 
TestersChoice_plug-in_tutorial
TestersChoice_plug-in_tutorialTestersChoice_plug-in_tutorial
TestersChoice_plug-in_tutorialLee Seungjong
 
API workshop: Deep dive into Java
API workshop: Deep dive into JavaAPI workshop: Deep dive into Java
API workshop: Deep dive into JavaTom 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 ActionHazem Saleh
 
Testing with test_complete
Testing with test_completeTesting with test_complete
Testing with test_completebinuiweb
 
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 ChapterTom Johnson
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewRichard Giles
 

What's hot (20)

Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In Action
 
tut0000021-hevery
tut0000021-heverytut0000021-hevery
tut0000021-hevery
 
Test Complete
Test CompleteTest Complete
Test Complete
 
Whats newxcode
Whats newxcodeWhats newxcode
Whats newxcode
 
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...
 
iOS Development at Scale @Chegg
iOS Development at Scale @CheggiOS Development at Scale @Chegg
iOS Development at Scale @Chegg
 
CDI In Real Life
CDI In Real LifeCDI In Real Life
CDI In Real Life
 
Xcode 6 release_notes
Xcode 6 release_notesXcode 6 release_notes
Xcode 6 release_notes
 
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
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
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.
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX Ecosystem
 
TestersChoice_plug-in_tutorial
TestersChoice_plug-in_tutorialTestersChoice_plug-in_tutorial
TestersChoice_plug-in_tutorial
 
Azure rev002
Azure rev002Azure rev002
Azure rev002
 
API workshop: Deep dive into Java
API workshop: Deep dive into JavaAPI workshop: Deep dive into Java
API workshop: Deep dive into Java
 
[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
 
Testing with test_complete
Testing with test_completeTesting with test_complete
Testing with test_complete
 
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
 
Android develop guideline
Android develop guidelineAndroid develop guideline
Android develop guideline
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 Overview
 

Similar to Continuous Integration and Code Coverage in Xcode

Automate Software Deployments on EC2 with AWS CodeDeploy
Automate Software Deployments on EC2 with AWS CodeDeployAutomate Software Deployments on EC2 with AWS CodeDeploy
Automate Software Deployments on EC2 with AWS CodeDeployAmazon Web Services
 
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...Amazon Web Services
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsAmazon Web Services
 
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...Amazon Web Services
 
DevOps on AWS - Building Systems to Deliver Faster
DevOps on AWS - Building Systems to Deliver FasterDevOps on AWS - Building Systems to Deliver Faster
DevOps on AWS - Building Systems to Deliver FasterAmazon Web Services
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAmazon Web Services
 
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
 
Accelerating Software Delivery with AWS Developer Tools & AWS Mobile services...
Accelerating Software Delivery with AWS Developer Tools & AWS Mobile services...Accelerating Software Delivery with AWS Developer Tools & AWS Mobile services...
Accelerating Software Delivery with AWS Developer Tools & AWS Mobile services...Amazon Web Services
 
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...Amazon Web Services
 
SRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver FasterSRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver FasterAmazon Web Services
 
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 gRPCTim Burks
 
KKBOX WWDC17 Xcode IDE - Hardy
KKBOX WWDC17  Xcode IDE - HardyKKBOX WWDC17  Xcode IDE - Hardy
KKBOX WWDC17 Xcode IDE - HardyLiyao Chen
 
Introducing AWS CodeStar and the AWS CI:CD workflow - AWS Summit Tel Aviv 2017
Introducing AWS CodeStar and the  AWS CI:CD workflow - AWS Summit Tel Aviv 2017Introducing AWS CodeStar and the  AWS CI:CD workflow - AWS Summit Tel Aviv 2017
Introducing AWS CodeStar and the AWS CI:CD workflow - AWS Summit Tel Aviv 2017Amazon Web Services
 
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 4Manoj 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
 
Intro to AWS Developer Tools, featuring AWS CodeStar
Intro to AWS Developer Tools, featuring AWS CodeStarIntro to AWS Developer Tools, featuring AWS CodeStar
Intro to AWS Developer Tools, featuring AWS CodeStarAmazon Web Services
 
A tale of two pizzas: Developer tools at AWS
A tale of two pizzas: Developer tools at AWSA tale of two pizzas: Developer tools at AWS
A tale of two pizzas: Developer tools at AWSAmazon Web Services
 
Ajax toolkit framework
Ajax toolkit frameworkAjax toolkit framework
Ajax toolkit frameworkSunil Kumar
 

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

Automate Software Deployments on EC2 with AWS CodeDeploy
Automate Software Deployments on EC2 with AWS CodeDeployAutomate Software Deployments on EC2 with AWS CodeDeploy
Automate Software Deployments on EC2 with AWS CodeDeploy
 
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
 
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
 
DevOps on AWS - Building Systems to Deliver Faster
DevOps on AWS - Building Systems to Deliver FasterDevOps on AWS - Building Systems to Deliver Faster
DevOps on AWS - Building Systems to Deliver Faster
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
 
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...
 
Accelerating Software Delivery with AWS Developer Tools & AWS Mobile services...
Accelerating Software Delivery with AWS Developer Tools & AWS Mobile services...Accelerating Software Delivery with AWS Developer Tools & AWS Mobile services...
Accelerating Software Delivery with AWS Developer Tools & AWS Mobile services...
 
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
Intro to AWS Developer Tools feat. AWS Codestar, and AWS SDKs & Developer Res...
 
SRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver FasterSRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver Faster
 
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
 
DevNation
DevNation DevNation
DevNation
 
KKBOX WWDC17 Xcode IDE - Hardy
KKBOX WWDC17  Xcode IDE - HardyKKBOX WWDC17  Xcode IDE - Hardy
KKBOX WWDC17 Xcode IDE - Hardy
 
Introducing AWS CodeStar and the AWS CI:CD workflow - AWS Summit Tel Aviv 2017
Introducing AWS CodeStar and the  AWS CI:CD workflow - AWS Summit Tel Aviv 2017Introducing AWS CodeStar and the  AWS CI:CD workflow - AWS Summit Tel Aviv 2017
Introducing AWS CodeStar and the AWS CI:CD workflow - AWS Summit Tel Aviv 2017
 
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
 
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...
 
Intro to AWS Developer Tools, featuring AWS CodeStar
Intro to AWS Developer Tools, featuring AWS CodeStarIntro to AWS Developer Tools, featuring AWS CodeStar
Intro to AWS Developer Tools, featuring AWS CodeStar
 
A tale of two pizzas: Developer tools at AWS
A tale of two pizzas: Developer tools at AWSA tale of two pizzas: Developer tools at AWS
A tale of two pizzas: Developer tools at AWS
 
Ajax toolkit framework
Ajax toolkit frameworkAjax toolkit framework
Ajax toolkit framework
 
Developer Tools at AWS 2018.pdf
Developer Tools at AWS 2018.pdfDeveloper Tools at AWS 2018.pdf
Developer Tools at AWS 2018.pdf
 

Recently uploaded

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
UiPath New York Community Day in-person event
UiPath New York Community Day in-person eventUiPath New York Community Day in-person event
UiPath New York Community Day in-person eventDianaGray10
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...Product School
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»QADay
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...Elena Simperl
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsVlad Stirbu
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backElena Simperl
 

Recently uploaded (20)

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
UiPath New York Community Day in-person event
UiPath New York Community Day in-person eventUiPath New York Community Day in-person event
UiPath New York Community Day in-person event
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 

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
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 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
  • 38.
  • 39.
  • 41.
  • 42.
  • 43.
  • 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 slesser@apple.com
  • 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