[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-25。"],[],[],null,["# Continuous Integration Assert Validator\n\n| **Preview:** This product or feature is subject to the \"Pre-GA Offerings Terms\" in the [General Service Terms](https://cloud.google.com/terms/service-terms#1) section of the Service Specific Terms. Pre-GA products and features are available \"as is\" and might have limited support. For more information, see the [launch stage descriptions](https://cloud.google.com/products#product-launch-stages).\n|\n| If you encounter an issue during the Public Preview of Continuous Integration, report it using the [Looker Continuous Integration - Preview Issue Tracker form](https://docs.google.com/forms/d/e/1FAIpQLSed30eICYruU45R8WZQH6hIui28xtdDnejfetzpLHQ5PK0ZeA/viewform?usp=dialog).\n\nThe Continuous Integration (CI) Assert Validator runs the LookML [data tests](/looker/docs/reference/param-model-test) that were created by Looker developers in your LookML project and shows the results for each data test. For data tests that fail, the Assert Validator shows the error.\n\nLookML data tests allow you to validate the logic of your Looker model. Data tests can test complex assumptions, such as the following:\n\n- Revenue in May of last year should equal $204,259.\n- Conversion rate should be greater than zero.\n- Order status shouldn't be null.\n\nA LookML data test is made up of a small [`explore_source`](/looker/docs/reference/param-model-test#explore_source) query and a [`yesno` assert expression](/looker/docs/reference/param-model-test#assert), such as in the following example: \n\n test: historic_revenue_is_accurate {\n explore_source: orders {\n column: total_revenue { field: orders.total_revenue }\n filters: [orders.created_date: \"2024\"]\n }\n assert: revenue_is_expected_value {\n expression: ${orders.total_revenue} = 626000 ;;\n }\n }\n\n| **Tip:** Once you write a LookML data test, you can [test it in the Looker IDE](/looker/docs/version-control-and-deploying-changes#running_data_tests).\n\nSee the [Assert Validator options](#assert-validator-options) section of this page for details on the options that you can configure when you [create or edit a CI suite](/looker/docs/ci-create-suite). For information on running the Assert Validator, see the [Running Continuous Integration suites](/looker/docs/ci-run-suite) documentation page.\n\nIn the [run results page](/looker/docs/ci-view-results), the Assert Validator shows the results for each data test. For data tests that fail, the Assert Validator shows the error or errors, as follows:\n\nAssert Validator options\n------------------------\n\nThere are several options you can specify when you [create or edit a Continuous Integration suite](/looker/docs/ci-create-suite) to configure how Assert Validator runs. The options are described in the following sections of this page:\n\n- [Explores to query](#explores-to-query)\n- [Explores to exclude](#explores-to-exclude)\n- [Query concurrency](#query-concurrency)\n\n### Explores to query\n\nBy default, the Assert Validator will run each data test in your LookML project.\n\nData tests are defined using an [`explore_source`](/looker/docs/reference/param-model-test#explore_source) parameter that points to an Explore in your project, and you can use the **Explores to query** field to limit assert validation to specific Explores that your data tests are based on.\n\nYou can specify Explores in the following format: `model_name/explore_name`\n\nFor example, to specify the Explores named `users` and `orders` in the `thelook.model.lkml` file, you would enter the following: `thelook/users, thelook/orders`\n\nSee the [SQL Validator](/looker/docs/ci-sql-validator#explores-to-query) documentation page for more information about and examples of how to specify Explores and models in this field.\n\n### Explores to exclude\n\nBy default, the Assert Validator will run each data test in your LookML project. You can use the **Explores to exclude** field to exclude from assert validation specific Explores that your data tests are based on. The Assert Validator won't run data tests that are based on these excluded Explores.\n\nYou can specify Explores in the following format: `model_name/explore_name`\n\nSee the [SQL Validator](/looker/docs/ci-sql-validator#explores-to-query) documentation page for more information about and examples of how to specify Explores and models in this field.\n\n### Query concurrency\n\nBy default, the Assert Validator runs no more than 10 queries at a time to avoid overwhelming your Looker instance. You can use the **Query concurrency** field to specify a different maximum number of queries that the Assert Validator can run concurrently.\n\nThe maximum value for the **Query concurrency** field is limited to the [Max concurrent queries for this connection](/looker/docs/connecting-to-your-db#max-queries) setting on your database connection.\n\nIf you notice a slowdown in your Looker instance while running Assert validation, you can decrease this value.\n| **Tip:** You can also restrict validation to a specific Explore or model by using the [**Explores to query**](#explores-to-query) option, or exclude Explores and models by using the [Explores to exclude](#explores-to-exclude) option."]]