Fastlane snapshot presentation

Post on 06-Jan-2017

2.997 views 0 download

Transcript of Fastlane snapshot presentation

FastlaneAutomation done right

- Snapshot -

FastlaneConnecter tous les outils

de build entre euxDéploiement d’une app

en un "clic"

FastlaneConnecter tous les outils

de build entre euxDéploiement d’une app

en un "clic"

FastlaneConnecter tous les outils

de build entre eux

Uploader les métadatas et l’ipa

de l’app sur l’appStore

Automatiser les screenshots localisés

de l’app

Ajouter les device frames aux screenshots

Déploiement d’une app en un "clic"

- Pourquoi automatiser les screenshots ? -

Pour une app : - 5 screenshots / device - jusqu’à 6 tailles de device

=> 30 screenshots / langue

- Installation -

Intégré à Fastlane

Possibilité d’installation en stand alone

sudo gem install snapshot

⚠ Nécessite les command line tool Xcode

xcode-select --install

- Intégration au projet -

$ cd project_root $ snapshot init

- Intégration au projet -

$ cd project_root $ snapshot init

Dans XCode : → Créer un nouveau UI Test target

- Configuration du projet -

Dans XCode : → Ajouter au projet le fichier SnapshotHelper.swift

Objective-C: Ajouter l’import #import "SnapshotDemoUiTests-Swift.h" à la classe de test

- Configuration du projet -

Dans XCode : → Ajouter le code d’initialisation de l’app dans le setup()

Swiftlet app = XCUIApplication() setupSnapshot(app) app.launch()

Objective-CXCUIApplication *app = [[XCUIApplication alloc] init]; [Snapshot setupSnapshot:app]; [app launch];

- Configuration du projet -

Dans XCode : → Créer le scénario de test dans la méthode testExample(). 🔴

- Configuration du projet -

- Configuration du projet -

Dans XCode : → Ajouter la création de screenshots dans le scénario de test généré.

snapshot("screenshot_filename")

- Configuration -

Fichier Snapfile :

→ Workspace/Project → Scheme → Devices → Output_directory → Clear_previous_screenshots → Reinstall_app

- Exécution -

$ cd project_root $ snapshot

- Outputs -

- Sortie Console

- Outputs -

- Sortie Console - Dossiers localisés

- Outputs -

- Sortie Console - Dossiers localisés - Rapport HTML

- Installation -

Intégré à Fastlane

Possibilité d’installation en stand alone

sudo gem install frameit

⚠ Nécessite les command line tool Xcode

xcode-select --install

brew install imagemagick

Nécessite imagemagick

- Exécution -

frameit

- Exécution -

frameit

- Première exécution -

Téléchargement et installation des device frames manuelle… Mais guidée

- Résultat -

Ajout au répertoire screenshots

- Configuration -

Fichier : - FrameFile.json - title.strings - keyword.strings

Ajout de :- Background - Texte - Padding

- Fastfile -

Upload automatique

skip_screenshots: false, screenshots_path: "..."

FastlaneAutomation done right

- Questions ? -

FastlaneAutomation done right

- Merci -