(ns clj-gatling.core-test
  (:require [clojure.test :refer :all]
            [clj-gatling.test-helpers :refer :all]
            [clj-containment-matchers.clojure-test :refer :all]
            [clj-gatling.core :refer [run run-simulation]]
            [clj-async-test.core :refer :all]
            [clojure.core.async :refer [go <! <!! timeout]]
            [clj-time.core :as time]))

(use-fixtures :once setup-error-file-path)

(def legacy-scenario
  {:name "Test scenario"
   :context {}
   :requests [{:name "Request1" :fn successful-request}
              {:name "Request2" :fn failing-request}]})

(def simulation
  {:name "Test simulation"
   :scenarios [{:name "Test scenario"
                :steps [(step "Step1" true)
                        (step "Step2" false)]}]})

(deftest legacy-simulation-returns-summary
  (let [summary (run-simulation [legacy-scenario] 1 {})]
    (is (= {:ok 1 :ko 1} summary))))

(deftest simulation-returns-summary
  (let [summary (run simulation {:concurrency 1})]
    (is (= {:ok 1 :ko 1} summary))))


Add smoke tests for core entrypoint functionss
Add smoke tests for core entrypoint functionss

mhjort/clj-gatling