DrainOpener
DrainOpener

Reputation: 196

Fastlane Integration with Xcode

I am trying to integrate for my sample project UberClone with Fastlane. I have 3 Targets

UberClone

UberCloneTest

UberCloneUITest


I created fastfile as below and downloaded fastlane but I need your help for integrate fastlane tests are okay or not. How can I build this file ?

  default_platform(:ios)


platform :ios do
# 1
  desc "ui test and unit tests need to check"
# 2
  lane :create_app do
# 3
​    produce
  end
end

Upvotes: 1

Views: 527

Answers (1)

Justin
Justin

Reputation: 1378

To run tests see https://docs.fastlane.tools/getting-started/ios/running-tests/

To run Swiftlint see https://docs.fastlane.tools/actions/swiftlint/

I’d really recommend reading through the fastlane documentation. It can be hard to grasp at first but it gets easier to understand lanes and all the functionality. See https://docs.fastlane.tools/getting-started/ios/setup/ and I also recommend checking out fastlane’s github samples.

For example to run swiftlint and then unit and UI tests run fastlane tests

default_platform(:ios)


platform :ios do

  lane :tests do
    swiftlint()
​    run_tests(scheme: "UberCloneTest")
​    run_tests(scheme: "UberCloneUITest")
  end
end

Upvotes: 1

Related Questions