testing-guide

Configure live Safeguard appliance access and run PowerShell 7 integration test suites.

24|35|Updated Sep 14, 2017
One-click install
npx skills add https://github.com/OneIdentity/safeguard-ps --skill testing-guide-oneidentity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-guide
Source: https://github.com/OneIdentity/safeguard-ps/tree/main/.agents/skills/testing-guide
Command: npx skills add https://github.com/OneIdentity/safeguard-ps --skill testing-guide-oneidentity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Running safeguard-ps tests can be confusing because the repo relies on a live Safeguard appliance rather than a mock layer, and test behavior depends on appliance access and PowerShell runtime details.

Core Features & Use Cases

  • Appliance and credential setup: Guides how to collect live appliance details and when an SPS appliance is required for session-related suites.
  • Reliable test execution workflow: Explains how to reinstall from source to avoid stale modules, how to run all or selected suites, and how to list available suites.
  • Test troubleshooting and authoring: Provides rules for fixing failures safely, mapping modules to suites, and the structure for creating new suite files using the framework helpers.

Quick Start

Reinstall the module from source and run the integration suite by executing ./test/Invoke-SafeguardPsTests.ps1 with your appliance address using PowerShell 7 (pwsh).

Frequently Asked Questions about testing-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run integration tests against a live Safeguard appliance using PowerShell?

You need a live Safeguard appliance for integration testing, and an SPS appliance specifically for session-related test suites. You must also collect the necessary appliance access credentials and details to configure the test runner properly.

How do I troubleshoot failing safeguard-ps integration tests?

Troubleshoot failing safeguard-ps tests by reinstalling the module from source to eliminate stale dependencies, selecting individual suites via the runner script to isolate failures, and interpreting the expected pass, fail, or skip outcomes against the live appliance.

How do I create a new integration test suite for safeguard-ps modules?

Create a new integration test suite by mapping the target module file to a corresponding suite file and using the testing framework's built-in assertion and cleanup helper patterns to ensure safe and reproducible test execution.

Do I need a live Safeguard appliance to run safeguard-ps tests?

Yes, the safeguard-ps repository relies entirely on a live Safeguard appliance rather than a mock layer. Session-related test suites additionally require an SPS appliance to properly validate session behavior.

Why are my safeguard-ps integration tests returning inconsistent results?

Inconsistent test results often stem from stale installed modules or incorrect appliance configuration. Reinstall the module from source, verify your live appliance access details, and execute specific test suites to isolate the failing assertions.