Kotlin Web Framework for the JVM

Related tags

Testing kara
Overview

Kara Web Framework

Kara is a web framework for the JVM written in Kotlin. It enables developers to build succinct, type-safe HTML and CSS all in one language.

The article Type-safe Web with Kotlin by Andrey Breslav illustrates the benefits of such a framework.

Check out karaframework.com to get a quick overview of the project. (Caution: Some contents are outdated.)

Authors

The project was started by Tiny Mission, a small web and mobile development company hoping to use Kara as a help to work faster and write better code.

Currently, it is actively developed by JetBrains, the company behind Kotlin.

Contributing

There's plenty of work left to do to make Kara a first class framework, and we'd welcome contributions. Contact andy at tinymission.com to get involved.

License

Kara is Open Source and licensed under the Apache Licenses, version 2.0. It can be freely used in commercial projects.

Run the sample

Download the repository, load the project in IntelliJ IDEA (can take a while), then choose the "Sample Server" configuration in the toolbar and run it.

You can now open the sample web page at http://localhost:3000.

Comments
  • Typesafe URLs refactoring

    Typesafe URLs refactoring

    Introduced Request - an object, that handles route and it's actual parameters. Request also has handler associated. All requests are listed in a hierarchal manner in application global Routes object a-la Rails or Play! routes.conf In some simple cases Controller instance becomes unnecessary since one can handle request directly in inline handler provided. HtmlLayout for the request result is chosen from the nearest object, that has layout property defined.

    The documentation is not yet updated.

    opened by shafirov 16
  • Fixed compile failure.

    Fixed compile failure.

    Fixed compile failure. I am very inexperienced with Kotlin and only tinkering, so this may be a very non-idiomatic fix. I tried fixing it while maintaining the forEach construct, but the type decomposition just didn't seem to want to work.

    opened by rcurtis 1
  • More changes on packing and debugging

    More changes on packing and debugging

    I simplified startup scripts by moving most code from .bat and .sh into Java code. On top of it I also implemented a shared run configuration that starts kara debug server with the application

    The only way to run/debug of kara is to use kara_dist artifact output, i.e. out/artifacts/kara_dist folder. Before that once need to make kara_dist artifact in IDEA

    Meanwhile I switched TeamCity build to generate package with use of IDEA artifacts

    opened by jonnyzzz 1
  • Fix project generation templates and readme

    Fix project generation templates and readme

    I updated templates of modules generation to reflect changes I made for project packaging. There was a missing point in the readme to notice one should specify IDEA path variable to point to kara home I also added a small fix to make HTML views set content type to HTML

    opened by jonnyzzz 0
  • More polishing of project structure and building

    More polishing of project structure and building

    drop root module, updated VCS settings added fix crlf for kara and kara.bat files, reverted all modules output paths to IDEA-default move scripts to bin folder

    opened by jonnyzzz 0
  • Implement packaging of the tool with IDEA artifacts

    Implement packaging of the tool with IDEA artifacts

    There were configuration duplication in current setup. It looks like kara.bat and kara.sh scripts ware designed to work only for local environment, so in the packaged Kara nothing worked

    I removed older artifacts (that were duplicated in build.xml) and created a set of new ones: kara-core, kara-exec, kara-dist and kara-dist-zip.

    It would be easy to generate kara-{version}.zip with help of TeamCity by setting artifact publishing rule out/artifacts/kara_dist => kara-%build.number%.zip

    I moved all .jar files into lib folder

    It's easy to assume that full kara package is deployed to out\artifacts\kara_dist folder

    opened by jonnyzzz 0
  • The first step for a built-in dependency manager

    The first step for a built-in dependency manager

    This is the first step for a built-in dependency manager. At the moment implementation is based on Ivy and simply provides a kara command "dependencies", which uses /ivy.xml file to resolve dependencies into /lib folder.

    opened by cheptsov 0
  • Polish project setup

    Polish project setup

    This patch contains

    • a fix for build.xml to use Ant feature instead of *nix system provided 'touch' utility, thus making project compile under Windows
    • I made test project reuse project JDK
    • I added a hint comment to the error that could happen if Kotlin annotations are not enabled
    opened by jonnyzzz 0
  • Removed exception message on KaraExec when not supplying arguments

    Removed exception message on KaraExec when not supplying arguments

    Think a runtime exception gives a bad impression that something is wrong with the app as opposed to incorrect usage, so replaced the exception with a simple println when not supplying any arguments.

    opened by hhariri 0
Owner
null
null 866 Dec 27, 2022
Test Automation of Energy Australia - Web application

Test Automation of Energy Australia - Web application Technology used - Kotlin, Java, Espresso, Android Run the test on local environment git clone ht

null 0 Feb 9, 2022
Powerful, elegant and flexible test framework for Kotlin with additional assertions, property testing and data driven testing

Kotest is a flexible and comprehensive testing tool for Kotlin with multiplatform support. To learn more about Kotest, visit kotest.io or see our quic

Kotest 3.8k Jan 3, 2023
Snapshot Testing framework for Kotlin.

KotlinSnapshot Snapshot Testing framework for Kotlin. What is this? Snapshot testing is an assertion strategy based on the comparision of the instance

Pedro Gómez 157 Nov 13, 2022
A programmer-oriented testing framework for Java.

JUnit 4 JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. For more infor

JUnit 8.4k Jan 9, 2023
Android Unit Testing Framework

Robolectric is the industry-standard unit testing framework for Android. With Robolectric, your tests run in a simulated Android environment inside a

Robolectric 5.6k Jan 3, 2023
PowerMock is a Java framework that allows you to unit test code normally regarded as untestable.

Writing unit tests can be hard and sometimes good design has to be sacrificed for the sole purpose of testability. Often testability corresponds to go

PowerMock 3.9k Jan 5, 2023
A powerful test framework for Android

Cafe A powerful test framework for Android named Case Automated Framework for Everyone. Home Page http://baiduqa.github.com/Cafe/ How to make Cafe dow

Baidu 367 Nov 22, 2022
A programmer-oriented testing framework for Java.

JUnit 4 JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. For more infor

JUnit 8.4k Dec 28, 2022
A powerful test framework for Android

Cafe A powerful test framework for Android named Case Automated Framework for Everyone. Home Page http://baiduqa.github.com/Cafe/ How to make Cafe dow

Baidu 367 Nov 22, 2022
PowerMock is a Java framework that allows you to unit test code normally regarded as untestable.

Writing unit tests can be hard and sometimes good design has to be sacrificed for the sole purpose of testability. Often testability corresponds to go

PowerMock 3.9k Jan 2, 2023
Raccoon is a lightweight response mocking framework that can be easily integrated into the Android UI tests.

Raccoon Medium Articles Checkout these article to get more insights about this library: How to integrate this in your Android Test Why Raccoon? There

Joseph James 52 Aug 15, 2022
Most popular Mocking framework for unit tests written in Java

Most popular mocking framework for Java Current version is 3.x Still on Mockito 1.x? See what's new in Mockito 2! Mockito 3 does not introduce any bre

mockito 13.6k Jan 4, 2023
Morsa: Jetpack Compose UI Testing Framework

Morsa: Jetpack Compose UI Testing Framework Test library to ease UI testing with Jetpack Compose Purpose This library aims to add some useful wrappers

HyperDevs 10 Dec 3, 2022
A micro mocking framework for KMP

Micro-Mock A micro Kotlin/Multiplatform Kotlin Symbol Processor that generates Mocks & Fakes. Limitations: Mocking only applies to interfaces Faking o

null 101 Jan 3, 2023
Kotlin wrapper for React Test Renderer, which can be used to unit test React components in a Kotlin/JS project.

Kotlin API for React Test Renderer Kotlin wrapper for React Test Renderer, which can be used to unit test React components in a Kotlin/JS project. How

Xavier Cho 7 Jun 8, 2022
A multiplatform assertion library for Kotlin

Atrium is an open-source multiplatform assertion library for Kotlin with support for JVM, JS and Android. It is designed to support multiple APIs, dif

Robert Stoll 439 Dec 29, 2022
Portable validations for Kotlin

Portable validations for Kotlin ✅ Type-safe DSL ?? Multi-platform support (JVM, JS) ?? Zero dependencies Installation For multiplatform projects: kotl

null 509 Dec 18, 2022
mocking library for Kotlin

Kotlin Academy articles Check the series of articles "Mocking is not rocket science" at Kt. Academy describing MockK from the very basics of mocking u

MockK 4.8k Jan 3, 2023