Welcome! This Plugin reduce your time that waste by write test code. We provide some kind of patterns that is you often used
You must install kotest and mockk library in your project, Currently, we support only kotest and mockk
Currently, This Plugin is beta version!
It's very convenient tool. it can create test boilerplate.
It's easily accessible, we provide shortcut keymap cmd + shift + t
that you used to create test classes.
Generally, we mock every property that be injected by other when we create unit-test.
- you should check method mock check box if you want to get method name for test
Version[0.0.1]
- Unit Test Boiler Plate
- Support FunSpec, Behaviour Spec, FreeSpec
- Auto Mocking Properties which is contained specific class
- Bug fix
Version[0.0.2]
- Navigate to class that created by this library
- Create Option that can be selected relaxed option for mockk
Unfortunately, you can't contribute at this time. This Plugin need time to stabilize. But, you can contribute to some pattern that used to create some test code We want to be in a state where we can get other people's contributions as soon as possible.
If you want to report some pattern that you are frequently used when creating a test class, then Follow the process below
- [Issue] - [New Issue]
- Write title ("My Unit Test Boiler Plate Pattern ...")
- Write sudo code by kotlin styles.
// This is not test class
@Service
class OrderService(private val repository: OrderRepsoitory) {
fun order() {
// doSome ...
}
}
// This is test class that be made by kotlin-boilerplate plugins
class OrderServiceTestClass : FunSpec({
val mockRepository: OrderRepsoitory = mock<>(relaxed = true)
// SUT
val orderService = OrderService(mockRepository)
})