Creating a new Karate project
Let’s create a new Karate project by following the steps from Chapter 2 in the Setting up a Karate project with the Maven archetype section.
I will call it karate-jsonplaceholder
since this is a good description of what it will test. After this is done, you should have a project like this in VS Code:
Figure 3.11 – New Karate project for JSONPlaceholder
Since we will write our tests ourselves and don’t need additional configurations for now, we can delete the complete examples
folder as well as the karate-config.js
file. So now, your project should look like this, ready to be filled by us:
Figure 3.12 – Cleaned up Karate project for JSONPlaceholder
In the next step, we will create our first test case.
Adding a new feature file
Let’s add a new scenarios
folder under src/test/java
that our feature files will be in:
Figure 3.13...