Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Better AppStore rating

Khoa Pham
February 06, 2020

Better AppStore rating

- Automate screenshot capturing
- AppStore review
- BDD testing with Spek
- Automate with Puma

Khoa Pham

February 06, 2020
Tweet

More Decks by Khoa Pham

Other Decks in Programming

Transcript

  1. RATING AND REVIEW > Rate 1 to 5 stars >

    Optionally write a review > Specific to each country on the App Store > Can reset summary rating when submit new version release > Past written reviews remain
  2. TRACK USER REVIEW? > Use provided dialog > Can request

    max 3 times a year > Out of process, not available to view debugging or other inspections
  3. TIPS > Respond to reviews > Prioritize reviews > Choose

    when to ask > Link to AppStore review page > A/B testing
  4. SPEK import XCTest @testable import Spek final class SpekTests: XCTestCase

    { func testExample() { var left = 1 var right = 1 spec { Describe("math") { BeforeEach { left = 2 } Describe("basic") { BeforeEach { right = 3 } AfterEach { } It("adds correctly") { XCTAssertEqual(left + right, 5) } It("multiplies correctly") { XCTAssertEqual(left * right, 6) } } } } } }
  5. XCATTACHMENT func takeScreenshot(_ name: String) { let screenshot = XCUIScreen.main.screenshot()

    let attachment = XCTAttachment(screenshot: screenshot) attachment.lifetime = .keepAlways attachment.name = name add(attachment) }
  6. UITESTS SCHEME > Run and Test actions > Application data

    > Routing App Coverage File > Application language > Application region
  7. LAUNCH ARGUMENTS final class ScreenshotUITests: XCTestCase { var app: XCUIApplication!

    override func setUp() { continueAfterFailure = false app = XCUIApplication() app.launchArguments.append("--uitesting") app.launch() } }
  8. XCRESULT Xcode 11 release notes The format of result bundles

    changed in Xcode 11. A result bundle is an asset produced by Xcode 11 with the xcresult file extension that contains information about the build, tests, code coverage, and more
  9. TESTING IN XCODE 11 WWDC 2019 Testing in Xcode >

    Test plan > Gather screenshots for localization
  10. PUMA SCREENSHOT TASK Screenshot { $0.configure( projectType: .project("TestApp"), appScheme: "TestApp",

    uiTestScheme: "TestAppUITests", saveDirectory: Directory.downloads.appendingPathComponent("PumaScreenshots").path ) $0.add(scenarios: [ .init( destination: .init( name: Destination.Name.iPhone11, platform: Destination.Platform.iOSSimulator, os: Destination.OS.iOS13_2_2 ), language: Language.en_US, locale: Locale.en_US ), .init( destination: .init( name: Destination.Name.iPhone11Pro, platform: Destination.Platform.iOSSimulator, os: Destination.OS.iOS13_2_2 ), language: Language.ja, locale: Locale.ja ) ]) }
  11. BUILD TOOL WITH PUMA swift package init --type executable swift

    package generate-xcodeproj swift build swift run