All Projects → fulcrologic → fulcro-spec

fulcrologic / fulcro-spec

Licence: MIT License
A library that wraps clojure.test for a better BDD testing experience.

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to fulcro-spec

karate-runner
VSCode Extension for Karate
Stars: ✭ 23 (-39.47%)
Mutual labels:  testing-framework
iutest
c++ testing framework
Stars: ✭ 58 (+52.63%)
Mutual labels:  testing-framework
Compose
Nice and simple DSL for Espresso Compose UI testing in Kotlin
Stars: ✭ 56 (+47.37%)
Mutual labels:  testing-framework
deckard
DNS test harness
Stars: ✭ 28 (-26.32%)
Mutual labels:  testing-framework
page-content-tester
Paco is a Java based framework for non-blocking and highly parallelized Dom testing.
Stars: ✭ 13 (-65.79%)
Mutual labels:  testing-framework
testkube
☸️ Kubernetes-native framework for test definition and execution
Stars: ✭ 172 (+352.63%)
Mutual labels:  testing-framework
CloudRaider
A resiliency tool that automates Failure mode effect analysis tests, simplifying complex testing with a behavior-driven development and testing approach. Provides a programmatic way to execute controlled failures in AWS and a BDD way to write test cases, allowing test plans themselves to become test cases that can be executed as is.
Stars: ✭ 26 (-31.58%)
Mutual labels:  testing-framework
hitchstory
Type-safe, StrictYAML based BDD framework for python.
Stars: ✭ 24 (-36.84%)
Mutual labels:  testing-framework
crotest
A tiny and simple test framework for crystal
Stars: ✭ 24 (-36.84%)
Mutual labels:  testing-framework
SpecTools
Write less test code with this set of spec tools. Swift, iOS, testing framework independent (but works well with Quick/Nimble or directly).
Stars: ✭ 38 (+0%)
Mutual labels:  testing-framework
RestSharpFramework
Framework for testing RESTful Services with RestSharp and C# HTTP Client
Stars: ✭ 18 (-52.63%)
Mutual labels:  testing-framework
AnotherFasterRunner
基于HttpRunner+Python+DRF+Vue的接口自动化测试平台
Stars: ✭ 216 (+468.42%)
Mutual labels:  testing-framework
oatts
DEPRECATED in favor of https://github.com/google/oatts
Stars: ✭ 26 (-31.58%)
Mutual labels:  testing-framework
Wasmite
Now WebAssembly has proper testing, unit-testing and debugging 🤗
Stars: ✭ 20 (-47.37%)
Mutual labels:  testing-framework
sbml-test-suite
The SBML Test Suite is a conformance testing system. It allows developers and users to test the degree and correctness of the SBML support provided in a software package.
Stars: ✭ 21 (-44.74%)
Mutual labels:  testing-framework
kheera-testrunner-android
BDD Framework for Android
Stars: ✭ 18 (-52.63%)
Mutual labels:  testing-framework
op-test
Testing Firmware for OpenPOWER systems
Stars: ✭ 30 (-21.05%)
Mutual labels:  testing-framework
FastHashes
A .NET implementation of several non-cryptographic hashes.
Stars: ✭ 24 (-36.84%)
Mutual labels:  testing-framework
Exam
Extension for Concordion BDD Framework
Stars: ✭ 15 (-60.53%)
Mutual labels:  testing-framework
cpptest
🛠️ Powerful, yet simple, C++ unit testing framework; new home after https://sourceforge.net/projects/cpptest/
Stars: ✭ 51 (+34.21%)
Mutual labels:  testing-framework

fulcro-spec

1. CHANGE OF SCOPE NOTICE

BREAKING CHANGES as of 3.1. The =throws⇒ clause now just takes either a type or a regex. Not maps/lists.

BREAKING CHANGES as of 3.0. Do NOT upgrade without being prepared to port your test runners.

This library no longer contains browser-based runners.

I recommend the following alternatives:

Clojure Tests

I recommend IntelliJ/Emacs/Vim in-editor testing, or perhaps Clojure Tools Deps with kaocha. The latter renders into a terminal, but can use fulcro-spec’s macros. Here is a sample config file that will use Fulcro spec’s terminal reporting:

#kaocha/v1
    {:tests    [{:id           :unit
                 :ns-patterns  ["-test$" "-spec$"]
                 :test-paths   ["src/test"]
                 :skip-meta    [:integration]
                 :source-paths ["src/main"]}]
     :reporter [fulcro-spec.reporters.terminal/fulcro-report]
     :plugins  [:kaocha.plugin/randomize
                :kaocha.plugin/filter
                :kaocha.plugin/capture-output]}
Clojurescript Tests

I highly recommend using Nubank’s Workspaces. I’ve contributed a shadow-cljs target that can auto-scan for tests if you use their deftest macro. Again, things like the provided macro work within Workspaces. I recommend using shadow-cljs :karma target for running CI tests.

See the docs for more details.

2. Description

A Clojure(scipt) testing library to augment the standard clojure.test.

fulcro spec

Release: CircleCI Snapshot: CircleCI

3. NEW! REPL Runner

It is common to want to run tests in the REPL, but the output of the default runner leaves a lot to be desired. If you’re using IntelliJ you can now add something like this to your REPL commands (and hook it to a keyboard shortcut) for a much better testing experience:

Run Tests with a :focus metadata marker (selector):

(in-ns (.getName *ns*))
(require 'fulcro-spec.reporters.repl)
(fulcro-spec.reporters.repl/run-tests #(:focus (meta %)))

Run all tests:

(in-ns (.getName *ns*))
(require 'fulcro-spec.reporters.repl)
(fulcro-spec.reporters.repl/run-tests)
ℹ️
Be sure to check "Before Executing" → "Load File" on the REPL command.

4. Usage

(ns my-test
  (:require
    [fulcro-spec.core :refer [when-mocking provided assertions]
    [clojure.test :refer [deftest]]
    ...))

(defn f [x] 900)
(defn g [y] (f y))

(deftest my-test
  (when-mocking
    (f x) => 22

    (assertions
      "mocking works"
      (g 9) => 31)))

See the full documentation for complete details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].