Skip to content

Commit df32748

Browse files
committed
Add a kaocha tools.deps based test runner
Run ./bin/kaocha instead of lein test kaocha includes a test watcher, and has many useful features that can enable better workflows than with lein test
1 parent bba4415 commit df32748

5 files changed

Lines changed: 25 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ pom.xml.asc
99
.idea/
1010
.DS_Store
1111
table2qb.iml
12+
.cpcache

bin/kaocha

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
clojure -A:test -m kaocha.runner "$@"

deps.edn

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
commons-io/commons-io {:mvn/version "2.4"}}
99
:paths ["src" "resources"]
1010
:aliases
11-
{:with-logging
11+
{:test {:extra-paths ["test" "test/resources"]
12+
:extra-deps {lambdaisland/kaocha {:mvn/version "0.0-343"}}}
13+
:with-logging
1214
{:extra-deps
1315
{org.apache.logging.log4j/log4j-api {:mvn/version "2.11.0"}
1416
org.apache.logging.log4j/log4j-core {:mvn/version "2.11.0"}

test/table2qb/pipelines/integration_test.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[grafter.extra.validation.pmd :as pmd]
1212
[grafter.extra.validation.pmd.dataset :as pmdd]))
1313

14-
(deftest integration-test
14+
(deftest ^:integration integration-test
1515
(testing "Validates table2qb outputs against pmd, dataset, and cube tests"
1616
(testing "Overseas Trade"
1717
(with-repository [repo (repo/fixture-repo

tests.edn

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#kaocha/v1
2+
{:tests [{:type :kaocha.type/clojure.test
3+
:id :unit
4+
:source-paths ["src"]
5+
:test-paths ["test"]
6+
:ns-patterns ["-test$"]
7+
:skip-meta [:integration]}
8+
{:type :kaocha.type/clojure.test
9+
:id :integration
10+
:source-paths ["src"]
11+
:test-paths ["test"]
12+
:ns-patterns ["-test$"]
13+
:focus-meta [:integration]}]
14+
:reporter kaocha.report/documentation
15+
;;:plugins [kaocha.plugin/profiling]
16+
:plugins [:kaocha.plugin/print-invocations
17+
:kaocha.plugin/profiling]
18+
}

0 commit comments

Comments
 (0)