# Select tests which are both modified and have a specific tag

**URL:** <https://discourse.getdbt.com/t/select-tests-which-are-both-modified-and-have-a-specific-tag/9995>\
**Category:** Help\
**Tags:** node-selection, deferral-and-state\
**Created:** [September 11, 2023, 1:27pm UTC](https://discourse.getdbt.com/t/select-tests-which-are-both-modified-and-have-a-specific-tag/9995 "2023-09-11T13:27:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanstandart](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/tanstandart/32/2967_2.png) [@tanstandart](https://discourse.getdbt.com/u/tanstandart)\
**Post date:** [September 11, 2023, 1:27pm UTC](https://discourse.getdbt.com/t/select-tests-which-are-both-modified-and-have-a-specific-tag/9995/1 "2023-09-11T13:27:08Z")

</div>

hi! Is it possible to test unit-tests for modified models only on dbt core version? Like so `dbt --warn-error test state:modified+ --state=prod-run-artifact tag:unit-test`. I tried with different combinations, but eventually, all tests are executed. Maybe I missed something:)

---

<div class="post-metadata">

**Author:** ![joellabes](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/joellabes/32/3980_2.png) [@joellabes](https://discourse.getdbt.com/u/joellabes)\
**Post date:** [September 19, 2023, 5:16am UTC](https://discourse.getdbt.com/t/select-tests-which-are-both-modified-and-have-a-specific-tag/9995/2 "2023-09-19T05:16:22Z")

</div>

If you want the intersection of tests tagged with `unit-test` and those which are modified, you need to use the [comma operator](https://docs.getdbt.com/reference/node-selection/set-operators#intersections):

`dbt --warn-error test --select state:modified+,tag:unit-test --state path/to/artifacts`
