<@U088WCP3B4P> when I execute dbt test it show in ...
# ask-elementary-ai
a
@kapa.ai when I execute dbt test it show in the cli that 73 tests are executed but when the html report is generated only 69 tests are showing.
k
A message from kapa.ai
There are several possible reasons why the number of tests shown in the Elementary HTML report is less than the number executed by dbt test: 1. Test Results Storage and Filtering: Elementary's report displays test results based on what is stored in the
elementary_test_results
table. If some tests are not written to this table (due to configuration, permissions, or a bug), they won't appear in the report, even if they ran in dbt. It's worth checking the contents of
elementary_test_results
to see if all 73 tests are present there. If not, this could indicate an issue with how results are being logged or merged after test execution. Also, the report may only show the latest or active tests, not historical or removed ones, depending on how the tests are defined and run in your project [Why do some dbt tests not show in the report?](https://slack.com/archives/C02CTC89LAX/p1700825460844189). 2. Test Skipping or Filtering: Some tests may be skipped or filtered out in the report due to configuration or logical bugs. For example, there have been issues in the past where certain types of tests (like anomaly tests) were filtered out from the report due to a bug, which was later fixed in newer versions. If you are using an older version of Elementary, consider upgrading to the latest version, as several bugs related to missing test results in the report have been addressed in recent releases [Missing tests in report after upgrade](https://slack.com/archives/C02CTC89LAX/p1740395350614099), [Bug fix in 0.12.1](https://slack.com/archives/C02CTC89LAX/p1698307907124219). 3. Test Sample Row Count: If you are looking at failed test cases, the report by default only shows a sample (default is 5) of the failing rows. This can be adjusted with the
test_sample_row_count
variable, but this only affects the number of rows shown per test, not the number of tests [Sample row count in report](https://slack.com/archives/C02CTC89LAX/p1704319265407929). 4. Profile and Environment Mismatch: If the dbt test and the report generation are using different profiles or environments, the report may not reflect the latest test results. Ensure that both are pointing to the same database and schema [Profile/environment mismatch](https://slack.com/archives/C02CTC89LAX/p1670876665266939). What you can do: - Check the
elementary_test_results
table to see how many test results are actually stored. - Ensure you are using the latest version of both the Elementary dbt package and CLI. - Confirm that your dbt profile and the environment used for report generation are consistent. - If the issue persists, check the logs (
edr.log
and
dbt.log
) for errors or failed queries during test execution and report generation. If after these checks the issue remains, it may be a bug or a configuration issue specific to your setup. In that case, sharing logs and more details with the Elementary support team can help diagnose the problem further.