michallaskowski / kuiks

Kotlin Multiplatform based testing framework for Android and iOS
Apache License 2.0
71 stars 10 forks source link

Help setting up Project #3

Open Ashraf-Ali-aa opened 4 years ago

Ashraf-Ali-aa commented 4 years ago

@michallaskowski I really like the idea of using one code base to test iOS and Android, I was wondering is there anything I would need to do to set up this for my own project?

michallaskowski commented 4 years ago

Hey. I was just today helping to run it for my colleague, so I know I need to update Readme for iOS, if you would like to run the sample. It is about updating code signing. About using it in your project, it is on the TODO list and I was waiting if someone was interested, and here you are :) So I think I need to start investigating how to correctly publish the artifacts, which I will start today or tomorrow. In the meantime, you can always clone this repository, and run ./gradlew publishToMavenLocal and use those artifacts in your project. BUT, as in Readme, this project is right now in early development, with plans to work on it. So I would not use it yet for anything serious. Unless you want to help find issues, or help to solve them, which would be great.

Ashraf-Ali-aa commented 4 years ago

I would love to get involved in the project, that's why I wanted to understand how the framework works

michallaskowski commented 4 years ago

I would start with Readme, my plan was to go through the project tomorrow with some of my colleagues, so that I have some feedback from them. If you have any questions, you can ask them here, in this issue. There should be nothing stopping you right now to start using sample apps on Android Emulator, or iOS simulator. Some prior knowledge about Android Studio or Xcode will be helpful, and Kotlin Multiplatform too (there is link in Readme). If you start from Readme and sample apps, and look at the code of tests, that will be enough I think. And if you have any specific questions, I will be happy to answer and update Readme at the same time.

Ashraf-Ali-aa commented 4 years ago

@michallaskowski I was wondering when using intelliJ is it possible to access XCTest options using the auto complete

image
michallaskowski commented 4 years ago

Hey, so we gave it a go with some of my colleagues on Friday/Saturday, and there was no issue to run it on emulators or simulators. When it comes to XCTest options, I have a few question.

  1. Are you on a machine running macOS (MacBook, Mac Pro, iMac)?
  2. Is Xcode installed, and if it is, in which version, and where. As in readme, you need at least symlink to /Application/Xcode.app . Which version is default will be known by running xcode-select -p
  3. Are you able to open sample-ios xcodeproject and build it?
Ashraf-Ali-aa commented 4 years ago

@michallaskowski Hi I have managed to resolve the issue by using android studio (3.6.1), I was using a MacBook pro and Xcode was correctly setup.

I was wondering is it possible to run the iOS UI tests from IntelliJ IDE (I know this is possible on Xcode) i.e start a simulator and use breakpoints etc to debug issues, I wanted to create a standard UI automation API similar to XCUITest API for both iOS and Android so that anyone can write UI tests for both platforms.

Ashraf-Ali-aa commented 4 years ago

@michallaskowski it looks like it might be possible to add ios simulator support using this https://github.com/flutter/flutter-intellij

michallaskowski commented 4 years ago

As far as I know it is possible to run unit tests, but I don't think running UI tests is possible, at least right now. I guess it should be possible to create a custom gradle task that would make it happen, but I am not sure about debugging. JetBrains announced that there will be a special plugin for Android Studio that will allow debugging of Kotlin Native apps, but it is yet to be published. Soon I will announce existence of this framework on the Kotlin's Slack channel, and I will also start asking related questions. As for the Flutter plugin, it is a totally different plugin for different frameworks. Maybe there is something that could be reused, but I don't see how it could be useful right now, in its current form. Feel free to investigate along that direction, if you feel it is worth it.