Skip to content

Commit 7055523

Browse files
Update Readme
1 parent 24524e2 commit 7055523

File tree

1 file changed

+9
-39
lines changed

1 file changed

+9
-39
lines changed

README.md

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,25 @@
1-
![](https://github.com/michallaskowski/kuiks/workflows/Run%20tests/badge.svg?branch=master)
2-
3-
# Kuiks
1+
# Mokttp
42

53
## What is it
64

7-
Kuiks is a framework for automated UI tests. It uses [Kotlin Multiplatform](https://kotlinlang.org/docs/reference/multiplatform.html) to create common interface for [Espresso](https://developer.android.com/training/testing/espresso) and [XCTest's UI](https://developer.apple.com/documentation/xctest/user_interface_tests) invocations.
8-
You could say it is similar to [Appium](https://appium.io/), as the end goal is the same - write tests for many platforms, once. But, Appium relies on [WebDriver](https://w3c.github.io/webdriver/) protocol to provide run-time invocations on chosen UI testing drivers (as of now, by default Espresso on Android and XCUITest on iOS).
5+
Mokttp is Kotlin Multiplatform wrapper around libraries that are creating a local web server. On Android it wraps [OkHttp's MockWebServer](https://github.com/square/okhttp/tree/master/mockwebserver/), on iOS it's [GCDWebServer](https://github.com/swisspol/GCDWebServer).
96

10-
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.**
7+
It is not a desired and final solution, since there is an additional setup needed on Kotlin Native for GCDWebServer, and the ideal approach would be to use [Ktor Server when it supports platforms other than JVM](https://github.com/ktorio/ktor/issues/571).
118

129
## When it can be useful
1310

14-
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.
15-
16-
## How do I use it to test my app
11+
The main goal is to enable mocking and stubbing server response for UI testing, in combination with [Kuiks](https://github.com/michallaskowski/kuiks). But if you find having a local HTTP server useful in your app, feel free to use it.
1712

18-
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.
19-
20-
## How to build and launch sample tests
13+
## How to build and launch samples
2114

2215
Clone the repo first.
23-
The samples contain simple button and lists. RecyclerView on Android, and UITableViewController on iOS. There are also tests using those UI elements.
24-
25-
### Android
26-
27-
* Open Android Studio.
28-
* Open the project at the root of cloned repository.
29-
* Make sure you have at least one emulator.
30-
* Run tests from `sample-android` project.
31-
One of: `InheritedTests`, `InstrumentedTests` or `TestsFactoryTests`.
32-
33-
### iOS
34-
35-
As with anything that is used for development for Apple's devices, you need to do it on macOS.
36-
37-
* 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.
38-
(xctest.def [cinterop file](https://kotlinlang.org/docs/reference/native/c_interop.html) for XCUITest is a static file, and right now `xcode-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](https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#publishing-a-multiplatform-library).)
39-
Tested with Xcode11.3 symlinked to /Applications/Xcode.app
40-
* Open `sample-ios/SampleiOS.xcodeproj` project.
41-
* Run tests on `SampleiOS` scheme. `SampleiOSUITests` uses a custom `DelegatingTestBase` to run tests from `sharedTests.TextExample` class.
16+
The samples contain simple segmented control/radio buttons and a button to make a call to real or mocked servers. Currently it lists contributors from the [Kuiks](https://github.com/michallaskowski/kuiks) project, which can be also provided by a local HTTP server.
4217

4318
## Contributing
4419

45-
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
46-
Please make sure to update samples and tests as appropriate.
20+
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
21+
Please make sure to update samples as appropriate.
4722

4823
## Roadmap
4924

50-
* Add more native controls and cases into samples, for example date/time picker.
51-
* 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.
52-
* Smarter after more complicated cases revisit current public API.
53-
* Publish to a Maven repository.
54-
* Gather feedback.
55-
* Find contributors more familiar with Android, Espresso, Kotlin and Gradle.
25+
* Make sure it works well with Kuiks, and enhance if needs arise.

0 commit comments

Comments
 (0)