Running individual XCTest (UI, Unit) test cases for iOS apps from the command line -
is possible run individual test cases, or individual test suites, ios app test target, instead of test cases, command line interface?
you can run tests command line xcodebuild, out of box. when so, run of test cases contained in test target you've selected.
you can scan fastlane, though believe you're restricted running of tests of build scheme select (as above), it's not different xcodebuild.
you can run specific tests xctool facebook, doesn't use xcodebuild, , restricted running on simulators only, not actual ios test devices.
i found reference running xctest command line utility directly, seems undocumented feature , targets deriveddata. complicated fact ui tests, have *xctest files in separate xctrunner bundle.
i in similar situation , have built python script triggers set of test case/s want. little bit elaborate process works me , has been useful on time in implementing dataprovider methods, rerunning of failed test cases , other customizations required.
some relevant steps want achieve.
- override testinvocations method present in xctestcase below steps
- in method read environment variable xxxx.
- this environment variable comma separated test case method names.
- now create nsinvocations each test method want trigger.
- return array of invocations.
- how pass environment variable?
- in scheme add environment variable named xxxx.
- scheme files standard xml files, write script modifies scheme file contain comma separated values in environment variable.
if require more info add comment reply it.
Comments
Post a Comment