MIM Test Fixtures are used to execute actions directly against Identity Systems. Assertions are used to read data and check results.
Fixtures and assertions execute inside a test case as a special case of a schedule step. A canonical test case loads fixtures to manipulate data, runs schedules to synchronize, then runs assertions to validate results.
They may be defined inline inside a test case, or they may be created standalone in a separate section and added to (possibly multiple) cases as references.
In order for a test case as a whole to pass, the fixtures inside is must complete successfully, and the assertions must all pass.
Fixtures
The term "fixture" is a standard term used within the world of automated software testing, as well as in software packages that support database migration, or automatic version control of database schema and basic data.
In MIM Test Fixtures execute individual actions within a test case. By definition fixtures are actions that create, mutate, or delete data. Fixtures are provider type specific and each provider defines a range of possible fixture types. The list available fixtures depends on the version of Identity Panel, what providers are installed, and whether custom providers have been implemented.
As of version 6.2.3, the available fixture types are:
Fixture | Description |
Access Panel Request | Fixture to submit an access panel entitlement fixture. |
AD Add | Fixture to create a new AD Object. Converts to update if the object exists. |
AD Change Member |
Update an AD group by adding or removing a member (without fetching the whole group). NOTE: requires local installation of Active Directory PowerShell |
AD Delete | Delete an object by DN, empty a container, or delete objects matching and LDAP filter. |
AD Group Member (DEPRECATED) |
(DEPRECATED) Update an AD group by adding and removing members (without fetching the whole group). NOTE: if working with cross-domain membership use AD Update or PowerShell fixture |
AD Update | Update an existing AD object identified by DN or LDAP filter. |
Duo API Call Fixture | Fixture to invoke a form submission on the Duo API. See: Duo API |
Excel Upload Fixture | Fixture to upload an Excel or CSV file to an Excel provider |
Generic Workday Fixture | Fixture to run a PowerShell script. Use for increased flexibility in a fixture processing environment |
Graph Change Members | Add and remove group members |
Graph Create Group | Fixture to create a new Azure group. Converts to update if the object exists (matching on display name). To set nested fields, use '_': e.g. onPremisesExtensionAttributes_extensionAttribute3 |
Graph Create User | Fixture to create a new Azure user. Converts to update if the object exists. To set nested fields, use '_': e.g. onPremisesExtensionAttributes_extensionAttribute3 |
Graph Delete | Delete a group or user by Id/displayName/UPN. |
Graph Invite User | Fixture to invite an Azure B2B/Guest user. |
Graph License User | Add and remove user licenses. |
Graph Update Group | Fixture to update an Azure group. To set nested fields, use '_': e.g. onPremisesExtensionAttributes_extensionAttribute3 |
Graph Update User | Fixture to update an Azure user. To set nested fields, use '_': e.g. onPremisesExtensionAttributes_extensionAttribute3 |
Identity Silo Add | Fixture to create a new record |
Identity Silo Delete | Fixture to remove a record |
Identity Silo Update | Fixture to update a record |
LDAP Add | Fixture to create a new AD Object. Converts to update if the object exists. |
LDAP Delete | Delete an object by DN, empty a container, or delete objects matching and LDAP filter. |
Ldap Update | Update an existing Ldap object identified by DN or LDAP filter. |
Load Fixture | Fixture to iterate other fixtures. |
Lotus Add | Fixture to create a new Lotus Object. Converts to update if the object exists. |
Lotus Delete | Fixture to delete an existing Lotus Object. Locate by providing a ShortName, FullName, or UniversalID. |
Lotus Update | Fixture to update an existing Lotus Object. Locate by providing a ShortName, FullName, or UniversalID. |
Okta Create User | Fixture to create a new Okta user. Converts to update if the object exists. |
Okta Delete User | Fixture to delete an Okta user. Will deactivate user if necessary to make deletable |
Okta Update User | Fixture to update an Okta user. |
Password Set | Fixture to invoke password reset via MIM WMI. |
Portal Add (OBSOLETE) | This fixture is no longer supported for version >= 6.0. Please migrate to PowerShell fixtures with Lithnet Portal PowerShell. |
Portal Approval (OBSOLETE) | This fixture is no longer supported for version >= 6.0. Please migrate to PowerShell fixtures with Lithnet Portal PowerShell. |
Portal Delete (OBSOLETE) | This fixture is no longer supported for version >= 6.0. Please migrate to PowerShell fixtures with Lithnet Portal PowerShell. |
Portal Update (OBSOLETE) | This fixture is no longer supported for version >= 6.0. Please migrate to PowerShell fixtures with Lithnet Portal PowerShell. |
Run Azure PowerShell Fixture | Fixture to run a PowerShell script against Azure. Use for increased flexibility in a fixture processing environment |
Run PowerShell Fixture | Fixture to run a PowerShell script. Use for increased flexibility in a fixture processing environment |
Send Email Fixture | Fixture to send an email notification separate from scheduling. Use with load provider for bulk messages |
Service Panel Form | Fixture to post to a service panel form. |
ServiceNow Add | Creates a new ServiceNow object via TableAPI with POST method to set body. WARNING: Unlike other add fixture types, ServiceNow does not support idempotent add. |
ServiceNow Delete | Deletes an existing ServiceNow object via TableAPI with DELETE method. |
ServiceNow Scripted Fixture | Special case fixture to send arbitrary requests to ServiceNow scripted REST API. Unlike ordinary fixtures may also be used as an assertion. |
ServiceNow Update | Updates an existing ServiceNow object via TableAPI with PATCH method to set individual properties. |
SQL Add | Fixture to insert a new database row. Converts to Update if the row exists. |
SQL Backup / Restore | Fixture to backup or restore a SQL database. Not supported for Oracle and MySQL. |
SQL Delete | Fixture to delete an existing database row. |
SQL Query Fixture | Fixture to run a SQL query and memoize results. May be a Scalar or Row query. If a row query, only the first row is evaluated. |
SQL Truncate | Fixture to truncate the SQL table. |
SQL Update | Fixture to update an existing database row. |
Sync Disconnect | Disconnect an account. |
Sync Join | Join an account. |
Sync Preview Commit | Preview commit an account. |
Sync Project | Project to the metaverse. |
Text File Delete | Fixture to delete a text row. |
Text File Erase | Fixture to truncate a delimited text file to just the header row. |
Text File Upsert | Fixture to add or update a text row. |
Update Workday Email | Fixture to update a Workday Email. |
Update Workday Other ID | Fixture to update a Workday Other ID. |
Update Workday Phone | Fixture to update a Workday Phone. |
Update Workday Photo | Fixture to update a Workday Photo. |
Update Workday Username | Fixture to update a Workday Username. |
One of the key features of Fixture implementations in Identity Panel is that wherever, possible fixture actions are idempotent. This means that running the same fixture multiple times will have the same result as running it once. For example, if you run the same Portal Add fixture three times, it will create an object, but on subsequent calls it will do a filter query and automatically switch to performing an update if the object already exists.
All fixtures have some shared common fields:
- Name – Identifies the fixture, must be unique if defined as a re-usable fixture
- System – The MIM Test provider to use for executing this fixture. The system provides both the connection settings the the actual implementation for how to interpret the fixture
- Notes – Optional comments related to fixture usage or definition
- Preferred Servers – Optionally specify server(s) to restrict execution of the fixture to
- Memos – Allows saving of pre-calculated values that may be re-used in this and other fixtures.
In addition to common fields, fixtures have settings specific to and implemented by the provider. For example, many types of fixture have an Attributes list, and a key field or DN.
Assertions
Just like "fixture", "assertion" is a term from the world of automated software testing. An assertion performs a validation of expected state. Assertions may run at the beginning, middle, or end of a test case, but for a case to pass all assertions in it must pass.
Typically the settings for assertions look very similar to fixtures because they have similar needs regarding connecting to external systems, querying for data, executing on particular servers, etc. The primary difference is that assertions are readonly, and merely check for expected states.
An assertion essentially makes a statement of expectation, and if the environment does not conform to the expectation the assertion fails. Depending on the nature of the assertion, this may be something like an account not existing, a failure of login connectivity, or even something as simple as an attribute that wasn't updated to the expected value.
Like fixtures, assertions are associated to providers and different providers offer different types of validation action. The following assertion types are included with version 6.2.3:
Assertion | Description |
AD Assertion | Active Directory Assertion |
CS Assert | Provider to assert against connectorspace state and attributes |
Graph Assert | Assert against a graph object. |
Ldap Assertion | Active Directory Assertion |
Load Assertion | Assertion to iterate other assertions. |
Lotus Assertion | Assertion for Lotus Notes environment. Locate object by ShortName, FullName, or UniversalID. |
Okta User Assertion | Fixture to run an assertion against an Okta user. |
Portal Assertion (OBSOLETE) | This assertion is no longer supported for version >= 6.0. Please migrate to PowerShell with Lithnet Portal PowerShell. |
ServiceNowAssert | Assertion base class |
SQL Query | Run a SQL query and validate the result |
SQL Row | Assert against a row queried from the SQL Table |
Text File Assertion | Text File Assertion |
Uplift Assertion | Unit test driver to build out entry wrappers to pass to Uplift engine, execute a rule, and evaluate result. |
Assertions have the same common fields as Fixtures:
- Name
- Notes
- Preferred Servers
- Memos
In addition assertions that look up an object, such as an AD or Portal assertion often have a Result Memos property. This is a separate section for memos that execute in the context of the object found by the assertion. They can be used to cache values for use later in the test case. For example, if a field like an account name or workforce ID isn't known until execution time, it can be discovered by an assertion an remembered for later use in fixtures, or even other test cases in the suite.
Comments
0 comments
Please sign in to leave a comment.