You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6b31c77
Browse filesBrowse the repository at this point in the historyBrowse files
pytest -n auto -m "fast and not cicdonly" --junitxml=test-results/junit-fast-test.xml && pytest -m "isolated"&& pytest -m "registry_isolation"&& pytest -m "dialect_isolated"
135
+
pytest -n auto -m "fast and not cicdonly and not isolated" --junitxml=test-results/junit-fast-test.xml && pytest -m "isolated and not slow"&& pytest -m "registry_isolation"&& pytest -m "dialect_isolated"
136
136
137
137
slow-test:
138
-
pytest -n auto -m "(fast or slow) and not cicdonly"&& pytest -m "isolated"&& pytest -m "registry_isolation"&& pytest -m "dialect_isolated"
138
+
pytest -n auto -m "(fast or slow) and not cicdonly and not isolated"&& pytest -m "isolated"&& pytest -m "registry_isolation"&& pytest -m "dialect_isolated"
139
139
140
140
cicd-test:
141
-
pytest -n auto -m "(fast or slow) and not pyspark" --junitxml=test-results/junit-cicd.xml && pytest -m "pyspark"&& pytest -m "isolated"&& pytest -m "registry_isolation"&& pytest -m "dialect_isolated"
141
+
pytest -n auto -m "(fast or slow) and not pyspark and not isolated" --junitxml=test-results/junit-cicd.xml && pytest -m "pyspark"&& pytest -m "isolated and not pyspark"&& pytest -m "registry_isolation"&& pytest -m "dialect_isolated"
142
142
143
143
core-fast-test:
144
144
pytest -n auto -m "fast and not web and not github and not dbt and not jupyter"
Copy file name to clipboardExpand all lines: docs/concepts/overview.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,9 @@ Bad data is worse than no data. The best way to keep bad data out of your system
52
52
### [Tests](./tests.md)
53
53
SQLMesh "tests" are similar to unit tests in software development, where the unit is a single model. SQLMesh tests validate model *code*— you specify the input data and expected output, then SQLMesh runs the test and compares the expected and actual output.
54
54
55
-
SQLMesh automatically runs tests when you apply a `plan`, or you can run them on demand with the [`test` command](../reference/cli.md#test).
55
+
SQLMesh automatically runs all unit tests when a `plan` is created. Use `--test-changed-only` to run tests only for models included in the plan (added, modified, or restated), `--skip-tests` to skip, run tests for specific models with [`sqlmesh test --select-model`](../reference/cli.md#test), or run the full suite on demand with the [`test` command](../reference/cli.md#test).
56
+
57
+
Learn more in the [testing guide](../guides/testing.md).
56
58
57
59
### [Audits](./audits.md)
58
60
In contrast to tests, SQLMesh "audits" validate the results of model code applied to your actual data.
Copy file name to clipboardExpand all lines: docs/concepts/tests.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Testing
2
2
3
-
Testing allows you to protect your project from regression by continuously verifying that the output of each model matches your expectations. Unlike [audits](audits.md), tests are executed either on demand (for example, as part of a CI/CD job) or every time a new [plan](plans.md) is created.
3
+
Testing allows you to protect your project from regression by continuously verifying that the output of each model matches your expectations. Unlike [audits](audits.md), tests are executed either on demand (for example, as part of a CI/CD job or via [`sqlmesh test`](../reference/cli.md#test)) or when a new [plan](plans.md) is created.
4
+
5
+
By default, `sqlmesh plan` runs all unit tests. Use `--test-changed-only` to run tests only for models included in the plan (added, modified, or restated), or `--skip-tests` to run none. With both `--select-model` and `--test-changed-only`, tests run only for selected models that changed.
4
6
5
7
Similar to unit testing in software development, SQLMesh evaluates the model's logic against predefined inputs and then compares the output to expected outcomes provided as part of each test.
0 commit comments