Skip to content

FIX: Update E2E tests#1542

Merged
rlundeen2 merged 2 commits intomicrosoft:mainfrom
rlundeen2:users/rlundeen/2026_03_25_end_to_end
Mar 26, 2026
Merged

FIX: Update E2E tests#1542
rlundeen2 merged 2 commits intomicrosoft:mainfrom
rlundeen2:users/rlundeen/2026_03_25_end_to_end

Conversation

@rlundeen2
Copy link
Copy Markdown
Contributor

@rlundeen2 rlundeen2 commented Mar 26, 2026

Fixes two issues with end-to-end tests

  1. The parameters were wrong after the CLI update PR
  2. The tests were taking too long so I only am using one prompt from the dataset.

Fixes three issues uncovered by end-to-end scenario tests:

  1. OpenAIChatTarget bypasses known model capabilities OpenAIChatTarget.__init__ always overrode capabilities to the
    parent, so get_default_capabilities(underlying_model) was never called. Models like gpt-4o with known image input
    support fell back to text-only defaults. Now passes None when no explicit override is given, allowing the known
    capabilities lookup to work.
  2. airt_harms dataset missing seed_type: objective The airt.jailbreak scenario expects SeedAttackGroups with
    objectives, but harms.prompt had plain prompts. Added seed_type: objective (same as airt_hate.prompt and other AIRT
    datasets).
  3. Enriched error messages with model/endpoint info Exception details now include Model: and Endpoint: lines
    extracted from the component identifier, instead of just OpenAIChatTarget::32bf8f72.

rlundeen2 and others added 2 commits March 25, 2026 20:56
…target

The E2E tests were failing with exit code 2 because:
1. --database was removed from pyrit_scan CLI (PR microsoft#1536)
2. openai_objective_target initializer was deleted (PR microsoft#1536)

Changes:
- Add DEFAULT_OBJECTIVE_TARGET tag to TargetInitializerTags
- Add openai_chat target config using generic OPENAI_CHAT_* env vars
- Tag openai_chat as the default objective target in the registry
- Update E2E test to use --target openai_chat, --initializers targets,
  and --config-file for InMemory database
- Add unit tests for default objective target tagging

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rlundeen2 rlundeen2 marked this pull request as ready for review March 26, 2026 17:01
@rlundeen2 rlundeen2 merged commit f7970e1 into microsoft:main Mar 26, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants