<commit_before>(ns clj-gatling.report-test
  (:use [clojure.test]
        [clj-time.core :only [local-date-time]])
  (:require [clj-gatling.report :as report]))

(def scenario-result 
  [{:name "Test scenario" :id 1 :start 1391936496814 :end 1391936496814
    :requests [{:id 1 :name "Request1" :start 1391936496853 :end 1391936497299 :result true} 
               {:id 1 :name "Request2" :start 1391936497299 :end 1391936497996 :result true}]}
   {:name "Test scenario" :id 0 :start 1391936496808 :end 1391936496808
    :requests [{:id 0 :name "Request1" :start 1391936497998 :end 1391936498426 :result true} 
               {:id 0 :name "Request2" :start 1391936498430 :end 1391936498450 :result false}]}])

(def expected-lines
  [["RUN" "20140209110136" "simulation" "\u0020"] 
   ["SCENARIO" "Test scenario" "1" "1391936496814" "1391936496814"] 
   ["REQUEST" "Test scenario" "1" "" "Request1" "1391936496853" "1391936496853" "1391936497299" "1391936497299" "OK" "\u0020"]
   ["REQUEST" "Test scenario" "1" "" "Request2" "1391936497299" "1391936497299" "1391936497996" "1391936497996" "OK" "\u0020"] 
   ["SCENARIO" "Test scenario" "0" "1391936496808" "1391936496808"] 
   ["REQUEST" "Test scenario" "0" "" "Request1" "1391936497998" "1391936497998" "1391936498426" "1391936498426" "OK" "\u0020"]
   ["REQUEST" "Test scenario" "0" "" "Request2" "1391936498430" "1391936498430" "1391936498450" "1391936498450" "KO" "\u0020"]])

(defn run-line-match [expected actual]
  (is (= (first expected) (first actual))))

(defn scenario-line-match [expected actual]
  (is (= (second expected) (second actual))))
<commit_msg>Add multiple scenarios to report test<commit_after>(ns clj-gatling.report-test
  (:use [clojure.test]
        [clj-time.core :only [local-date-time]])
  (:require [clj-gatling.report :as report]))

(def scenario-result 
  [{:name "Test scenario" :id 1 :start 1391936496814 :end 1391936496814
    :requests [{:id 1 :name "Request1" :start 1391936496853 :end 1391936497299 :result true} 
               {:id 1 :name "Request2" :start 1391936497299 :end 1391936497996 :result true}]}
   {:name "Test scenario" :id 0 :start 1391936496808 :end 1391936496808
    :requests [{:id 0 :name "Request1" :start 1391936497998 :end 1391936498426 :result true} 
               {:id 0 :name "Request2" :start 1391936498430 :end 1391936498450 :result false}]}
   {:name "Test scenario2" :id 0 :start 1391936496808 :end 1391936496808
    :requests [{:id 0 :name "Request1" :start 1391936497998 :end 1391936498426 :result true}]}])

(def expected-lines
  [["RUN" "20140209110136" "simulation" "\u0020"] 
   ["SCENARIO" "Test scenario" "1" "1391936496814" "1391936496814"] 
   ["REQUEST" "Test scenario" "1" "" "Request1" "1391936496853" "1391936496853" "1391936497299" "1391936497299" "OK" "\u0020"]
   ["REQUEST" "Test scenario" "1" "" "Request2" "1391936497299" "1391936497299" "1391936497996" "1391936497996" "OK" "\u0020"] 
   ["SCENARIO" "Test scenario" "0" "1391936496808" "1391936496808"] 
   ["REQUEST" "Test scenario" "0" "" "Request1" "1391936497998" "1391936497998" "1391936498426" "1391936498426" "OK" "\u0020"]
   ["REQUEST" "Test scenario" "0" "" "Request2" "1391936498430" "1391936498430" "1391936498450" "1391936498450" "KO" "\u0020"]
   ["SCENARIO" "Test scenario2" "0" "1391936496808" "1391936496808"] 
   ["REQUEST" "Test scenario2" "0" "" "Request1" "1391936497998" "1391936497998" "1391936498426" "1391936498426" "OK" "\u0020"]])

(defn run-line-match [expected actual]
  (is (= (first expected) (first actual))))

(defn scenario-line-match [expected actual]
  (is (= (second expected) (second actual))))

{'fraction_non_alphanumeric': 0.16142384105960264, 'fraction_numerical': 0.298841059602649, 'mean_word_length': 5.051752921535893, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3607262', 'n_tokens_mistral': 2061, 'n_tokens_neox': 1352, 'n_words': 348}