Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: Support .xctestrun from Test Plan #685

Closed
gleb-gusev opened this issue Mar 27, 2020 · 0 comments · Fixed by #1321
Closed

iOS: Support .xctestrun from Test Plan #685

gleb-gusev opened this issue Mar 27, 2020 · 0 comments · Fixed by #1321

Comments

@gleb-gusev
Copy link

XCode Version: 13.3.1
Flank Version: v8.1.0

Description:

it would be very useful to be able to use Test Plans with Flank.
At the moment getting the following error after building the UITestScheme and specifying .xctestrun of the Test Plan:

java.lang.ClassCastException: com.dd.plist.NSArray cannot be cast to com.dd.plist.NSDictionary
	at ftl.ios.Xctestrun.findTestNames(Xctestrun.kt:87)
	at ftl.ios.Xctestrun.findTestNames(Xctestrun.kt:73)
	at ftl.args.IosArgs$testShardChunks$2.invoke(IosArgs.kt:71)
	at ftl.args.IosArgs$testShardChunks$2.invoke(IosArgs.kt:28)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at ftl.args.IosArgs.getTestShardChunks(IosArgs.kt)
	at ftl.run.IosTestRunner$runTests$2.invokeSuspend(IosTestRunner.kt:44)
	at ftl.run.IosTestRunner$runTests$2.invoke(IosTestRunner.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:91)
	at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:180)
	at ftl.run.IosTestRunner.runTests(IosTestRunner.kt:25)
	at ftl.run.TestRunner.runTests(TestRunner.kt:56)
	at ftl.run.TestRunner.newRun(TestRunner.kt:343)
	at ftl.cli.firebase.test.ios.IosRunCommand$run$1.invokeSuspend(IosRunCommand.kt:43)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:241)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:270)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:79)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at ftl.cli.firebase.test.ios.IosRunCommand.run(IosRunCommand.kt:42)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1729)
	at picocli.CommandLine.access$900(CommandLine.java:145)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2101)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2068)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1935)
	at picocli.CommandLine.execute(CommandLine.java:1864)
	at ftl.Main$Companion.main(Main.kt:41)
	at ftl.Main.main(Main.kt)

Thank you!

@bootstraponline bootstraponline added this to the May 2020 milestone Mar 27, 2020
@bootstraponline bootstraponline modified the milestones: May 2020, June May 23, 2020
@zuziaka zuziaka self-assigned this Oct 19, 2020
@jan-goral jan-goral self-assigned this Oct 19, 2020
@mergify mergify bot closed this as completed in #1321 Dec 8, 2020
mergify bot pushed a commit that referenced this issue Dec 8, 2020
Fixes #685 

## Documentation
https://github.com/Flank/flank/blob/master/docs/feature/ios_test_plans.md

## Test Plan
> How do we know the code works?

From repository root:
```
. .env
flankScripts testArtifacts -b master resolve
flankScripts shell buildFlank
cd test_runner
flank ios run -c=./src/test/kotlin/ftl/fixtures/test_app_cases/flank-xctestrunv2-all.yml
```
Feel free to modify `flank-xctestrunv2-all.yml` to test possible edge-cases.

## Checklist

- [x] Documented
- [x] Unit tested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants