Coder Social home page Coder Social logo

particleflux / kcov-bats-circleci-codeclimate Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 1.0 8 KB

An example on how to combine bats, kcov, Circle CI and Code Climate

License: MIT License

Shell 100.00%
circleci continuous-integration test-automation coverage codeclimate bash devops unit-testing codequality

kcov-bats-circleci-codeclimate's Introduction

kcov-bats-circleci-codeclimate

CircleCI Test Coverage

A small example on how to set up kcov for gathering bats bash script test coverage in combination with CircleCI and Code Climate.

kcov-bats-circleci-codeclimate's People

Contributors

particleflux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

alexskrypnyk

kcov-bats-circleci-codeclimate's Issues

kcov is covering only one test case?

Hello,
I am trying to run code coverage for bats script.

hello.bats:
#!/usr/bin/env bats

@test "hello without arguments" {
result=$(bash $BATS_TEST_DIRNAME/../hello.sh)
[[ "$result" == "Hello unknown" ]]
}

@test "hello with world argument" {
result=$(bash $BATS_TEST_DIRNAME/../hello.sh world)
[[ "$result" == "Hello World" ]]
}

hello.sh
#!/usr/bin/env bash

if [[ "$1" == "world" ]]; then
echo "Hello World"
else
echo "Hello unknown"
fi

Command I am executing:
kcov coverage/ tests/hello.bats

It is generating the coverage report but for only first test case which is "hello without arguments"

Can you help me?

Screenshot 2021-12-07 at 2 58 51 PM

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.