Configuration of KarateDSL Automation Framework in 5 Simple Steps

Karate Framework Skeleton
import com.intuit.karate.Results;import com.intuit.karate.Runner;import static org.junit.Assert.*;import org.junit.Test;public class UserRunner {@Testpublic void testParallel() {Results results = Runner.path("classpath:package_name/file_name.feature").tags("~@ignore").parallel(5);assertTrue(results.getErrorMessages(), results.getFailCount() == 0);}}
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>API_Automation</groupId><artifactId>Karate_API_Automation</artifactId><version>0.0.1-SNAPSHOT</version><packaging>jar</packaging><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><java.version>1.8</java.version><maven.compiler.version>3.8.1</maven.compiler.version><maven.surefire.version>2.22.2</maven.surefire.version><karate.version>0.9.9.RC4</karate.version></properties><dependencies><!-- https://mvnrepository.com/artifact/com.intuit.karate/karate-junit5 --><dependency><groupId>com.intuit.karate</groupId><artifactId>karate-junit5</artifactId><version>${karate.version}</version></dependency></dependencies>
<build><testResources><testResource><directory>src/test/java</directory><excludes><exclude>**/*.java</exclude></excludes></testResource></testResources><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>${maven.compiler.version}</version><configuration><encoding>UTF-8</encoding><source>${java.version}</source><target>${java.version}</target><compilerArgument>-Werror</compilerArgument></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>${maven.surefire.version}</version><configuration><argLine>-Dfile.encoding=UTF-8</argLine></configuration></plugin></plugins></build></project>

QA Lead @ MyGlamm | QA Automation engineer @ Ex-Paytm Insider| Ex-Automation Tester @ Reliance Jio Infocomm Ltd. | Ex-Software Developer @TCS

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How A Forex API Can Affect Your Finances?

Building REST API [Quick and Easy Using Node + Docker + Git ]

Multiline Strings in Ruby

C# design practices

Mean Stack image from Docker Hub

Web Scraping All the Links With Python

Setting up Node on macOS 11.1 and M1

Are AI approaches useful only for UI testing?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Priyanka Brahmane

Priyanka Brahmane

QA Lead @ MyGlamm | QA Automation engineer @ Ex-Paytm Insider| Ex-Automation Tester @ Reliance Jio Infocomm Ltd. | Ex-Software Developer @TCS

More from Medium

How to schedule jobs using GitHub Actions

How to run UI Automation Testing using Puppeteer

UI Automation Testing using Puppeteer

Performance Test Reporting

Run your Selenium Script pushed to GIT repository using Jenkins Job