---
id: change/al-go/2457
type: change
title: "#2457 Fixing codeunit discovery on PowerShell 5 for RunTests action."
summary: Fixed codeunit discovery in the RunTests action that was failing on PowerShell 5.1, ensuring proper test detection and execution on older PowerShell versions.
tier: official
language: en
tags:
  - fix
  - main
system: development
review:
  state: reviewed
  by: opus
  at: "2026-11-13T00:59:24.081Z"
  flags: []
generated:
  at: "2026-11-13T00:13:31.718Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 957ea1ea2e286bc966ac24c9f24035dbd30d72ed
evidence:
  - kind: code
    url: https://github.com/microsoft/AL-Go/pull/2457
    title: "microsoft/AL-Go#2457: Fixing codeunit discovery on PowerShell 5 for RunTests action."
    date: "2026-11-12"
    commit: 957ea1ea2e286bc966ac24c9f24035dbd30d72ed
    t: null
    quote: Test discovery in RunTests action fails on PowerShell 5.1
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 2457
repo: microsoft/AL-Go
source_id: al-go-prs
url: https://github.com/microsoft/AL-Go/pull/2457
kind: pr
base_branch: main
major: null
merged_at: "2026-11-12T16:49:39Z"
author: spetersenms
author_type: User
community_contribution: false
labels: []
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 75
  deletions: 7
  al: 1
apps: []
objects_touched: []
objects_unjoined:
  - path: Actions/RunTests/AlToolTestRunner.psm1
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items: []
systems:
  - development
  - platform
quote: Test discovery in RunTests action fails on PowerShell 5.1
joined_against:
  major: null
  commit: null
---

# #2457 Fixing codeunit discovery on PowerShell 5 for RunTests action.

> Fixed codeunit discovery in the RunTests action that was failing on PowerShell 5.1, ensuring proper test detection and execution on older PowerShell versions.

[Pull request](https://github.com/microsoft/AL-Go/pull/2457) · merged into `main` on 2026-11-12 by spetersenms · 4 files (+75 -7), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Resolves test discovery failures specifically affecting PowerShell 5.1
- Updates AlToolTestRunner module with compatibility fix
- Includes enhanced end-to-end test scenarios for validation
- Adds unit tests to prevent regression
- Behaviour changes for users or extensions.

## AL objects touched

- `Actions/RunTests/AlToolTestRunner.psm1`: modified, not in the BC? snapshot

## Context

- Systems: development, platform
- From the description: "Test discovery in RunTests action fails on PowerShell 5.1"

Source: metadata of a merged pull request in microsoft/AL-Go (al-go): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
