谷歌搜索从过去几年中只揭示了这个问题的答案,我在github上看过的一些项目已经很长时间没有提交了。目前有人正在做任何事情吗?我很感兴趣。还做什么并行测试?我是Clojure的新手,但似乎缺少的一件事是测试框架和ScalaTest一样好。
我认为speclj仍然活跃。
https://github.com/zenmodeler/spexec是一个相对较新的东西,致力于BDD。
https://github.com/cucumber/cucumber-jvm也有clojure支持,并且在clojure
目录中有一个可运行的例子;它的一个扩展例子就在这里:https://github.com/gphilipp/bdd-guide-clojure
Eggplant是一个令人兴奋的新的BDD开源库,用于Clojure。你也可以读一下here。
例如:
(defspec multiplying-two-numbers
(specification
{:given "a input of :a and :b"
:when "we #* :c"
:then "we expect :result"
:data {:a 3 :b 4 :result 12}}))
(defspec change-a-string-to-uppercase
(specification
{:given "a input of :a"
:when "we #clojure.string/upper-case"
:then "we expect :result"
:data {:a "hello" :result "HELLO"}}))
(defspec finding-the-max-of-two-numbers
(specification
{:expect "the #max of :a and :b"
:where {:a 2 :b 3 :expected 3}}))
“简单是关键”
五个关键词:
https://github.com/perkss/eggplant
专注于数据驱动开发并通过示例使用人类可读形式对其进行测试,该形式随着测试的增长而维护规范文档。
标准的clojure.test
将运行这些与任何IDE和构建工具兼容。
开发人员可以在很短的时间内编写一个快速易于遵循的BDD测试。