Git Product home page Git Product logo

starter-karate-dsl-npm's Introduction

Twitch Discord

Karate DSL

API Test Automation - Karate DSL For Restful and GraphQL APIs

Starter project created live on Twitch.tv/CharlyAutomatiza based on Karate DSL for NodeJS/NPM Projects

Overview

Esta documentación está dispobible también en Castellano.

General requirements

Download and install

Installation of the testing framework

Clone the repository:

git clone https://github.com/charlyautomatiza/starter-karate-dsl-npm.git

Install dependencies.

npm install

To run the API Rest and GraphQL tests, go to the root of the project and run

npm run test ./src/features

WARNING: If you have errors please check Known Issues section and then re-try.

To run a specific API Rest test, for example the feature users.feature those cases with the @create_user tag.

npm run test -- ./src/features "--t @create_user"

To execute a specific test of the GraphQL API, for example in feature users-gql.feature those cases with the tag @graphql_examples.

npm run test -- ./src/features "-t @graphql_examples"

Another option:

npm run test:gql

To run all the API Rest and GraphQL tests, it can be run with the @run tag.

npm run test -- ./src/features "-t @run"

Another option:

npm run test:run

Running with N threads in parallel the cases that have the @run tag can be done with the -T N parameter. With the -C parameter the target folder is removed and created again with the new test results.

npm run test -- ./src/features "-t @run" "-T 5" "-C"
npm run test:parallel

The unified report of test results

After each execution, the reports in html format are generated in the target/karate-reports folder.

For more details you can consult the official documentation

Github Actions to run API tests

New folder .github/workflows with file karate-test-runner.yml to run our tests from a Github Actions pipeline.

JUnit Report retrieved from GitHub Marketplace

The workflow is configured to run on the following event:

  • push: when a repository is pushed.
  • Pull request: when a pull request is created.

Known Issues

Users on Windows have reported issues such as the npm install failing to complete and without any errors shown.

As a workaround, please install JBang manually and re-try the npm install step.

starter-karate-dsl-npm's People

Contributors

charlyautomatiza avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.