Mi s-a cerut code review si am dat de el. Este simpatic
Asa arata un test
Features
- Java knowledge is not required and even non-programmers can write tests
- Scripts are plain-text, require no compilation step or IDE, and teams can collaborate using Git / standard SCM
- Based on the popular Cucumber / Gherkin standard - with IDE support and syntax-coloring options
- Elegant DSL syntax ‘natively’ supports JSON and XML - including JsonPath and XPath expressions
- Eliminate the need for ‘Java Beans’ or ‘helper code’ to represent payloads and HTTP end-points, and dramatically reduce the lines of code needed for a test
- Ideal for testing the highly dynamic responses from GraphQL API-s because of Karate’s built-in text-manipulation and JsonPath capabilities
- Tests are super-readable - as scenario data can be expressed in-line, in human-friendly JSON, XML, Cucumber Scenario Outline tables, or a payload builder approach unique to Karate
- Express expected results as readable, well-formed JSON or XML, and assert in a single step that the entire response payload (no matter how complex or deeply nested) - is as expected
- Comprehensive assertion capabilities - and failures clearly report which data element (and path) is not as expected, for easy troubleshooting of even large payloads
- Fully featured debugger that can step backwards and even re-play a step while editing it - a huge time-saver
- Simpler and more powerful alternative to JSON-schema for validating payload structure and format - that even supports cross-field / domain validation logic
- Scripts can call other scripts - which means that you can easily re-use and maintain authentication and ‘set up’ flows efficiently, across multiple tests
- Embedded JavaScript engine that allows you to build a library of re-usable functions that suit your specific environment or organization
- Re-use of payload-data and user-defined functions across tests is so easy - that it becomes a natural habit for the test-developer
- Built-in support for switching configuration across different environments (e.g. dev, QA, pre-prod)
- Support for data-driven tests and being able to tag or group tests is built-in, no need to rely on an external framework
- Native support for reading YAML and even CSV files - and you can use them for data-driven tests
- Standard Java / Maven project structure, and seamless integration into CI / CD pipelines - and support for JUnit 5
- Option to use as a light-weight stand-alone executable - convenient for teams not comfortable with Java
- Multi-threaded parallel execution, which is a huge time-saver, especially for integration and end-to-end tests
- Built-in test-reports compatible with Cucumber so that you have the option of using third-party (open-source) maven-plugins for even better-looking reports
- Reports include HTTP request and response logs in-line, which makes troubleshooting and debugging easier
- Easily invoke JDK classes, Java libraries, or re-use custom Java code if needed, for ultimate extensibility
- Simple plug-in system for authentication and HTTP header management that will handle any complex, real-world scenario
- Cross-browser Web UI automation so that you can test all layers of your application with the same framework
- Visual Validation via the built-in image comparison capabilities
- Cross platform Desktop Automation that can be mixed into Web Automation flows if needed
- Option to invoke via a Java API, which means that you can easily mix Karate into Java projects or legacy UI-automation suites
- Save significant effort by re-using Karate test-suites as Gatling performance tests that deeply assert that server responses are accurate under load
- Gatling integration can hook into any custom Java code - which means that you can perf-test even non-HTTP protocols such as gRPC
- Built-in distributed-testing capability that works for API, UI and even load-testing - without needing any complex “grid” infrastructure
- API mocks or test-doubles that even maintain CRUD ‘state’ across multiple calls - enabling TDD for micro-services and Consumer Driven Contracts
- Async support that allows you to seamlessly integrate the handling of custom events or listening to message-queues
- Mock HTTP Servlet that enables you to test any controller servlet such as Spring Boot / MVC or Jersey / JAX-RS - without having to boot an app-server, and you can use your HTTP integration tests un-changed
- Built-in HTML templating so that you can extend your test-reports into readable specifications
- Comprehensive support for different flavors of HTTP calls:
- SOAP / XML requests
- HTTPS / SSL - without needing certificates, key-stores or trust-stores
- HTTP proxy server support
- URL-encoded HTML-form data
-
Multi-part file-upload - including
multipart/mixed
andmultipart/related
- Browser-like cookie handling
- Full control over HTTP headers, path and query parameters
- Re-try until condition
- Websocket support