Skip to content

Latest commit

ย 

History

History
85 lines (56 loc) ยท 2.96 KB

Continuous-Integration-and-Code-Coverage-in-Xcode.md

File metadata and controls

85 lines (56 loc) ยท 2.96 KB

Continuous Integration and Code Coverage in Xcode

๐Ÿ“… 2019.11.10 (์ผ)

WWDC 2015 | Session : 410 | Category : Testing

๐Ÿ”— Continuous Integration and Code Coverage in Xcode - WWDC 2015 - Videos - Apple Developer

What Is Xcode Server

๋ชจ๋“  ์ฝ”๋“œ๋ฅผ ์ฃผ๊ธฐ์ ์œผ๋กœ pull ๋ฐ›์•„์„œ build์™€ test๋ฅผ ํ•˜๊ณ  build error ๋‚˜ test failure๋ฅผ ์‹ ์†ํ•˜๊ฒŒ ์ฐพ์„ ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ค€๋‹ค.

์„ค์ • ํ•˜๊ธฐ๊ฐ€ ์‰ฝ๋‹ค.

Xcode์™€ ํ†ตํ•ฉ์ด ์ž˜ ๋˜์–ด ์žˆ๋‹ค.

Terminology

Scheme

  • Xcode์—์„œ ํ”„๋กœ์ ํŠธ๋‚˜ ํ…Œ์ŠคํŠธ๋ฅผ run ํ•  ๋•Œ ๋งˆ๋‹ค, Scheme์„ run ํ•˜๋Š” ๊ฒƒ์ด๋‹ค.
  • ๋Œ€๋ถ€๋ถ„ ์ž๋™์œผ๋กœ ์ƒ์„ฑ ๋˜์ง€๋งŒ, custom scheme์„ ๋งŒ๋“ค ์ˆ˜ ๋„ ์žˆ๊ณ  ๊ธฐ๋ณธ์ ์œผ๋กœ ํ”„๋กœ์ ํŠธ๋ฅผ ๋นŒ๋“œ ํ•˜๋Š” ๋ฐฉ๋ฒ•์˜ ํ˜•์‹์ด๋‹ค.
  • ์–ด๋–ค ํƒ€๊ฒŸ์„ ๋นŒ๋“œ ํ• ์ง€, ์–ด๋–ค ํ…Œ์ŠคํŠธ ๋ฒˆ๋“ค์„ ์‹คํ–‰ ํ• ์ง€, ๋“ฑ์„ ์•Œ๊ณ  ์žˆ๋‹ค.
  • Xcode Server์—์„œ bot์„ ์„ธํŒ… ํ•  ๋•Œ ์ค‘์š”ํ•˜๋‹ค.

Bot

  • ๊ธฐ๋ณธ์ ์œผ๋กœ ํŠน์ • ์Šคํ‚ด์„ ๊ฐ€์ง€๊ณ  ์ •์˜ํ•ด ๋†“์€ ์Šค์ผ€์ฅด๋Œ€๋กœ buildํ•˜๊ณ  run ํ•œ๋‹ค. ์ •์˜ ๋œ action์„ ์ˆ˜ํ–‰ํ•˜๊ณ  ๊ฒฐ๊ณผ๋ฅผ ๋ณด๊ณ ํ•œ๋‹ค.

Integration

  • ์Šค์ผ€์ฅด์ด ๋๋‚˜๊ณ  ํ”„๋กœ์ ํŠธ๋ฅผ ์‹คํ–‰ ํ•˜๋Š” ๊ฒƒ

New in Xcode Server

  • Better bot editing
  • Choosing repositories and branches
  • Source control security
  • Updated reports
  • Improved issue tracking

What's new in Xcode 7

  • UserInterface Testing
    • iOS ํ…Œ์ŠคํŠธ๋‚˜ Mac ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํ–‰ ํ•  ๋•Œ Xcode Sever์˜ background์—์„œ full window session์„ ์ƒ์„ฑํ•œ๋‹ค.
    • ์‹ค์ œ ๋””๋ฐ”์ด์Šค์—์„œ๋„ UI test์˜ ๋‹จ๊ณ„๋“ค์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.
    • ์œ ์ €๊ฐ€ ๋ฐ”๋ผ๋ณด๋Š” ๊ฐ™์€ ๋ฐฉ๋ฒ•์œผ๋กœ high level์—์„œ ์•ฑ์„ ํ…Œ์ŠคํŠธํ•˜๊ธฐ ์ข‹๋‹ค.
  • On Demand Resources
    • ์•ฑ bundle์„ ๋” ์ž‘๊ฒŒ ๋งŒ๋“ค์–ด ์ค€๋‹ค. ๋ฒˆ๋“ค์— ๊ฐ€๋Šฅํ•œํ•œ ๋งŽ์€ resource๋ฅผ ์ €์žฅํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์—.
    • App Store๊ฐ€ ๋Œ€์‹  ์ฃผ์ฒด๊ฐ€ ๋˜์–ด์ค€๋‹ค.
    • QA ์‹œ์— App Store์— ์˜ฌ๋ผ๊ฐ€ ์žˆ์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ํ…Œ์ŠคํŠธ ํ•  ์ˆ˜ ๊ฐ€ ์—†๋Š”๋ฐ, QA๋นŒ๋“œ๊ฐ€ Xcode Sever์— ์˜ฌ๋ผ๊ฐ€ ์žˆ์œผ๋ฉด ์•Œ์•„์„œ ํ•ด์ค€๋‹ค.
  • Code Coverage
    • ํ…Œ์ŠคํŠธ๋ฅผ ํ–ˆ์„ ๋•Œ ์–ด๋–ค ์ฝ”๋“œ๊ฐ€ ์‹ค์ œ๋กœ ์‹คํ–‰ ๋๋Š”์ง€

Code Coverage

Extending Xcode Server

Triggers

  • Custom actions : Email notification 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

Environment variables in triggers

ํ™˜๊ฒฝ๋ณ€์ˆ˜

  • Open stantdard
    • Secure communication over HTTPS
    • REST pattern of resources and action
    • Data exchanged using JSON
  • Compatible with most scripting language