Suche senden
Hochladen
Stubる - Mockingjayを使ったHTTPクライアントのテスト -
•
1 gefällt mir
•
3,219 views
Kenji Tanaka
Folgen
iOS Test Night #4での登壇資料です。 https://testnight.connpass.com/event/54316/
Weniger lesen
Mehr lesen
Technologie
Melden
Teilen
Melden
Teilen
1 von 16
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Java libraries you can't afford to miss
Java libraries you can't afford to miss
Andres Almiray
Kotlin is charming; The reasons Java engineers should start Kotlin.
Kotlin is charming; The reasons Java engineers should start Kotlin.
JustSystems Corporation
Introduction kot iin
Introduction kot iin
Jedsada Tiwongvokul
JJUG CCC 2011 Spring
JJUG CCC 2011 Spring
Kiyotaka Oku
Jggug 2010 330 Grails 1.3 観察
Jggug 2010 330 Grails 1.3 観察
Tsuyoshi Yamamoto
The report of JavaOne2011 about groovy
The report of JavaOne2011 about groovy
Yasuharu Nakano
Boom! Promises/A+ Was Born
Boom! Promises/A+ Was Born
Domenic Denicola
Spock: A Highly Logical Way To Test
Spock: A Highly Logical Way To Test
Howard Lewis Ship
Empfohlen
Java libraries you can't afford to miss
Java libraries you can't afford to miss
Andres Almiray
Kotlin is charming; The reasons Java engineers should start Kotlin.
Kotlin is charming; The reasons Java engineers should start Kotlin.
JustSystems Corporation
Introduction kot iin
Introduction kot iin
Jedsada Tiwongvokul
JJUG CCC 2011 Spring
JJUG CCC 2011 Spring
Kiyotaka Oku
Jggug 2010 330 Grails 1.3 観察
Jggug 2010 330 Grails 1.3 観察
Tsuyoshi Yamamoto
The report of JavaOne2011 about groovy
The report of JavaOne2011 about groovy
Yasuharu Nakano
Boom! Promises/A+ Was Born
Boom! Promises/A+ Was Born
Domenic Denicola
Spock: A Highly Logical Way To Test
Spock: A Highly Logical Way To Test
Howard Lewis Ship
#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기
Arawn Park
Jason parsing
Jason parsing
parallelminder
Python and EM CLI: The Enterprise Management Super Tools
Python and EM CLI: The Enterprise Management Super Tools
Seth Miller
Web Crawling with NodeJS
Web Crawling with NodeJS
Sylvain Zimmer
Miracle of std lib
Miracle of std lib
Jedsada Tiwongvokul
What’s new in C# 6
What’s new in C# 6
Fiyaz Hasan
The Promised Land (in Angular)
The Promised Land (in Angular)
Domenic Denicola
Async Frontiers
Async Frontiers
Domenic Denicola
Python在豆瓣的应用
Python在豆瓣的应用
Qiangning Hong
Grails/Groovyによる開発事例紹介
Grails/Groovyによる開発事例紹介
Kiyotaka Oku
OneRing @ OSCamp 2010
OneRing @ OSCamp 2010
Qiangning Hong
Testing Backbone applications with Jasmine
Testing Backbone applications with Jasmine
Leon van der Grient
groovy & grails - lecture 2
groovy & grails - lecture 2
Alexandre Masselot
Spock
Spock
Evgeny Borisov
Auto-GWT : Better GWT Programming with Xtend
Auto-GWT : Better GWT Programming with Xtend
Sven Efftinge
History of jQuery
History of jQuery
jeresig
Ian 20150116 java script oop
Ian 20150116 java script oop
LearningTech
Gwt and Xtend
Gwt and Xtend
Sven Efftinge
Spock Testing Framework - The Next Generation
Spock Testing Framework - The Next Generation
BTI360
Asynchronous programming done right - Node.js
Asynchronous programming done right - Node.js
Piotr Pelczar
Asynchonicity: concurrency. A tale of
Asynchonicity: concurrency. A tale of
Joel Lord
Kotlin : Advanced Tricks - Ubiratan Soares
Kotlin : Advanced Tricks - Ubiratan Soares
iMasters
Weitere ähnliche Inhalte
Was ist angesagt?
#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기
Arawn Park
Jason parsing
Jason parsing
parallelminder
Python and EM CLI: The Enterprise Management Super Tools
Python and EM CLI: The Enterprise Management Super Tools
Seth Miller
Web Crawling with NodeJS
Web Crawling with NodeJS
Sylvain Zimmer
Miracle of std lib
Miracle of std lib
Jedsada Tiwongvokul
What’s new in C# 6
What’s new in C# 6
Fiyaz Hasan
The Promised Land (in Angular)
The Promised Land (in Angular)
Domenic Denicola
Async Frontiers
Async Frontiers
Domenic Denicola
Python在豆瓣的应用
Python在豆瓣的应用
Qiangning Hong
Grails/Groovyによる開発事例紹介
Grails/Groovyによる開発事例紹介
Kiyotaka Oku
OneRing @ OSCamp 2010
OneRing @ OSCamp 2010
Qiangning Hong
Testing Backbone applications with Jasmine
Testing Backbone applications with Jasmine
Leon van der Grient
groovy & grails - lecture 2
groovy & grails - lecture 2
Alexandre Masselot
Spock
Spock
Evgeny Borisov
Auto-GWT : Better GWT Programming with Xtend
Auto-GWT : Better GWT Programming with Xtend
Sven Efftinge
History of jQuery
History of jQuery
jeresig
Ian 20150116 java script oop
Ian 20150116 java script oop
LearningTech
Gwt and Xtend
Gwt and Xtend
Sven Efftinge
Spock Testing Framework - The Next Generation
Spock Testing Framework - The Next Generation
BTI360
Asynchronous programming done right - Node.js
Asynchronous programming done right - Node.js
Piotr Pelczar
Was ist angesagt?
(20)
#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기
Jason parsing
Jason parsing
Python and EM CLI: The Enterprise Management Super Tools
Python and EM CLI: The Enterprise Management Super Tools
Web Crawling with NodeJS
Web Crawling with NodeJS
Miracle of std lib
Miracle of std lib
What’s new in C# 6
What’s new in C# 6
The Promised Land (in Angular)
The Promised Land (in Angular)
Async Frontiers
Async Frontiers
Python在豆瓣的应用
Python在豆瓣的应用
Grails/Groovyによる開発事例紹介
Grails/Groovyによる開発事例紹介
OneRing @ OSCamp 2010
OneRing @ OSCamp 2010
Testing Backbone applications with Jasmine
Testing Backbone applications with Jasmine
groovy & grails - lecture 2
groovy & grails - lecture 2
Spock
Spock
Auto-GWT : Better GWT Programming with Xtend
Auto-GWT : Better GWT Programming with Xtend
History of jQuery
History of jQuery
Ian 20150116 java script oop
Ian 20150116 java script oop
Gwt and Xtend
Gwt and Xtend
Spock Testing Framework - The Next Generation
Spock Testing Framework - The Next Generation
Asynchronous programming done right - Node.js
Asynchronous programming done right - Node.js
Ähnlich wie Stubる - Mockingjayを使ったHTTPクライアントのテスト -
Asynchonicity: concurrency. A tale of
Asynchonicity: concurrency. A tale of
Joel Lord
Kotlin : Advanced Tricks - Ubiratan Soares
Kotlin : Advanced Tricks - Ubiratan Soares
iMasters
What's new in Liferay Mobile SDK 2.0 for Android
What's new in Liferay Mobile SDK 2.0 for Android
Silvio Gustavo de Oliveira Santos
Asynchronicity: concurrency. A tale of
Asynchronicity: concurrency. A tale of
Joel Lord
HTML5 APIs - Where no man has gone before! - Altran
HTML5 APIs - Where no man has gone before! - Altran
Robert Nyman
Build Lightweight Web Module
Build Lightweight Web Module
Morgan Cheng
async/await in Swift
async/await in Swift
Peter Friese
JavaScript Unit Testing with Jasmine
JavaScript Unit Testing with Jasmine
Raimonds Simanovskis
JavaScript Testing for Rubyists
JavaScript Testing for Rubyists
Jamie Dyer
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門
lestrrat
Creating a Facebook Clone - Part XXVII - Transcript.pdf
Creating a Facebook Clone - Part XXVII - Transcript.pdf
ShaiAlmog1
JavaScript Promise
JavaScript Promise
Joseph Chiang
Hd insight programming
Hd insight programming
Casear Chu
Simplify AJAX using jQuery
Simplify AJAX using jQuery
Siva Arunachalam
Client server part 12
Client server part 12
fadlihulopi
HTML5 APIs - Where No Man Has Gone Before! - GothamJS
HTML5 APIs - Where No Man Has Gone Before! - GothamJS
Robert Nyman
Unsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST API
Mikhail Egorov
Using and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middleware
Alona Mekhovova
Paris js extensions
Paris js extensions
erwanl
RingoJS
RingoJS
Oleg Podsechin
Ähnlich wie Stubる - Mockingjayを使ったHTTPクライアントのテスト -
(20)
Asynchonicity: concurrency. A tale of
Asynchonicity: concurrency. A tale of
Kotlin : Advanced Tricks - Ubiratan Soares
Kotlin : Advanced Tricks - Ubiratan Soares
What's new in Liferay Mobile SDK 2.0 for Android
What's new in Liferay Mobile SDK 2.0 for Android
Asynchronicity: concurrency. A tale of
Asynchronicity: concurrency. A tale of
HTML5 APIs - Where no man has gone before! - Altran
HTML5 APIs - Where no man has gone before! - Altran
Build Lightweight Web Module
Build Lightweight Web Module
async/await in Swift
async/await in Swift
JavaScript Unit Testing with Jasmine
JavaScript Unit Testing with Jasmine
JavaScript Testing for Rubyists
JavaScript Testing for Rubyists
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門
Creating a Facebook Clone - Part XXVII - Transcript.pdf
Creating a Facebook Clone - Part XXVII - Transcript.pdf
JavaScript Promise
JavaScript Promise
Hd insight programming
Hd insight programming
Simplify AJAX using jQuery
Simplify AJAX using jQuery
Client server part 12
Client server part 12
HTML5 APIs - Where No Man Has Gone Before! - GothamJS
HTML5 APIs - Where No Man Has Gone Before! - GothamJS
Unsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST API
Using and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middleware
Paris js extensions
Paris js extensions
RingoJS
RingoJS
Mehr von Kenji Tanaka
FatViewControllerを安全に書き換える方法が見つからなかったので、どういう痛みを許容するか考えた #iosdc
FatViewControllerを安全に書き換える方法が見つからなかったので、どういう痛みを許容するか考えた #iosdc
Kenji Tanaka
リリース前のリグレッションテストがめんどい!のでMagic PodでUIテストを試してみる #pixiv_app_night
リリース前のリグレッションテストがめんどい!のでMagic PodでUIテストを試してみる #pixiv_app_night
Kenji Tanaka
ポストモーテムやってみた #yjbonfire
ポストモーテムやってみた #yjbonfire
Kenji Tanaka
2つの同期 4つの状態 #pixiv_ios_arch
2つの同期 4つの状態 #pixiv_ios_arch
Kenji Tanaka
2つの同期 4つの状態 #app_mp
2つの同期 4つの状態 #app_mp
Kenji Tanaka
2つの同期 4つの状態 #roppongiswift
2つの同期 4つの状態 #roppongiswift
Kenji Tanaka
トークンリフレッシュ処理を含むAPIClientのテスト #hakata_test_night
トークンリフレッシュ処理を含むAPIClientのテスト #hakata_test_night
Kenji Tanaka
よく使うテストヘルパーの紹介 #ios_test_night
よく使うテストヘルパーの紹介 #ios_test_night
Kenji Tanaka
Swiftで聞いておぼえるテスト書き
Swiftで聞いておぼえるテスト書き
Kenji Tanaka
設計時空のリファクタリング
設計時空のリファクタリング
Kenji Tanaka
WACATE 2018 Summer
WACATE 2018 Summer
Kenji Tanaka
テスト駆動開発入門 by Swift
テスト駆動開発入門 by Swift
Kenji Tanaka
An iOS Engineer challenges Web.
An iOS Engineer challenges Web.
Kenji Tanaka
エンジニアのためのブログ講座Ver4
エンジニアのためのブログ講座Ver4
Kenji Tanaka
TDDやってみよ
TDDやってみよ
Kenji Tanaka
ストレス社会に生きる、iOSエンジニアにオススメする百合の世界と作品
ストレス社会に生きる、iOSエンジニアにオススメする百合の世界と作品
Kenji Tanaka
節子、それViewControllerやない...、FatViewControllerや...。
節子、それViewControllerやない...、FatViewControllerや...。
Kenji Tanaka
iOS 11からのDeviceCheck #とは
iOS 11からのDeviceCheck #とは
Kenji Tanaka
設計に答えはないから探してみよう
設計に答えはないから探してみよう
Kenji Tanaka
iOS 11からのアプリ間ファイル共有
iOS 11からのアプリ間ファイル共有
Kenji Tanaka
Mehr von Kenji Tanaka
(20)
FatViewControllerを安全に書き換える方法が見つからなかったので、どういう痛みを許容するか考えた #iosdc
FatViewControllerを安全に書き換える方法が見つからなかったので、どういう痛みを許容するか考えた #iosdc
リリース前のリグレッションテストがめんどい!のでMagic PodでUIテストを試してみる #pixiv_app_night
リリース前のリグレッションテストがめんどい!のでMagic PodでUIテストを試してみる #pixiv_app_night
ポストモーテムやってみた #yjbonfire
ポストモーテムやってみた #yjbonfire
2つの同期 4つの状態 #pixiv_ios_arch
2つの同期 4つの状態 #pixiv_ios_arch
2つの同期 4つの状態 #app_mp
2つの同期 4つの状態 #app_mp
2つの同期 4つの状態 #roppongiswift
2つの同期 4つの状態 #roppongiswift
トークンリフレッシュ処理を含むAPIClientのテスト #hakata_test_night
トークンリフレッシュ処理を含むAPIClientのテスト #hakata_test_night
よく使うテストヘルパーの紹介 #ios_test_night
よく使うテストヘルパーの紹介 #ios_test_night
Swiftで聞いておぼえるテスト書き
Swiftで聞いておぼえるテスト書き
設計時空のリファクタリング
設計時空のリファクタリング
WACATE 2018 Summer
WACATE 2018 Summer
テスト駆動開発入門 by Swift
テスト駆動開発入門 by Swift
An iOS Engineer challenges Web.
An iOS Engineer challenges Web.
エンジニアのためのブログ講座Ver4
エンジニアのためのブログ講座Ver4
TDDやってみよ
TDDやってみよ
ストレス社会に生きる、iOSエンジニアにオススメする百合の世界と作品
ストレス社会に生きる、iOSエンジニアにオススメする百合の世界と作品
節子、それViewControllerやない...、FatViewControllerや...。
節子、それViewControllerやない...、FatViewControllerや...。
iOS 11からのDeviceCheck #とは
iOS 11からのDeviceCheck #とは
設計に答えはないから探してみよう
設計に答えはないから探してみよう
iOS 11からのアプリ間ファイル共有
iOS 11からのアプリ間ファイル共有
Kürzlich hochgeladen
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Enterprise Knowledge
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Roshan Dwivedi
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Delhi Call girls
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
debabhi2
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Igalia
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
gurkirankumar98700
Kürzlich hochgeladen
(20)
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Stubる - Mockingjayを使ったHTTPクライアントのテスト -
1.
2.
📦
3.
📦
4.
5.
6.
7.
8.
9.
10.
import Alamofire import Mockingjay import
Quick import Nimble @testable import Hoge
11.
class HogeSpec: QuickSpec
{ override func spec() { describe("hoge") { context("fuga") { it("piyo") { } } } } }
12.
context("fuga") { beforeEach { self.stub({
request in return request.url?.host == "hogefugapiyo.com" }, { request in let response = HTTPURLResponse( url: request.url!, statusCode: 200, httpVersion: nil, headerFields: nil) let path = Bundle(for: type(of: self)) .path(forResource: "piyo", ofType: "json")! let url = URL(fileURLWithPath: path) let data = try! Data(contentsOf: url) return .success(response!, .content(data)) }) } }
13.
it("piyo") { let request
= Alamofire.request("https://hogefugapiyo.com") var expectation: Any? = nil waitUntil { done in request.responseJSON { response in switch response.result { case .success(let json): expectation = json print("success: (json)") case .failure(let error): print("failure: (error)") } expect(expectation).toNot(beNil()) done() } } }
14.
15.
Jetzt herunterladen