arel-inittest2
v1.0.0
Published
This karate repo template is designed to give you a simple way to get started with Karate. In this repo you will find a setup that works with jbang (https://www.jbang.dev/) a tool that lets you run any java program without the need of using the karate.jar
Downloads
4
Readme
Introduction
This karate repo template is designed to give you a simple way to get started with Karate. In this repo you will find a setup that works with jbang (https://www.jbang.dev/) a tool that lets you run any java program without the need of using the karate.jar file like before. Additionally, this setup gives the option to debug your karate tests in real time in visual studio, using the karate runner debug option.
Tools required:
Node JS (Will be installed in the powershell script) JBang (Will be installed in the powershell script) Karate runner (Optional: enables GUI features in Visual Studio Code, it is a extension for several GUI features.)
Getting Started
Installation
- Install test dependencies using the powershell script
powershell -executionpolicy ByPass -File .\install.ps1
- That's it!
- If the powershell script gives you an error of unauthorized attempt or anything similar. Run each line in the install.ps powershell script seperately to install the test dependencies
- To do this, right click on the "karate" folder (tests/karate/Sample) and click on open in integrated terminal and then run each line individually.
To run all the tests
If you would like to run all the tests use the following powershell script: npm run test .\tests\karate
How to customize this repo template to your own personal needs?
Essentially most of the content here is customizable. But for the best user experience, it is reccomended to change the "Sample" folder to a name that fits your project. Inserting all your karate tests underneath that folder makes sure everything currently set up in this template will work out of the box.
Setting up a pipeline
This repo template also comes with a standard simple YAML file that gives the user the ability to create an pipeline. This yml can be found under the build folder and the file called pipeline-sample. The name of this file can also be changed without any consequences. However, if the name of the "Sample" folder is changed then one small change would need to be made. In the pipeline-sample.yml file under stages -> feature directory, change the "Sample" folder to your newly named folder and then when you create a pipeline it will work without any issues.
Still have questions or need help?
Check under the test automation wiki where you found this repo for more information. If your questions are not answered or you're still having problems setting it up. Feel free to contact me (Arel Nathan Bokobza) on teams and I'll do my best to help.