Git Product home page Git Product logo

katana-test's Introduction

katana-test

⚠ THIS REPO IS ARCHIVED ⚠️

Instead of using this tool, consider adding a test alias to your rebar.config, like this:

{alias,
 [{test, [compile, format, lint, hank, dialyzer, {ct, "--verbose"}, cover, edoc]}]}.

That way, you can run rebar3 test on your CI pipelines and get the code checked with all the desirable tools/plugins at once.

Old Readme Katana Test is an Erlang library application containing modules useful for testing Erlang systems. It currently contains the module `ktn_meta_SUITE`, which is a Common Test suite to be included among your tests. Read below for more information.

Contact Us

If you find any bugs or have a problem while using this library, please open an issue in this repo (or a pull request :)).

And you can check all of our open-source projects at inaka.github.io

ktn_meta_SUITE

Goals

The meta suite lets you check your code with dialyzer, xref and elvis.

Usage

To include the suite in your project, you only need to invoke its functions from a common_test suite. If you use mixer you can do…

-module(your_meta_SUITE).

-include_lib("mixer/include/mixer.hrl").
-mixin([ktn_meta_SUITE]).

-export([init_per_suite/1, end_per_suite/1]).

init_per_suite(Config) -> [{application, your_app} | Config].
end_per_suite(_) -> ok.

Of course, you can choose what functions to include, for example if you want dialyzer but not elvis nor xref you can do…

-mixin([{ ktn_meta_SUITE
        , [ dialyzer/1
          ]
        }]).

-export([all/0]).

all() -> [dialyzer].

Configuration

ktn_meta_SUITE uses the following configuration parameters that you can add to the common_test config for your test suite:

Parameter Description Default
base_dir The base_dir for your app code:lib_dir(App) where App is what you define in application below
application The name of your app no default
dialyzer_warnings The active warnings for diaylzer [error_handling, race_conditions, unmatched_returns, unknown]
plts The list of plt files for dialyzer filelib:wildcard("your_app/*.plt")
elvis_config Config file for elvis "your_app/elvis.config"
xref_config Config options for xref #{dirs => [filename:join(BaseDir, "ebin"), filename:join(BaseDir, "test")], xref_defaults => [{verbose, true}, {recurse, true}, {builtins, true}]}
xref_checks List of checks for xref [ undefined_function_calls, locals_not_used, deprecated_function_calls]
dirs List of folders to check with xref and dialyzer ["ebin", "test"]

katana-test's People

Contributors

elbrujohalcon avatar euen avatar ferigis avatar getong avatar harenson avatar igaray avatar maximvl avatar paulo-ferraz-oliveira avatar vassilevsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.