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
Copy file name to clipboardExpand all lines: doc/tutorial.rst
+93Lines changed: 93 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,73 @@ and pass it to the :meth:`~scim2_tester.check_server` method:
36
36
print(result.status.name, result.title)
37
37
38
38
39
+
scim2-tester supports filtering tests using tags and resource types to run only specific subsets of checks.
40
+
This is useful for targeted testing or when developing specific features.
41
+
42
+
Tag-based filtering
43
+
~~~~~~~~~~~~~~~~~~~
44
+
45
+
Tests are organized using hierarchical tags that allow fine-grained control over which checks to execute. Use the :paramref:`~scim2_tester.check_server.include_tags` and :paramref:`~scim2_tester.check_server.exclude_tags` parameters:
Filters can be combined for precise control using both :paramref:`~scim2_tester.check_server.include_tags` and :paramref:`~scim2_tester.check_server.resource_types` parameters:
96
+
97
+
.. code-block:: python
98
+
99
+
# Test only User creation and reading
100
+
results = check_server(
101
+
client,
102
+
include_tags={"crud:create", "crud:read"},
103
+
resource_types=["User"]
104
+
)
105
+
39
106
Unit test suite integration
40
107
===========================
41
108
@@ -61,3 +128,29 @@ As :class:`~scim2_client.engines.werkzeug.TestSCIMClient` relies on :doc:`Werkze
For comprehensive test coverage, you can create parametrized tests that exercise different combinations of tags and resource types using :func:`~scim2_tester.discovery.get_all_available_tags` and :func:`~scim2_tester.discovery.get_standard_resource_types`:
136
+
137
+
.. code-block:: python
138
+
139
+
import pytest
140
+
from scim2_tester import Status, check_server
141
+
from scim2_tester.discovery import get_all_available_tags, get_standard_resource_types
assert result.status in (Status.SKIPPED, Status.SUCCESS)
155
+
156
+
This parametrized approach automatically discovers all available tags and resource types, ensuring that your test suite covers all possible combinations as your SCIM implementation evolves. Each test verifies that results have either :attr:`~scim2_tester.Status.SUCCESS` or :attr:`~scim2_tester.Status.SKIPPED` status.
0 commit comments