An android UI test library made in Kotlin
Kobaia is an Android library that provides an easy way to test UI with Kotlin. Built on top of UIAutomator2, it provides a simple and discoverable API, removing most of the boilerplate and verbosity of common UIAutomator tasks.
@get:Rule
val kobaiaRules = Kobaia(SplashActivity::class.java)
@Test
fun testApp() {
kobaiaRules.launchActivity()
assertTextExist("Kobaia")
assertTextExist("SKIP")
assertTextExist("NEXT")
textClick("SKIP")
textClick("GET STARTED")
textClick("LOG IN")
byDescription("Enter your email")?.text = "right_email@kobaia.com"
byDescription("Enter your password")?.text = "12345678"
textClick("ENTER")
assertTextExist("Welcome to Kobaia!")
}
- Behaviour Driven Development testing
- Kobaia is an high-level test library that create tests readable as close to what the user are doing with the app. So you can focus yours UI tests in a generic user interaction approach.
- Automatic wait for your UI
- Kobaia wait your UI be visible in the screen. Animations, long processes and networks requests doesn't need wait/sleep threads workarounds.
- Interact with elements outside your app
- Close the app and open and read an push notification? Or maybe test share a text message to an messenger app? It's easy with Kobaia.
Coming Soon
- build.gradle (Project: YourProjectName)
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
...
implementation 'com.github.AraujoJordan:Kobaia:x.x.x'
}
And that's it!
Coming Soon
MIT License
Copyright (c) 2020 Jordan L. A. Junior
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.