Hacker News new | past | comments | ask | show | jobs | submit login
Launch HN: Karate Labs (YC W22) – Open-Source API and UI Test Automation
102 points by ptrthomas on June 13, 2022 | hide | past | favorite | 36 comments
Hi HN, Peter here, founder of Karate Labs (https://karatelabs.io) joined by my co-founder Kapil. Karate is an open-source solution unifying API and UI test automation, including mock servers and performance testing (https://github.com/karatelabs/karate).

Back in 2016, I was part of the API platform team at Intuit. An issue had been slowing down the team: a particular test for a set of key services would randomly fail, and it was not clear if this was a problem with the test or if there was a genuine defect. The deeper I looked, the more the complexity around the test-suite freaked me out. It was using an in-house framework, which had evolved over years and the test depended on code in multiple files scattered across the workspace. It was clear that many programmers had attempted to fix it over the years. It was next to impossible to understand what the test was doing. There had to be a better way to express web-service functional tests, and I started thinking hard about it.

This gave birth to Karate, a scriptable framework combining API and UI test automation. It has seen world wide adoption as an open-source project, including 37 of the Fortune 500 companies (so far!). Companies that have written about how they use Karate include Walmart [1], Expedia [2], Adobe [3], Trivago [4], and Oktana [5].

Karate has its own Domain Specific Language, focused on writing tests with less code and in less time. This results in easy-to-read, maintainable tests, which are often simple enough for product owners to be able to contribute to. Karate also has powerful assertions (https://twitter.com/getkarate/status/1515657727913377798 ), runs tests in parallel, and can reuse API tests as performance tests, which saves time compared to rewriting performance tests using a second tool. The UI automation space is crowded, but there are very few tools that do all three: API, UI and performance testing.

Last year, we decided to leave our day-jobs and work full-time on Karate. We incorporated Karate Labs as a for-profit company with an open-core business model in mind. In recent weeks, we've released our first two open-core products.

Karate Studio can import Postman collections, Swagger, OpenAPI, HAR and cURL. Once imported, you can preview an API sequence and edit it using an intuitive no-code interface. You can then export it as a ready-to-run Karate feature file that you can integrate into your existing CI/CD or DevOps pipeline. If you already have a set of Postman collections, you can migrate them to Karate and get the benefits of parallel execution, powerful assertions and performance testing. If team members prefer Postman for exploratory testing, they can use Studio to convert their draft collections into full-fledged API automation suites, complete with assertions for complex business logic, and then use them in regression test suites. Studio can also export back to Postman if needed. It is available for a 7-day free trial at https://studio.karatelabs.io, and you can see a demo video here: https://www.youtube.com/watch?v=aJCgtnhektA.

Our second new product is an IntelliJ plugin (https://www.karatelabs.io/intellij-plugin) that integrates the auto-complete experience and syntax hints that developers love. Until now, Karate support in IntelliJ was via the built-in Cucumber and Gherkin support, which was very basic. Teams have wished for a better option that would take advantage of all the Karate capabilities such as embedded JSON, JS and data assertions. Now you can write, debug, and maintain Karate tests even faster than before. The plugin is available from the JetBrains Marketplace with a 30-day free trial: https://plugins.jetbrains.com/plugin/19232-karate.

When it comes to "build vs buy", many teams tend to build test automation frameworks. The fact that maintenance of an in-house framework eventually becomes prohibitive in terms of effort and cost, tends to be overlooked. We are trying to increase awareness that choosing a mature open-source framework like Karate is the right move for any team wanting to improve developer velocity.

We thank the community, developers and enterprise users of Karate for having helped us achieve broad adoption and earn credibility in the test-automation domain. We look forward to your support, feedback and suggestions.

[1] https://medium.com/walmartglobaltech/kafka-automation-using-...

[2] https://medium.com/expedia-group-tech/karate-5-reasons-why-y...

[3] https://adapt.to/2018/en/schedule/karate-the-black-belt-of-h...

[4] https://tech.trivago.com/post/2019-11-14-apitestautomationus...

[5] https://oktana.com/api-testing-using-karate-framework/




This is something we need very desperately right now - DESPERATELY.

And despite that, this was the feedback from some of my colleagues (referring to this: https://github.com/karatelabs/karate/raw/master/karate-demo/...) :

"I not like syntax but docs looks like good_)"

"I also don't like the syntax. In the past, Ive ended up writing a lot of code that amounts to syntax configuration without a ton of benefit. Arguably, it's so that non-developers can read the tests, but in practice they still don't."

Most of our complexity comes from having to test against two independent systems - deployed smart contracts and a database. Anyway, let us see if they try it out.


I agree the syntax takes some getting used to. Do pass on to the team that there is an IntelliJ plugin and a VS Code plugin. You can easily call a database or any external system using Java interop: https://stackoverflow.com/a/52714248/143475


Thanks. Will do. One of my team mates already found the VS Code plugin. :)


@zomglings is your team looking for something more UI driven like postman or something which simplifies or abstracts who dependencies are handled?


Most of our problems are around how to deal with the blockchain. We already use a combination of Postman, bash scripts (lots of curl), and the VS Code version of Postman (our current preferred way to do things) to test the API live during development.


Amazing work Peter, congrats on all the success that you've had so far and future success!

I've watched this project from my time at Intuit (PCG), and the impact that it had there


Thanks Uday!


> even non-programmers can write tests

I'm curious if this has never actually happened? In my experience definitely not. I'm trying to think of even what kind of job role/skillset would have the knowledge and ability to write this bespoke syntax but not have any ability to do some basic script programming.


When you have a basic API test which makes an HTTP call and validates the response, it is quite simple. We've seen teams get started by just referring to an existing test or example. But you are right, when you start getting into complex business-logic or assertions, you will start using JavaScript. What people seem to like about Karate is that you can start off simple, but the tool can flex as you learn more.


Congratulations! Our own journey was fairly similar: Unsatisfied with existing tooling, created open-source project with blessing of employer (it helped that in <2 weeks we built a prototype that was already better than what $big_consultancy had spent months building), adopted by a few companies worldwide, eventually left employer and started an open-core business around it (albeit without VC money, and probably a much smaller market —pixel-based GUI testing for set-top-boxes—, and there's a hardware component to our product). Going strong since 2012 (open source project) / 2014 (business). I don't know that my advice will be relevant given the different market / VC approach, but feel free to reach out if you want to chat.


Thanks! Great to hear this and I completely resonate with your experience. Really appreciate it, we will reach out.


I wish there was a unified back end for accessibility that screen readers could plug into and other accessibility automated tools.

Their domain use cases are close in use but not the same. However, automation for testing has money behind it. Perhaps the use case could be bridged where both domains could benefit.


Very interesting point. I'm aware of the Microsoft UI Automation interface, which at least on Windows I think does exactly this: https://en.wikipedia.org/wiki/Microsoft_UI_Automation - and most Windows UI test-automation tools depend on this.


How might one compare and contrast this solution with tools like Storybook paired with Chromatic? This looks fantastic and I love seeing innovation in this space; UI testing is challenging for teams who lean on these tools so they can focus on building great user experiences.


To be honest my experience with Storybook is limited, and I see it more specialized for design-system consistency and review. Karate is a generic browser automation framework, which can do cross-browser testing. With some tweaks it could possibly complement Storybook, for instance, here is an example of an accessibility test-report: https://twitter.com/getkarate/status/1338892932691070976

Thanks for the pointer, we will certainly explore the possibilities here!


Karate is great - thanks for that. We started using it 2 months ago to run complex test scenarios spanning multiple distributed systems. We are still learning how to use it most efficiently, but its been an asset from day one.


Thank you for the feedback. Much appreciated. Please do reach out if we can assist in any way with pointers on getting the most out of Karate.

Thanks once again and we look forward to your continued support.


A simple UX note for your site. Make your background of some part of your site dark, because when I load a page I see nothing for awhile until the background image loads because it's white text on white background.


Thank you for the feedback. Much appreciated. Noted. We are redesigning our website and will certainly take this into account.


All I can say is: good luck - and don't forget to give your website hero div a background colour so that when for some reason your background image isn't loaded in, your text is still legible.


Thank you for your wishes. We are in the process of redesigning our website. Changes proposed will certainly be taken into account.


How does it compare to Postman or Stoplight for testing your APIs?


Postman is a "UI driven" tool, it is great for exploratory testing of APIs and sharing the knowledge on how you call an API (e.g. collections) with others.

But Karate tests are scripts that can be checked into version-control just like any other code in your team.

Karate allows you to write hybrid tests, which means you can switch between API calls and UI actions within the same test script. You can also re-use API tests as performance tests with Karate. Tests are executed in parallel and you get a single HTML report.

Finally, in my opinion - the assertions that Karate gives you out of the box for complex JSON payloads are hard to beat.


can't you use Newman to set up unattended tests?


Yes in the case of Postman, you need a separate tool (Newman) to run headless or CI in the cloud. In Karate, there is no separate headless-runner, there is just one tool which includes the test-runner. This simplifies things.


Do you happen to be hiring for support engineer or customer service roles?


Yes we are. Please contact us via LinkedIn or our website and we will schedule a discussion. Thanks.


very nice, how much?


Launch HNs and job ads are 2 of the 3 things that HN gives back to YC in exchange for funding it (the third one is orange usernames for YC alums). This is explained in the FAQ: https://news.ycombinator.com/newsfaq.html#yc. I've also posted about it many times, as you can see from links like https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que....


> HN gives back to YC in exchange for funding it...

I'd not mind if news.yc is spun off as a non profit, relying on funds from the community it serves (only if that was a given...)


I'm pretty sure that wouldn't work. HN is the product of a rare set of initial conditions, and the funding aspect is a critical aspect of that. The symbiosis, if you like, between HN and YC is part of the DNA of both entities. No doubt it has some downsides (such as job ads on the front page), but I'd say the downsides are small enough that it wouldn't be worth the risk to try to minimize them further. Of course that's just my opinion.

I've written about this intermittently and most of those comments can be found amongst https://hn.algolia.com/?dateRange=all&page=0&prefix=false&so..., if anyone wants more.


> I'm pretty sure that wouldn't work.

May be a DAO would...?

> HN and YC is part of the DNA of both entities.

That it may be, but a lot of folks think HN is just plain stupid most of the time [0][1]

> if anyone wants more.

I know you reply because you assume good faith... well, I am just trolling, you can safely ignore me, for sure (:

[0] Ex A: https://twitter.com/slightlylate/status/1491072990053687296

[1] Ex B: like this time... ;)


don't worry Captain Dang, I edited it. Thanks for linking it.


Karate is open-source and will remain so. The IntelliJ plugin and Studio SaaS mentioned in the OP description are optional and you can find the pricing on our site.


Inspirational journey, all the best !


Thank you for your support!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: