答案 0 :(得分:3)
我认为speclj仍然有效。
答案 1 :(得分:1)
https://github.com/zenmodeler/spexec是一个相对较新的东西,致力于BDD。
答案 2 :(得分:1)
https://github.com/cucumber/cucumber-jvm也有clojure支持,clojure
目录中有一个可运行的示例;其使用的扩展示例如下:https://github.com/gphilipp/bdd-guide-clojure
答案 3 :(得分:1)
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测试。