March 26, 2017

New automation framework released to test APIs: Introducing Karate, by Intuit India's Peter Thomas

After spending the past month attempting to finish blogging about the API testing framework, REST Assured, I came across today the following item that had been retweeted:



According to Peter Thomas' LinkedIn profile, he has been an architect in Intuit, working for Intuit India ( @Intuit.In ) since 2012 and lives in the Bengaluru Area, India.

Peter even has Google Doc he posted about on March 20, 2017 comparing and contrasting Karate vs REST Assured.

*sigh* Sometimes it is so hard to keep up.

Here is some information from around the web about this new automation framework. During my next lull in work, I need to tinker with this!

Karate: Web-Services Testing Made Simple


From Peter Thomas' Medium article, Karate: Web-Services Testing Made Simple, posted on BLUEPrint by Intuit's Medium.com account:

"Intuit has open-sourced ‘Karate’, a framework that makes the tall claim that the business of testing web-APIs can actually be — fun.

"I know what you must be thinking. There’s no way that making HTTP requests and navigating the forest of data that is returned could be fun.

"But really, that’s what developers who tried Karate had to say. It actually didn’t surprise us. Because Karate was born out of a strong dis-satisfaction with the current state of solutions that exist. And a lot of thought went into Karate to keep it simple and elegant, to allow the user to focus on the functionality instead of boiler-plate, and to keep things concise.

"Karate strives to reduce the entry barrier to writing a test and more importantly — reduces the friction to maintain a test, because of how readable tests become [ Read More ]".


Karate's GitHub Site

From https://github.com/intuit/karate:

"Karate enables you to script a sequence of calls to any kind of web-service and assert that the responses are as expected. It makes it really easy to build complex request payloads, traverse data within the responses, and chain data from responses into the next request. Karate's payload validation engine can perform a 'smart compare' of two JSON or XML documents without being affected by white-space or the order in which data-elements actually appear, and you can opt to ignore fields that you choose.

"Since Karate is built on top of Cucumber-JVM, you can run tests and generate reports like any standard Java project. But instead of Java - you write tests in a language designed to make dealing with HTTP, JSON or XML - simple".


Peter's Hello World Example

Feature: karate 'hello world' example
Scenario: create and retrieve a cat

Given url 'http://myhost.com/v1/cats'
And request { name: 'Billie' }
When method post
Then status 201
And match response == { id: '#notnull', name: 'Billie' }

Given path response.id
When method get
Then status 200

On the site, Peter talks about how to get started, variables and expressions, data types, primary HTTP keywords, tips, and examples such as data driven tests, and how to use it with *.feature files.

Over ten demos are on the Karate Demo Page: https://github.com/intuit/karate/tree/master/karate-demo

Watch Joe Colantonio Talk About "Karate a Rest Test Tool – Basic API Testing"

Joe Colantonio, creator of the Test Talks podcast, just published on March 23rd an article, Karate a Rest Test Tool – Basic API Testing, which includes a mini tutorial:

https://www.youtube.com/watch?v=yKRR1j0A9Q4

You can get more instruction from https://www.joecolantonio.com/2017/03/23/rest-test-tool-karate-api-testing/

Follow Karate DSL on Twitter!

And, yes, you can follow Karate on Twitter:

Watch a Webinar from the Creator, Peter Thomas

TechGig published a webinar, "Karate: DSL for writing web service API acceptance tests, BDD":

"In this session, Peter will walk through the features of Karate, demonstrate how it handles manners of HTTP aspects such as file-uploads and cookies, and also explain how it can be extended via custom-functions in either JavaScript or Java. Karate's innovative plug-in mechanism for HTTP-header management makes integrating any kind of authentication and sign-in flow extremely simple. You get to hear straight [from] the creator of ‘Karate’ the motivations for creating this framework in the first place, how it differs the competition, and how it helps accelerate the development and quality-assurance of web-services of kinds, be it REST, SOAP or GraphQL.

"Key points of discussion:
  • "Why Karate was created, and what problems it solves well.
  • "Examples and demos of real-life web-service API tests using Karate.
  • "The architecture of Karate and how it combines technologies such as Cucumber, JsonPath and Nashorn.
  • "Insights into what goes into open-sourcing and releasing a public Java project".

https://vimeo.com/209699865

Happy Testing!

-T.J. Maher
Twitter | LinkedIn | GitHub

// Sr. QA Engineer, Software Engineer in Test, Software Tester since 1996.
// Contributing Writer for TechBeacon.
// "Looking to move away from manual QA? Follow Adventures in Automation on Facebook!"

3 comments:

Chris Hemsworth said...

I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective. Techno-based information has been fetched in each of your topics. Sure it will enhance and fill the queries of the public needs. Feeling so glad about your article. Thanks…!
best software testing training in chennai
best software testing training institute in chennai with placement
software testing training
courses

software testing training and placement
software testing training online
software testing class
software testing classes in chennai
best software testing courses in chennai
automation testing courses in chennai

Naveen S said...

This is the first & best article to make me satisfied by presenting good content. I feel so happy and delighted. Thank you so much for this article.

Learn Best Digital Marketing Course in Chennai

Digital Marketing Course Training with Placement in Chennai

Learn Digital Marketing Course Training in Chennai

Digital Marketing Training with Placement Institute in Chennai

zuan said...

Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
Web Designing Training Institute in Chennai | web design training class in chennai | web designing course in chennai with placement
Mobile Application Development Courses in chennai
Data Science Training in Chennai | Data Science courses in Chennai
Professional packers and movers in chennai | PDY Packers | Household Goods Shifting
Web Designing Training Institute in Chennai | Web Designing courses in Chennai
Google ads services | Google Ads Management agency
Web Designing Course in Chennai | Web Designing Training in Chennai