ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - antp/kovacs
Contribute to antp/kovacs development by creating an account on GitHub.
Visit Site

GitHub - antp/kovacs

GitHub - antp/kovacs

Kovacs - A simple ExUnit test runner

Installation

Download the latest release (or clone) the repository and build Kovacs with:

MIX_ENV=prod mix escript.build

Install the application into a directory on your path

    /usr/local/bin

The easiest way to do this is to create a symbolic link to kovacs in the directory where you have downloaded the project too.

    ln -s ~/{project path}/kovacs /usr/local/bin/kovacs

Dependencies

You will also need fswatch installed as Kovacs uses this to monitor the file system. Please download fswatch for your OS from its github repository.

Quick start

kovacs can then be run in any directory by typing the following:

    kovacs

By default it will monitor the lib and test directories.

Due to problems closing down external applications when exiting Elixir command line applications, please enter q<cr> to quit Kovacs.

Important: Failure to do this will leave instances of fswatch running on your system and you will need to manually tidy them up.

When you save a file, Kovacs will run the corresponding test file. The runner will look for a test file in the same directory structure as the tested file.

If you have a file in:

    lib/parser/filter.ex

then it will expect the test file:

    test/parser/filter_test.exs

When running Kovacs, the colour output from ExUnit will not be shown. If you want to have colour output then update the projects test_helper.ex file to the following:

    ExUnit.start([colors: [enabled: true]])

Kovacs will exclude any tests that are tagged with @pending or @ignore.

    @tag :pending
    test "It will add" do
        assert 2 == 1 + 1
    end

Integration tests

If a all tests pass for the last run file, Kovacs will attempt to run a file named after the directory the test file is in. This allows for targeted integration tests for all files that collaborate within a directory.

If it is the root directory then Kovacs will look for a file named app_test.exs.

You can toggle the running of the integration test file at any time by entering i<cr>.

Configuration

if you want to watch any custom directories then you will need to supply a configuration file.

Create a Elixir configuration file e.g. kovacs.ex with the following contents.

    defmodule Kovacs.Cfg do
      def configure do
        Kovacs.watch(["./lib/dir1", "./lib/dir2", "./test"])
      end
    end

This will watch the lib/dir1, lib/dir2 and test directories from your project root, for file changes.

Note: Do not watch sub directories of an already watched directory. Duplicate file changes may be detected if you do.

Running

Run kovacs with the following

    kovacs {optional configuration file}

Important: When exiting the application press the q key followed by carriage return. Do not exit kovacs with ctrl-c. This will leave fswatch instances running, which you will need to manually clean up -- you have been warned.

Author

Copyright © 2014 Component X Software, Antony Pinchbeck

Released under Apache 2 License

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory