An open source framework for web service testing (err.., for any/A-to-Z testing, I can dream right). If you are still not sold on karate, here is some good reading material:
- First and foremost beautiful documentation in karate README
- Easy assertions even for complex json schema: no problem
- Data driven testing again the README
- Want to mock (before dev team implemented) a service: World's Smallest MicroService
- For all BDD purists: want to highlight karate is not true BDD (also mentioned in README)
Enough already, show me some code:
- say hello to world, for the impatient:
- to run:
mvn test -Dtest=intro.HelloRunner
- to view report:
open target/surefire-reports/TEST-intro.hello-world.html
- to run:
- who cares about a hello world show me something real: See
Background
,variables
,request
,header
,params
,response
,status
(TODO)
- Stitch a sequence of API calls as one test case (Scenario)
- JUnit/TestNG integration
- Code reuse, mix and match features, with javascript and java code
(TODO)
- json/xml first class citizenship, read/write from/to files
- how to keep secrets out of tests
- Switch configuration/profile (stage -vs- production)
- Pick and choose (test cases, test suites and all that jargon): want to run only smoke tests -vs- full regression
(TODO)
See the power of karate
- complex assertions
- data driven testing
- flexible logging
(TODO)
Didn't I promise karate for A-to-Z?
- performance testing: karate-gatling
- UI testing: karate-selenium
- mocking services: test doubles
(TODO)
karate UI (TODO)