            (cx/elements-at-path parsed [:result])
            metadatas))))
 
+(defn- get-ops-collections-umm-validation-errors
+  "Loops through the collections in ops with a paged search. For each collection, validate the
+  metadata against the XML schema, validate the collection translated to UMM against the current
+  UMM JSON schema, and validate the UMM collection against the validation rules.
+  Return a list of all validation errors across all collections."
+  []
+  (loop [page-num starting-page-num results []]
+    (let [collections (get-collections search-page-size page-num)
+          error-results (map translate-and-validation-collection collections)
+          all-results (concat results (remove nil? error-results))]
+      (if (and (>= (count collections) search-page-size))
+        (recur (+ page-num 1) all-results)
+        all-results))))
+
+(defn- get-ops-collections-umm-validation-errors-debug
+  []
+  (let [colls (get-collections search-page-size 1)
+        error-results (map translate-and-validation-collection colls)
+        all-results (remove nil? error-results)]
+    (if (and (>= (count colls) search-page-size) (<= 200 (count colls)))
+      all-results
+      all-results)))
+
 ;; Comment out this test so that it will not be run as part of the build.
-#_(deftest ops-collections-translation)
-  (testing "Translate OPS collections into various supported metadata formats and make sure they pass validation."
-    (loop [page-num starting-page-num]
-      (let [colls (get-collections search-page-size page-num)]
-        (info "Translating collections on page-num: " page-num)
-        (doseq [coll colls]
-          (verify-translation-via-schema-validation coll))
-        ;; We will turn on ingest validation later when ingest is backed by umm-spec-lib
-        ; (verify-translation-via-ingest-validation coll))
-        (when (>= (count colls) search-page-size)
-          (recur (+ page-num 1)))))
-    (info "Finished OPS collections translation."))
+#_(deftest ops-collections-translation
+   (testing "Translate OPS collections into various supported metadata formats and make sure they pass validation."
+     (loop [page-num starting-page-num]
+       (let [colls (get-collections search-page-size page-num)]
+         (info "Translating collections on page-num: " page-num)
+         (doseq [coll colls]
+           (verify-translation-via-schema-validation coll))
+         ;; We will turn on ingest validation later when ingest is backed by umm-spec-lib
+         ; (verify-translation-via-ingest-validation coll))
+         (when (>= (count colls) search-page-size)
+           (recur (+ page-num 1)))))
+     (info "Finished OPS collections translation.")))
+
+(deftest ops-collections-validation
+   (testing "get-collections the current collections in ops against the current UMM schema"
+     (def results (get-ops-collections-umm-validation-errors-debug))
+    (info "Finished OPS collections translation.")))

    ; "C5862870-LARC_ASDC"
    ; "C5784310-LARC_ASDC"

    })

(def valid-formats
  "Valid metadata formats that is supported by CMR."

                (format "Failed xml schema validation when translating %s to %s for collection %s. %s"
                        (name metadata-format) (name output-format) concept-id validation-errs))))))))


(defn- translate-record-to-umm
  "Translate collection from native format to UMM-C"
  [record]
  (let [{:keys [metadata-format metadata concept-id]} record]
    (umm/parse-metadata context :collection metadata-format metadata {:apply-default? true})))

(defn- get-collection-validation-errors
  "Perform the following collection validations:
   * Validate metadata against the XML schema
   * Validation the UMM collection record against the current UMM JSON schema
   * Valiadte the UMM collection against UMM collection rules
  Return a list of validation errors."
  [record]
  (remove empty?
   (concat
     (umm/validate-xml :collection (:metadata-format record) (:metadata record))
     (json-schema/validate-umm-json (umm-json/umm->json (:collection record)) :collection)
     (umm-validation/validate-collection record))))

(defn- translate-and-validation-collection
  "For a search result record, translate the metadata to UMM, validate the metadata and UMM record
  and return a validation result record including the concept id, provider id, entry title, and
  all validation errors for the record."
  [record]
  (let [record (assoc record :collection (translate-record-to-umm record))
        validation-errors (get-collection-validation-errors record)
        concept-id (:concept-id record)]
    (when (seq validation-errors)
      {:concept-id concept-id
       :provider-id (:provider-id (concepts/parse-concept-id concept-id))
       :entry-title (get-in record [:collection :EntryTitle])
       :errors validation-errors})))

(defn get-collections
  "Returns the collections as a list of maps with concept-id, revision-id, metadata-format and metadata."
  [page-size page-num]
