Kuiks is a framework for automated UI tests. It uses Kotlin Multiplatform to create common interface for Espresso and XCTest's UI invocations.
You could say it is similar to Appium, as the end goal is the same - write tests for many platforms, once. But, Appium relies on WebDriver protocol to provide run-time invocations on chosen UI testing drivers (as of now, by default Espresso on Android and XCUITest on iOS).
Kuiks, thanks to Kotlin Multiplatform, provides compile time bridge to the same native UI drivers, and it does not use WebDriver protocol, or any other HTTP protocol, proxies or servers in between. Meaning, you can run your tests directly from your IDE.
Kuiks is still in an early development phase, and can change a lot. The goal is to have the most reliable, and fastest UI tests possible. With current implementation it is possible to test (or try to) anything that Espresso and XCUITest can test, which are Android, iOS, tvOS, and macOS apps. Currently development is focused on iOS and Android apps, as having similar apps for those platforms is most common.
Artifacts are not yet published to any Maven repository. This can and will happen, if there is anyone interested. Feel free to open an issue if you need it.
Clone the repo first. The samples contain simple button and lists. RecyclerView on Android, and UITableViewController on iOS. There are also tests using those UI elements.
- Open Android Studio.
- Open the project at the root of cloned repository.
- Make sure you have at least one emulator.
- Run tests from
sample-android
project.
One of:InheritedTests
,InstrumentedTests
orTestsFactoryTests
.
As with anything that is used for development for Apple's devices, you need to do it on macOS.
- Make sure you have Xcode installed, under /Applications/Xcode.app, or you have /Applications/Xcode.app symlink pointing to Xcode installation. Some people, including me, have multiple Xcodes installed, and none under default Xcode.app name.
(xctest.def cinterop file for XCUITest is a static file, and right nowxcode-select -p
is not used to set Xcode's installation path before invoking compilation. Not sure yet how it would even work for published libraries.)
Tested with Xcode11.3 symlinked to /Applications/Xcode.app - Open
sample-ios/SampleiOS.xcodeproj
project. - Run tests on
SampleiOS
scheme.SampleiOSUITests
uses a customDelegatingTestBase
to run tests fromsharedTests.TextExample
class.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update samples and tests as appropriate.
- Add more native controls and cases into samples, for example date/time picker.
- Add cases where Android and iOS samples have different flow or UI, to make sure differences between platforms can be handled in shared tests, on platform level.
- Smarter after more complicated cases revisit current public API.
- Publish to a Maven repository.
- Gather feedback.
- Find contributors more familiar with Android, Espresso, Kotlin and Gradle.